diff options
author | Jay Foad <jay.foad@gmail.com> | 2011-04-16 14:17:37 +0000 |
---|---|---|
committer | Jay Foad <jay.foad@gmail.com> | 2011-04-16 14:17:37 +0000 |
commit | 7d03e9be47d586ebd288f40d939e5c9f94cfb188 (patch) | |
tree | 20ee4f8c2cfb4fdd6782e5a763641bc3ea0d32a4 /llvm/lib/Transforms | |
parent | 47f86e6c60b9b62575b570d521cc25221d71526d (diff) | |
download | bcm5719-llvm-7d03e9be47d586ebd288f40d939e5c9f94cfb188.tar.gz bcm5719-llvm-7d03e9be47d586ebd288f40d939e5c9f94cfb188.zip |
Fix bug when checking phi operands in InstCombiner::visitPHINode(),
found by code inspection.
llvm-svn: 129641
Diffstat (limited to 'llvm/lib/Transforms')
-rw-r--r-- | llvm/lib/Transforms/InstCombine/InstCombinePHI.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/InstCombine/InstCombinePHI.cpp b/llvm/lib/Transforms/InstCombine/InstCombinePHI.cpp index c91b79338ea..37c3cd9a04c 100644 --- a/llvm/lib/Transforms/InstCombine/InstCombinePHI.cpp +++ b/llvm/lib/Transforms/InstCombine/InstCombinePHI.cpp @@ -831,7 +831,7 @@ Instruction *InstCombiner::visitPHINode(PHINode &PN) { ++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. |