mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-09 22:24:37 +00:00
Fix PR1692
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42209 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -1181,15 +1181,17 @@ void LoopIndexSplit::calculateLoopBounds(SplitInfo &SD) {
|
||||
// values in original loop's preheader.
|
||||
// A_ExitValue = min(SplitValue, OrignalLoopExitValue)
|
||||
// B_StartValue = max(SplitValue, OriginalLoopStartValue)
|
||||
Instruction *InsertPt = L->getHeader()->getFirstNonPHI();
|
||||
Value *C1 = new ICmpInst(Sign ?
|
||||
ICmpInst::ICMP_SLT : ICmpInst::ICMP_ULT,
|
||||
AEV,
|
||||
ExitCondition->getOperand(ExitValueNum),
|
||||
"lsplit.ev", PHTerminator);
|
||||
"lsplit.ev", InsertPt);
|
||||
|
||||
SD.A_ExitValue = new SelectInst(C1, AEV,
|
||||
ExitCondition->getOperand(ExitValueNum),
|
||||
"lsplit.ev", PHTerminator);
|
||||
|
||||
"lsplit.ev", InsertPt);
|
||||
|
||||
Value *C2 = new ICmpInst(Sign ?
|
||||
ICmpInst::ICMP_SLT : ICmpInst::ICMP_ULT,
|
||||
BSV, StartValue, "lsplit.sv",
|
||||
|
Reference in New Issue
Block a user