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 | c281d8031b11dd2a2d3b8e8abe81a8435ee58e74 (patch) | |
| tree | 380f7322b5998c9cc2f6ad5d6fb751b249d424d6 /llvm/lib | |
| parent | 21ad494f670219539de17536ec392240ba146619 (diff) | |
| download | bcm5719-llvm-c281d8031b11dd2a2d3b8e8abe81a8435ee58e74.tar.gz bcm5719-llvm-c281d8031b11dd2a2d3b8e8abe81a8435ee58e74.zip | |
Keep track of exit value operand number when operands are swapped.
llvm-svn: 47082
Diffstat (limited to 'llvm/lib')
| -rw-r--r-- | llvm/lib/Transforms/Scalar/LoopIndexSplit.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Scalar/LoopIndexSplit.cpp b/llvm/lib/Transforms/Scalar/LoopIndexSplit.cpp index 683a038824a..2d30eb6ff56 100644 --- a/llvm/lib/Transforms/Scalar/LoopIndexSplit.cpp +++ b/llvm/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: |

