Fix a fixme in CondPropagate.cpp by moving a PhiNode optimization into
[oota-llvm.git] / lib / Transforms / Scalar / InstructionCombining.cpp
index d644d279359b94e652e4f32e5f48619cc8071ecd..5767afc40999a3c13809244c4d4ae3c2aa9579a1 100644 (file)
@@ -4401,7 +4401,7 @@ static bool DeadPHICycle(PHINode *PN, std::set<PHINode*> &PotentiallyDeadPHIs) {
 // PHINode simplification
 //
 Instruction *InstCombiner::visitPHINode(PHINode &PN) {
-  if (Value *V = hasConstantValue(&PN)) {
+  if (Value *V = PN.hasConstantValue()) {
     // If V is an instruction, we have to be certain that it dominates PN.
     // However, because we don't have dom info, we can't do a perfect job.
     if (Instruction *I = dyn_cast<Instruction>(V)) {