diff options
author | Chris Lattner <sabre@nondot.org> | 2009-08-28 00:43:14 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-08-28 00:43:14 +0000 |
commit | a8b647dc112f792cb21b0b675e6d2b300207a4fa (patch) | |
tree | 114607f5f97d4eb4bdd2e7c6ca135bb6eafa4c60 /lib/Transforms/Scalar/LoopIndexSplit.cpp | |
parent | 5e1d21856de4bf387cccf8365885c45c87642dfb (diff) | |
download | external_llvm-a8b647dc112f792cb21b0b675e6d2b300207a4fa.zip external_llvm-a8b647dc112f792cb21b0b675e6d2b300207a4fa.tar.gz external_llvm-a8b647dc112f792cb21b0b675e6d2b300207a4fa.tar.bz2 |
Fix PR3913, patch by Jakub Staszak!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80327 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Scalar/LoopIndexSplit.cpp')
-rw-r--r-- | lib/Transforms/Scalar/LoopIndexSplit.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Transforms/Scalar/LoopIndexSplit.cpp b/lib/Transforms/Scalar/LoopIndexSplit.cpp index 792b753..259427e 100644 --- a/lib/Transforms/Scalar/LoopIndexSplit.cpp +++ b/lib/Transforms/Scalar/LoopIndexSplit.cpp @@ -435,7 +435,7 @@ bool LoopIndexSplit::processOneIterationLoop() { CmpInst::Predicate C2P = ExitCondition->getPredicate(); BranchInst *LatchBR = cast<BranchInst>(Latch->getTerminator()); - if (LatchBR->getOperand(0) != Header) + if (LatchBR->getOperand(1) != Header) C2P = CmpInst::getInversePredicate(C2P); Instruction *C2 = new ICmpInst(BR, C2P, SplitValue, ExitValue, "lisplit"); Instruction *NSplitCond = BinaryOperator::CreateAnd(C1, C2, "lisplit", BR); |