diff options
author | Devang Patel <dpatel@apple.com> | 2008-02-13 19:48:48 +0000 |
---|---|---|
committer | Devang Patel <dpatel@apple.com> | 2008-02-13 19:48:48 +0000 |
commit | 02c4836f3d8fc1605710866e48ec11b3a2dff23d (patch) | |
tree | e7f6211eaf7cd0d44585b0874b0fbb7a50a588df /lib/Transforms/Scalar/LoopIndexSplit.cpp | |
parent | afe6c2b001a924cd74bd0aacfed5984d9af004b0 (diff) |
Keep track of exit value operand number when operands are swapped.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47082 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Scalar/LoopIndexSplit.cpp')
-rw-r--r-- | lib/Transforms/Scalar/LoopIndexSplit.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/Transforms/Scalar/LoopIndexSplit.cpp b/lib/Transforms/Scalar/LoopIndexSplit.cpp index 683a038824..2d30eb6ff5 100644 --- a/lib/Transforms/Scalar/LoopIndexSplit.cpp +++ b/lib/Transforms/Scalar/LoopIndexSplit.cpp @@ -1163,8 +1163,13 @@ void LoopIndexSplit::calculateLoopBounds(SplitInfo &SD) { if (ExitCondition->getPredicate() == ICmpInst::ICMP_SGT || ExitCondition->getPredicate() == ICmpInst::ICMP_UGT || ExitCondition->getPredicate() == ICmpInst::ICMP_SGE - || ExitCondition->getPredicate() == ICmpInst::ICMP_UGE) + || ExitCondition->getPredicate() == ICmpInst::ICMP_UGE) { ExitCondition->swapOperands(); + if (ExitValueNum) + ExitValueNum = 0; + else + ExitValueNum = 1; + } switch (ExitCondition->getPredicate()) { case ICmpInst::ICMP_SGT: |