[llvm-commits] [llvm] r129641 - /llvm/trunk/lib/Transforms/InstCombine/InstCombinePHI.cpp
Jay Foad
jay.foad at gmail.com
Sat Apr 16 07:17:37 PDT 2011
Author: foad
Date: Sat Apr 16 09:17:37 2011
New Revision: 129641
URL: http://llvm.org/viewvc/llvm-project?rev=129641&view=rev
Log:
Fix bug when checking phi operands in InstCombiner::visitPHINode(),
found by code inspection.
Modified:
llvm/trunk/lib/Transforms/InstCombine/InstCombinePHI.cpp
Modified: llvm/trunk/lib/Transforms/InstCombine/InstCombinePHI.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/InstCombine/InstCombinePHI.cpp?rev=129641&r1=129640&r2=129641&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/InstCombine/InstCombinePHI.cpp (original)
+++ llvm/trunk/lib/Transforms/InstCombine/InstCombinePHI.cpp Sat Apr 16 09:17:37 2011
@@ -831,7 +831,7 @@
++InValNo;
if (InValNo != NumOperandVals) {
- Value *NonPhiInVal = PN.getOperand(InValNo);
+ Value *NonPhiInVal = PN.getIncomingValue(InValNo);
// Scan the rest of the operands to see if there are any conflicts, if so
// there is no need to recursively scan other phis.
More information about the llvm-commits
mailing list