Skip to content
This repository was archived by the owner on Feb 5, 2019. It is now read-only.

Commit 7875288

Browse files
committed
[SCEV] Call StrengthenNoWrapFlags after GroupByComplexity; NFCI
The current implementation of `StrengthenNoWrapFlags` is agnostic to the order of `Ops`, so this commit should not change anything semantic. An upcoming change will make `StrengthenNoWrapFlags` sensitive to the order of `Ops`. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@249802 91177308-0d34-0410-b5e6-96231b3b80d8
1 parent d1e38a6 commit 7875288

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lib/Analysis/ScalarEvolution.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1960,11 +1960,11 @@ const SCEV *ScalarEvolution::getAddExpr(SmallVectorImpl<const SCEV *> &Ops,
19601960
"SCEVAddExpr operand types don't match!");
19611961
#endif
19621962

1963-
Flags = StrengthenNoWrapFlags(this, scAddExpr, Ops, Flags);
1964-
19651963
// Sort by complexity, this groups all similar expression types together.
19661964
GroupByComplexity(Ops, &LI);
19671965

1966+
Flags = StrengthenNoWrapFlags(this, scAddExpr, Ops, Flags);
1967+
19681968
// If there are any constants, fold them together.
19691969
unsigned Idx = 0;
19701970
if (const SCEVConstant *LHSC = dyn_cast<SCEVConstant>(Ops[0])) {
@@ -2368,11 +2368,11 @@ const SCEV *ScalarEvolution::getMulExpr(SmallVectorImpl<const SCEV *> &Ops,
23682368
"SCEVMulExpr operand types don't match!");
23692369
#endif
23702370

2371-
Flags = StrengthenNoWrapFlags(this, scMulExpr, Ops, Flags);
2372-
23732371
// Sort by complexity, this groups all similar expression types together.
23742372
GroupByComplexity(Ops, &LI);
23752373

2374+
Flags = StrengthenNoWrapFlags(this, scMulExpr, Ops, Flags);
2375+
23762376
// If there are any constants, fold them together.
23772377
unsigned Idx = 0;
23782378
if (const SCEVConstant *LHSC = dyn_cast<SCEVConstant>(Ops[0])) {

0 commit comments

Comments
 (0)