mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-17 18:24:34 +00:00
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:
@@ -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:
|
||||
|
Reference in New Issue
Block a user