Skip to content

Commit e6a1657

Browse files
committed
[ConstraintElim] Add A < B if A is an increasing phi for A != B.
This patch adds additional logic to add additional facts for A != B, if A is a monotonically increasing induction phi. The motivating use case for this is removing checks when using iterators with hardened libc++, e.g. https://godbolt.org/z/zhKEP37vG. The patch pulls in SCEV to detect AddRecs. If possible, the patch adds the following facts for a AddRec phi PN with StartValue as incoming value from the loo preheader and B being an upper bound for PN from a condition in the loop header. * (ICMP_UGE, PN, StartValue) * (ICMP_ULT, PN, B) [if (ICMP_ULE, StartValue, B)] The patch also adds an optional precondition to FactOrCheck (the new DoesHold field) , which can be used to only add a fact if the precondition holds at the point the fact is added to the constraint system. Depends on D151799. Reviewed By: nikic Differential Revision: https://reviews.llvm.org/D152730
1 parent 3ff7d51 commit e6a1657

19 files changed

+251
-213
lines changed

llvm/lib/Transforms/Scalar/ConstraintElimination.cpp

Lines changed: 148 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,10 @@
1818
#include "llvm/ADT/Statistic.h"
1919
#include "llvm/Analysis/ConstraintSystem.h"
2020
#include "llvm/Analysis/GlobalsModRef.h"
21+
#include "llvm/Analysis/LoopInfo.h"
2122
#include "llvm/Analysis/OptimizationRemarkEmitter.h"
23+
#include "llvm/Analysis/ScalarEvolution.h"
24+
#include "llvm/Analysis/ScalarEvolutionExpressions.h"
2225
#include "llvm/Analysis/ValueTracking.h"
2326
#include "llvm/IR/DataLayout.h"
2427
#include "llvm/IR/Dominators.h"
@@ -90,6 +93,8 @@ struct ConditionTy {
9093
Value *Op0;
9194
Value *Op1;
9295

96+
ConditionTy()
97+
: Pred(CmpInst::BAD_ICMP_PREDICATE), Op0(nullptr), Op1(nullptr) {}
9398
ConditionTy(CmpInst::Predicate Pred, Value *Op0, Value *Op1)
9499
: Pred(Pred), Op0(Op0), Op1(Op1) {}
95100
};
@@ -115,6 +120,10 @@ struct FactOrCheck {
115120
ConditionTy Cond;
116121
};
117122

123+
/// A pre-condition that must hold for the current fact to be added to the
124+
/// system.
125+
ConditionTy DoesHold;
126+
118127
unsigned NumIn;
119128
unsigned NumOut;
120129
EntryTy Ty;
@@ -124,27 +133,25 @@ struct FactOrCheck {
124133
Ty(Ty) {}
125134

126135
FactOrCheck(DomTreeNode *DTN, Use *U)
127-
: U(U), NumIn(DTN->getDFSNumIn()), NumOut(DTN->getDFSNumOut()),
136+
: U(U), DoesHold(CmpInst::BAD_ICMP_PREDICATE, nullptr, nullptr),
137+
NumIn(DTN->getDFSNumIn()), NumOut(DTN->getDFSNumOut()),
128138
Ty(EntryTy::UseCheck) {}
129139

130-
FactOrCheck(DomTreeNode *DTN, CmpInst::Predicate Pred, Value *Op0, Value *Op1)
131-
: Cond(Pred, Op0, Op1), NumIn(DTN->getDFSNumIn()),
140+
FactOrCheck(DomTreeNode *DTN, CmpInst::Predicate Pred, Value *Op0, Value *Op1,
141+
ConditionTy Precond = ConditionTy())
142+
: Cond(Pred, Op0, Op1), DoesHold(Precond), NumIn(DTN->getDFSNumIn()),
132143
NumOut(DTN->getDFSNumOut()), Ty(EntryTy::ConditionFact) {}
133144

134145
static FactOrCheck getConditionFact(DomTreeNode *DTN, CmpInst::Predicate Pred,
135-
Value *Op0, Value *Op1) {
136-
return FactOrCheck(DTN, Pred, Op0, Op1);
146+
Value *Op0, Value *Op1,
147+
ConditionTy Precond = ConditionTy()) {
148+
return FactOrCheck(DTN, Pred, Op0, Op1, Precond);
137149
}
138150

139151
static FactOrCheck getInstFact(DomTreeNode *DTN, Instruction *Inst) {
140152
return FactOrCheck(EntryTy::InstFact, DTN, Inst);
141153
}
142154

143-
static FactOrCheck getFact(DomTreeNode *DTN, CmpInst::Predicate Pred,
144-
Value *Op0, Value *Op1) {
145-
return FactOrCheck(DTN, Pred, Op0, Op1);
146-
}
147-
148155
static FactOrCheck getCheck(DomTreeNode *DTN, Use *U) {
149156
return FactOrCheck(DTN, U);
150157
}
@@ -177,13 +184,20 @@ struct FactOrCheck {
177184
/// Keep state required to build worklist.
178185
struct State {
179186
DominatorTree &DT;
187+
LoopInfo &LI;
188+
ScalarEvolution &SE;
180189
SmallVector<FactOrCheck, 64> WorkList;
181190

182-
State(DominatorTree &DT) : DT(DT) {}
191+
State(DominatorTree &DT, LoopInfo &LI, ScalarEvolution &SE)
192+
: DT(DT), LI(LI), SE(SE) {}
183193

184194
/// Process block \p BB and add known facts to work-list.
185195
void addInfoFor(BasicBlock &BB);
186196

197+
/// Try to add facts for loop inductions (AddRecs) in EQ/NE compares
198+
/// controlling the loop header.
199+
void addInfoForInductions(BasicBlock &BB);
200+
187201
/// Returns true if we can add a known condition from BB to its successor
188202
/// block Succ.
189203
bool canAddSuccessor(BasicBlock &BB, BasicBlock *Succ) const {
@@ -799,7 +813,114 @@ static void dumpConstraint(ArrayRef<int64_t> C,
799813
}
800814
#endif
801815

816+
void State::addInfoForInductions(BasicBlock &BB) {
817+
auto *L = LI.getLoopFor(&BB);
818+
if (!L || L->getHeader() != &BB)
819+
return;
820+
821+
Value *A;
822+
Value *B;
823+
CmpInst::Predicate Pred;
824+
825+
if (!match(BB.getTerminator(),
826+
m_Br(m_ICmp(Pred, m_Value(A), m_Value(B)), m_Value(), m_Value())))
827+
return;
828+
PHINode *PN = dyn_cast<PHINode>(A);
829+
if (!PN) {
830+
Pred = CmpInst::getSwappedPredicate(Pred);
831+
std::swap(A, B);
832+
PN = dyn_cast<PHINode>(A);
833+
}
834+
835+
if (!PN || PN->getParent() != &BB || PN->getNumIncomingValues() != 2 ||
836+
!SE.isSCEVable(PN->getType()))
837+
return;
838+
839+
BasicBlock *InLoopSucc = nullptr;
840+
if (Pred == CmpInst::ICMP_NE)
841+
InLoopSucc = cast<BranchInst>(BB.getTerminator())->getSuccessor(0);
842+
else if (Pred == CmpInst::ICMP_EQ)
843+
InLoopSucc = cast<BranchInst>(BB.getTerminator())->getSuccessor(1);
844+
else
845+
return;
846+
847+
if (!L->contains(InLoopSucc) || !L->isLoopExiting(&BB) || InLoopSucc == &BB)
848+
return;
849+
850+
auto *AR = dyn_cast_or_null<SCEVAddRecExpr>(SE.getSCEV(PN));
851+
if (!AR)
852+
return;
853+
854+
const SCEV *StartSCEV = AR->getStart();
855+
Value *StartValue = nullptr;
856+
if (auto *C = dyn_cast<SCEVConstant>(StartSCEV))
857+
StartValue = C->getValue();
858+
else if (auto *U = dyn_cast<SCEVUnknown>(StartSCEV))
859+
StartValue = U->getValue();
860+
861+
if (!StartValue)
862+
return;
863+
864+
DomTreeNode *DTN = DT.getNode(InLoopSucc);
865+
auto Inc = SE.getMonotonicPredicateType(AR, CmpInst::ICMP_UGT);
866+
bool MonotonicallyIncreasing =
867+
Inc && *Inc == ScalarEvolution::MonotonicallyIncreasing;
868+
if (MonotonicallyIncreasing) {
869+
// SCEV guarantees that AR does not wrap, so PN >= StartValue can be added
870+
// unconditionally.
871+
WorkList.push_back(
872+
FactOrCheck::getConditionFact(DTN, CmpInst::ICMP_UGE, PN, StartValue));
873+
}
874+
875+
APInt StepOffset;
876+
if (auto *C = dyn_cast<SCEVConstant>(AR->getStepRecurrence(SE)))
877+
StepOffset = C->getAPInt();
878+
else
879+
return;
880+
881+
// Make sure AR either steps by 1 or that the value we compare against is a
882+
// GEP based on the same start value and all offsets are a multiple of the
883+
// step size, to guarantee that the induction will reach the value.
884+
if (StepOffset.isZero() || StepOffset.isNegative())
885+
return;
886+
887+
if (!StepOffset.isOne()) {
888+
auto *UpperGEP = dyn_cast<GetElementPtrInst>(B);
889+
if (!UpperGEP || UpperGEP->getPointerOperand() != StartValue ||
890+
!UpperGEP->isInBounds())
891+
return;
892+
893+
MapVector<Value *, APInt> UpperVariableOffsets;
894+
APInt UpperConstantOffset(StepOffset.getBitWidth(), 0);
895+
const DataLayout &DL = BB.getModule()->getDataLayout();
896+
if (!UpperGEP->collectOffset(DL, StepOffset.getBitWidth(),
897+
UpperVariableOffsets, UpperConstantOffset))
898+
return;
899+
// All variable offsets and the constant offset have to be a multiple of the
900+
// step.
901+
if (!UpperConstantOffset.urem(StepOffset).isZero() ||
902+
any_of(UpperVariableOffsets, [&StepOffset](const auto &P) {
903+
return !P.second.urem(StepOffset).isZero();
904+
}))
905+
return;
906+
}
907+
908+
// AR may wrap. Add PN >= StartValue conditional on StartValue <= B which
909+
// guarantees that the loop exits before wrapping in combination with the
910+
// restrictions on B and the step above.
911+
if (!MonotonicallyIncreasing) {
912+
WorkList.push_back(FactOrCheck::getConditionFact(
913+
DTN, CmpInst::ICMP_UGE, PN, StartValue,
914+
ConditionTy(CmpInst::ICMP_ULE, StartValue, B)));
915+
}
916+
WorkList.push_back(FactOrCheck::getConditionFact(
917+
DTN, CmpInst::ICMP_ULT, PN, B,
918+
ConditionTy(CmpInst::ICMP_ULE, StartValue, B)));
919+
}
920+
802921
void State::addInfoFor(BasicBlock &BB) {
922+
addInfoForInductions(BB);
923+
803924
// True as long as long as the current instruction is guaranteed to execute.
804925
bool GuaranteedToExecute = true;
805926
// Queue conditions and assumes.
@@ -1179,6 +1300,7 @@ static bool checkAndSecondOpImpliedByFirst(
11791300
FactOrCheck &CB, ConstraintInfo &Info, Module *ReproducerModule,
11801301
SmallVectorImpl<ReproducerEntry> &ReproducerCondStack,
11811302
SmallVectorImpl<StackEntry> &DFSInStack) {
1303+
11821304
CmpInst::Predicate Pred;
11831305
Value *A, *B;
11841306
Instruction *And = CB.getContextInst();
@@ -1322,15 +1444,16 @@ tryToSimplifyOverflowMath(IntrinsicInst *II, ConstraintInfo &Info,
13221444
return Changed;
13231445
}
13241446

1325-
static bool eliminateConstraints(Function &F, DominatorTree &DT,
1447+
static bool eliminateConstraints(Function &F, DominatorTree &DT, LoopInfo &LI,
1448+
ScalarEvolution &SE,
13261449
OptimizationRemarkEmitter &ORE) {
13271450
bool Changed = false;
13281451
DT.updateDFSNumbers();
13291452
SmallVector<Value *> FunctionArgs;
13301453
for (Value &Arg : F.args())
13311454
FunctionArgs.push_back(&Arg);
13321455
ConstraintInfo Info(F.getParent()->getDataLayout(), FunctionArgs);
1333-
State S(DT);
1456+
State S(DT, LI, SE);
13341457
std::unique_ptr<Module> ReproducerModule(
13351458
DumpReproducers ? new Module(F.getName(), F.getContext()) : nullptr);
13361459

@@ -1428,6 +1551,10 @@ static bool eliminateConstraints(Function &F, DominatorTree &DT,
14281551
}
14291552

14301553
auto AddFact = [&](CmpInst::Predicate Pred, Value *A, Value *B) {
1554+
LLVM_DEBUG(dbgs() << "fact to add to the system: "
1555+
<< CmpInst::getPredicateName(Pred) << " ";
1556+
A->printAsOperand(dbgs()); dbgs() << ", ";
1557+
B->printAsOperand(dbgs()); dbgs() << "\n");
14311558
if (Info.getCS(CmpInst::isSigned(Pred)).size() > MaxRows) {
14321559
LLVM_DEBUG(
14331560
dbgs()
@@ -1475,6 +1602,9 @@ static bool eliminateConstraints(Function &F, DominatorTree &DT,
14751602
Pred = CB.Cond.Pred;
14761603
A = CB.Cond.Op0;
14771604
B = CB.Cond.Op1;
1605+
if (CB.DoesHold.Pred != CmpInst::BAD_ICMP_PREDICATE &&
1606+
!Info.doesHold(CB.DoesHold.Pred, CB.DoesHold.Op0, CB.DoesHold.Op1))
1607+
continue;
14781608
} else {
14791609
bool Matched = match(CB.Inst, m_Intrinsic<Intrinsic::assume>(
14801610
m_ICmp(Pred, m_Value(A), m_Value(B))));
@@ -1511,12 +1641,16 @@ static bool eliminateConstraints(Function &F, DominatorTree &DT,
15111641
PreservedAnalyses ConstraintEliminationPass::run(Function &F,
15121642
FunctionAnalysisManager &AM) {
15131643
auto &DT = AM.getResult<DominatorTreeAnalysis>(F);
1644+
auto &LI = AM.getResult<LoopAnalysis>(F);
1645+
auto &SE = AM.getResult<ScalarEvolutionAnalysis>(F);
15141646
auto &ORE = AM.getResult<OptimizationRemarkEmitterAnalysis>(F);
1515-
if (!eliminateConstraints(F, DT, ORE))
1647+
if (!eliminateConstraints(F, DT, LI, SE, ORE))
15161648
return PreservedAnalyses::all();
15171649

15181650
PreservedAnalyses PA;
15191651
PA.preserve<DominatorTreeAnalysis>();
1652+
PA.preserve<LoopAnalysis>();
1653+
PA.preserve<ScalarEvolutionAnalysis>();
15201654
PA.preserveSet<CFGAnalyses>();
15211655
return PA;
15221656
}

llvm/test/Other/new-pm-defaults.ll

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -162,10 +162,12 @@
162162
; CHECK-O-NEXT: Running pass: SimplifyCFGPass
163163
; CHECK-O-NEXT: Running pass: ReassociatePass
164164
; CHECK-O23SZ-NEXT: Running pass: ConstraintEliminationPass
165+
; CHECK-O23SZ-NEXT: Running analysis: LoopAnalysis
166+
; CHECK-O23SZ-NEXT: Running analysis: ScalarEvolutionAnalysis
165167
; CHECK-O-NEXT: Running pass: LoopSimplifyPass
166-
; CHECK-O-NEXT: Running analysis: LoopAnalysis
168+
; CHECK-O1-NEXT: Running analysis: LoopAnalysis
167169
; CHECK-O-NEXT: Running pass: LCSSAPass
168-
; CHECK-O-NEXT: Running analysis: ScalarEvolutionAnalysis
170+
; CHECK-O1-NEXT: Running analysis: ScalarEvolutionAnalysis
169171
; CHECK-O-NEXT: Running analysis: InnerAnalysisManagerProxy
170172
; CHECK-O-NEXT: Running pass: LoopInstSimplifyPass
171173
; CHECK-O-NEXT: Running pass: LoopSimplifyCFGPass

llvm/test/Other/new-pm-lto-defaults.ll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,8 @@
8181
; CHECK-O23SZ-NEXT: Running pass: InstCombinePass
8282
; CHECK-EP-Peephole-NEXT: Running pass: NoOpFunctionPass
8383
; CHECK-O23SZ-NEXT: Running pass: ConstraintEliminationPass
84+
; CHECK-O23SZ-NEXT: Running analysis: LoopAnalysis on foo
85+
; CHECK-O23SZ-NEXT: Running analysis: ScalarEvolutionAnalysis on foo
8486
; CHECK-O23SZ-NEXT: Running pass: JumpThreadingPass
8587
; CHECK-O23SZ-NEXT: Running analysis: LazyValueAnalysis
8688
; CHECK-O23SZ-NEXT: Running pass: SROAPass on foo
@@ -93,11 +95,9 @@
9395
; CHECK-O23SZ-NEXT: Invalidating analysis: AAManager on foo
9496
; CHECK-O23SZ-NEXT: Running pass: OpenMPOptCGSCCPass on (foo)
9597
; CHECK-O23SZ-NEXT: Running pass: LoopSimplifyPass on foo
96-
; CHECK-O23SZ-NEXT: Running analysis: LoopAnalysis on foo
9798
; CHECK-O23SZ-NEXT: Running pass: LCSSAPass on foo
9899
; CHECK-O23SZ-NEXT: Running analysis: MemorySSAAnalysis on foo
99100
; CHECK-O23SZ-NEXT: Running analysis: AAManager on foo
100-
; CHECK-O23SZ-NEXT: Running analysis: ScalarEvolutionAnalysis on foo
101101
; CHECK-O23SZ-NEXT: Running analysis: InnerAnalysisManagerProxy
102102
; CHECK-O23SZ-NEXT: Running pass: LICMPass on loop
103103
; CHECK-O23SZ-NEXT: Running pass: GVNPass on foo

llvm/test/Other/new-pm-thinlto-postlink-defaults.ll

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,10 +99,12 @@
9999
; CHECK-O-NEXT: Running pass: SimplifyCFGPass
100100
; CHECK-O-NEXT: Running pass: ReassociatePass
101101
; CHECK-O23SZ-NEXT: Running pass: ConstraintEliminationPass
102+
; CHECK-O23SZ-NEXT: Running analysis: LoopAnalysis
103+
; CHECK-O23SZ-NEXT: Running analysis: ScalarEvolutionAnalysis
102104
; CHECK-O-NEXT: Running pass: LoopSimplifyPass
103-
; CHECK-O-NEXT: Running analysis: LoopAnalysis
105+
; CHECK-O1-NEXT: Running analysis: LoopAnalysis
104106
; CHECK-O-NEXT: Running pass: LCSSAPass
105-
; CHECK-O-NEXT: Running analysis: ScalarEvolutionAnalysis
107+
; CHECK-O1-NEXT: Running analysis: ScalarEvolutionAnalysis
106108
; CHECK-O-NEXT: Running analysis: InnerAnalysisManagerProxy
107109
; CHECK-O-NEXT: Running pass: LoopInstSimplifyPass
108110
; CHECK-O-NEXT: Running pass: LoopSimplifyCFGPass

llvm/test/Other/new-pm-thinlto-postlink-pgo-defaults.ll

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,9 +88,10 @@
8888
; CHECK-O-NEXT: Running pass: SimplifyCFGPass
8989
; CHECK-O-NEXT: Running pass: ReassociatePass
9090
; CHECK-O23SZ-NEXT: Running pass: ConstraintEliminationPass
91+
; CHECK-O23SZ-NEXT: Running analysis: ScalarEvolutionAnalysis
9192
; CHECK-O-NEXT: Running pass: LoopSimplifyPass
9293
; CHECK-O-NEXT: Running pass: LCSSAPass
93-
; CHECK-O-NEXT: Running analysis: ScalarEvolutionAnalysis
94+
; CHECK-O1-NEXT: Running analysis: ScalarEvolutionAnalysis
9495
; CHECK-O-NEXT: Running analysis: InnerAnalysisManagerProxy
9596
; CHECK-O-NEXT: Running pass: LoopInstSimplifyPass
9697
; CHECK-O-NEXT: Running pass: LoopSimplifyCFGPass

llvm/test/Other/new-pm-thinlto-postlink-samplepgo-defaults.ll

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,9 +95,10 @@
9595
; CHECK-O-NEXT: Running pass: SimplifyCFGPass
9696
; CHECK-O-NEXT: Running pass: ReassociatePass
9797
; CHECK-O23SZ-NEXT: Running pass: ConstraintEliminationPass
98+
; CHECK-O23SZ-NEXT: Running analysis: ScalarEvolutionAnalysis
9899
; CHECK-O-NEXT: Running pass: LoopSimplifyPass
99100
; CHECK-O-NEXT: Running pass: LCSSAPass
100-
; CHECK-O-NEXT: Running analysis: ScalarEvolutionAnalysis
101+
; CHECK-O1-NEXT: Running analysis: ScalarEvolutionAnalysis
101102
; CHECK-O-NEXT: Running analysis: InnerAnalysisManagerProxy
102103
; CHECK-O-NEXT: Running pass: LoopInstSimplifyPass
103104
; CHECK-O-NEXT: Running pass: LoopSimplifyCFGPass

llvm/test/Other/new-pm-thinlto-prelink-defaults.ll

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,10 +131,12 @@
131131
; CHECK-O-NEXT: Running pass: SimplifyCFGPass
132132
; CHECK-O-NEXT: Running pass: ReassociatePass
133133
; CHECK-O23SZ-NEXT: Running pass: ConstraintEliminationPass
134+
; CHECK-O23SZ-NEXT: Running analysis: LoopAnalysis
135+
; CHECK-O23SZ-NEXT: Running analysis: ScalarEvolutionAnalysis
134136
; CHECK-O-NEXT: Running pass: LoopSimplifyPass
135-
; CHECK-O-NEXT: Running analysis: LoopAnalysis
137+
; CHECK-O1-NEXT: Running analysis: LoopAnalysis
136138
; CHECK-O-NEXT: Running pass: LCSSAPass
137-
; CHECK-O-NEXT: Running analysis: ScalarEvolutionAnalysis
139+
; CHECK-O1-NEXT: Running analysis: ScalarEvolutionAnalysis
138140
; CHECK-O-NEXT: Running analysis: InnerAnalysisManagerProxy
139141
; CHECK-O-NEXT: Running pass: LoopInstSimplifyPass
140142
; CHECK-O-NEXT: Running pass: LoopSimplifyCFGPass

llvm/test/Other/new-pm-thinlto-prelink-pgo-defaults.ll

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,9 +134,10 @@
134134
; CHECK-O-NEXT: Running pass: SimplifyCFGPass
135135
; CHECK-O-NEXT: Running pass: ReassociatePass
136136
; CHECK-O23SZ-NEXT: Running pass: ConstraintEliminationPass
137+
; CHECK-O23SZ-NEXT: Running analysis: ScalarEvolutionAnalysis
137138
; CHECK-O-NEXT: Running pass: LoopSimplifyPass
138139
; CHECK-O-NEXT: Running pass: LCSSAPass
139-
; CHECK-O-NEXT: Running analysis: ScalarEvolutionAnalysis
140+
; CHECK-O1-NEXT: Running analysis: ScalarEvolutionAnalysis
140141
; CHECK-O-NEXT: Running analysis: InnerAnalysisManagerProxy
141142
; CHECK-O-NEXT: Running pass: LoopInstSimplifyPass
142143
; CHECK-O-NEXT: Running pass: LoopSimplifyCFGPass

llvm/test/Other/new-pm-thinlto-prelink-samplepgo-defaults.ll

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,9 +100,10 @@
100100
; CHECK-O-NEXT: Running pass: SimplifyCFGPass
101101
; CHECK-O-NEXT: Running pass: ReassociatePass
102102
; CHECK-O23SZ-NEXT: Running pass: ConstraintEliminationPass
103+
; CHECK-O23SZ-NEXT: Running analysis: ScalarEvolutionAnalysis
103104
; CHECK-O-NEXT: Running pass: LoopSimplifyPass
104105
; CHECK-O-NEXT: Running pass: LCSSAPass
105-
; CHECK-O-NEXT: Running analysis: ScalarEvolutionAnalysis
106+
; CHECK-O1-NEXT: Running analysis: ScalarEvolutionAnalysis
106107
; CHECK-O-NEXT: Running analysis: InnerAnalysisManagerProxy
107108
; CHECK-O-NEXT: Running pass: LoopInstSimplifyPass
108109
; CHECK-O-NEXT: Running pass: LoopSimplifyCFGPass

0 commit comments

Comments
 (0)