Skip to content

Commit 817b7c5

Browse files
committed
[SCEV] Fix switch formatting in collectFromBlock (NFC).
Fix formatting for switch, to avoid unrelated changes/formatting errors in #163021.
1 parent 6e25a04 commit 817b7c5

File tree

1 file changed

+25
-25
lines changed

1 file changed

+25
-25
lines changed

llvm/lib/Analysis/ScalarEvolution.cpp

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -15670,31 +15670,31 @@ void ScalarEvolution::LoopGuards::collectFromBlock(
1567015670
// predicate.
1567115671
const SCEV *One = SE.getOne(RHS->getType());
1567215672
switch (Predicate) {
15673-
case CmpInst::ICMP_ULT:
15674-
if (RHS->getType()->isPointerTy())
15675-
return;
15676-
RHS = SE.getUMaxExpr(RHS, One);
15677-
[[fallthrough]];
15678-
case CmpInst::ICMP_SLT: {
15679-
RHS = SE.getMinusSCEV(RHS, One);
15680-
RHS = getPreviousSCEVDivisibleByDivisor(RHS, DividesBy, SE);
15681-
break;
15682-
}
15683-
case CmpInst::ICMP_UGT:
15684-
case CmpInst::ICMP_SGT:
15685-
RHS = SE.getAddExpr(RHS, One);
15686-
RHS = getNextSCEVDivisibleByDivisor(RHS, DividesBy, SE);
15687-
break;
15688-
case CmpInst::ICMP_ULE:
15689-
case CmpInst::ICMP_SLE:
15690-
RHS = getPreviousSCEVDivisibleByDivisor(RHS, DividesBy, SE);
15691-
break;
15692-
case CmpInst::ICMP_UGE:
15693-
case CmpInst::ICMP_SGE:
15694-
RHS = getNextSCEVDivisibleByDivisor(RHS, DividesBy, SE);
15695-
break;
15696-
default:
15697-
break;
15673+
case CmpInst::ICMP_ULT:
15674+
if (RHS->getType()->isPointerTy())
15675+
return;
15676+
RHS = SE.getUMaxExpr(RHS, One);
15677+
[[fallthrough]];
15678+
case CmpInst::ICMP_SLT: {
15679+
RHS = SE.getMinusSCEV(RHS, One);
15680+
RHS = getPreviousSCEVDivisibleByDivisor(RHS, DividesBy, SE);
15681+
break;
15682+
}
15683+
case CmpInst::ICMP_UGT:
15684+
case CmpInst::ICMP_SGT:
15685+
RHS = SE.getAddExpr(RHS, One);
15686+
RHS = getNextSCEVDivisibleByDivisor(RHS, DividesBy, SE);
15687+
break;
15688+
case CmpInst::ICMP_ULE:
15689+
case CmpInst::ICMP_SLE:
15690+
RHS = getPreviousSCEVDivisibleByDivisor(RHS, DividesBy, SE);
15691+
break;
15692+
case CmpInst::ICMP_UGE:
15693+
case CmpInst::ICMP_SGE:
15694+
RHS = getNextSCEVDivisibleByDivisor(RHS, DividesBy, SE);
15695+
break;
15696+
default:
15697+
break;
1569815698
}
1569915699

1570015700
SmallVector<const SCEV *, 16> Worklist(1, LHS);

0 commit comments

Comments
 (0)