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 | 4130278fbee97b9cd1ea4069e9c666bbe89d61f9 (patch) | |
tree | 4a6e8b68a1644a66696e127337c405e4ab94dcbe | |
parent | 6144686af6b62480c1a72b9f648c3823c6ed0dba (diff) | |
download | external_llvm-4130278fbee97b9cd1ea4069e9c666bbe89d61f9.zip external_llvm-4130278fbee97b9cd1ea4069e9c666bbe89d61f9.tar.gz external_llvm-4130278fbee97b9cd1ea4069e9c666bbe89d61f9.tar.bz2 |
Fix bug when checking phi operands in InstCombiner::visitPHINode(),
found by code inspection.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129641 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/Transforms/InstCombine/InstCombinePHI.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Transforms/InstCombine/InstCombinePHI.cpp b/lib/Transforms/InstCombine/InstCombinePHI.cpp index c91b793..37c3cd9 100644 --- a/lib/Transforms/InstCombine/InstCombinePHI.cpp +++ b/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. |