mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-14 16:33:28 +00:00
Relax loop ExitCondition predicate restriction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42122 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
968eee2aa7
commit
babbe27007
@ -356,11 +356,7 @@ void LoopIndexSplit::findLoopConditionals() {
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
// FIXME
|
// FIXME
|
||||||
if (CI->getPredicate() == ICmpInst::ICMP_SGT
|
if (CI->getPredicate() == ICmpInst::ICMP_EQ
|
||||||
|| CI->getPredicate() == ICmpInst::ICMP_UGT
|
|
||||||
|| CI->getPredicate() == ICmpInst::ICMP_SGE
|
|
||||||
|| CI->getPredicate() == ICmpInst::ICMP_UGE
|
|
||||||
|| CI->getPredicate() == ICmpInst::ICMP_EQ
|
|
||||||
|| CI->getPredicate() == ICmpInst::ICMP_NE)
|
|| CI->getPredicate() == ICmpInst::ICMP_NE)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@ -1015,6 +1011,12 @@ void LoopIndexSplit::calculateLoopBounds(SplitInfo &SD) {
|
|||||||
Value *AEV = SD.SplitValue;
|
Value *AEV = SD.SplitValue;
|
||||||
Value *BSV = SD.SplitValue;
|
Value *BSV = SD.SplitValue;
|
||||||
|
|
||||||
|
if (ExitCondition->getPredicate() == ICmpInst::ICMP_SGT
|
||||||
|
|| ExitCondition->getPredicate() == ICmpInst::ICMP_UGT
|
||||||
|
|| ExitCondition->getPredicate() == ICmpInst::ICMP_SGE
|
||||||
|
|| ExitCondition->getPredicate() == ICmpInst::ICMP_UGE)
|
||||||
|
ExitCondition->swapOperands();
|
||||||
|
|
||||||
switch (ExitCondition->getPredicate()) {
|
switch (ExitCondition->getPredicate()) {
|
||||||
case ICmpInst::ICMP_SGT:
|
case ICmpInst::ICMP_SGT:
|
||||||
case ICmpInst::ICMP_UGT:
|
case ICmpInst::ICMP_UGT:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user