mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-24 23:28:41 +00:00
If the sign of exit condition and split condition does not match
then do not split loop index. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58995 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -1437,7 +1437,12 @@ bool LoopIndexSplit::splitLoop(SplitInfo &SD) {
|
||||
if (ICMP->getPredicate() == ICmpInst::ICMP_EQ)
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
// If the predicate sign does not match then skip.
|
||||
ICmpInst *CI = dyn_cast<ICmpInst>(SD.SplitCondition);
|
||||
if (CI && (ExitCondition->isSignedPredicate() != CI->isSignedPredicate()))
|
||||
return false;
|
||||
|
||||
BasicBlock *SplitCondBlock = SD.SplitCondition->getParent();
|
||||
|
||||
// Unable to handle triangle loops at the moment.
|
||||
|
Reference in New Issue
Block a user