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
This commit is contained in:
Devang Patel
2008-02-13 19:48:48 +00:00
parent afe6c2b001
commit 02c4836f3d
2 changed files with 73 additions and 1 deletions

View File

@@ -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: