Commit f78150d
committed
Reapply "[SCEV] Fold (C1 * A /u C2) -> A /u (C2 /u C1), if C2 > C1." (#158328)
This reverts commit fd58f23.
The recommit contains an extra check to make sure that D is a multiple of
C2, if C2 > C1. This fixes the issue causing the revert fd58f23. Tests
have been added in 6a726e9.
Original message:
If C2 >u C1 and C1 >u 1, fold to A /u (C2 /u C1).
Depends on #157555.
Alive2 Proof: https://alive2.llvm.org/ce/z/BWvQYN
PR: #1576561 parent e969bd7 commit f78150d
File tree
3 files changed
+17
-9
lines changed- llvm
- lib/Analysis
- test
- Analysis/ScalarEvolution
- Transforms/LoopStrengthReduce
3 files changed
+17
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3217 | 3217 | | |
3218 | 3218 | | |
3219 | 3219 | | |
3220 | | - | |
| 3220 | + | |
| 3221 | + | |
3221 | 3222 | | |
3222 | 3223 | | |
3223 | | - | |
3224 | | - | |
| 3224 | + | |
| 3225 | + | |
| 3226 | + | |
3225 | 3227 | | |
3226 | 3228 | | |
3227 | 3229 | | |
3228 | 3230 | | |
3229 | | - | |
| 3231 | + | |
3230 | 3232 | | |
3231 | | - | |
3232 | | - | |
| 3233 | + | |
| 3234 | + | |
| 3235 | + | |
| 3236 | + | |
| 3237 | + | |
| 3238 | + | |
| 3239 | + | |
| 3240 | + | |
| 3241 | + | |
3233 | 3242 | | |
3234 | 3243 | | |
3235 | 3244 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
| 24 | + | |
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
22 | | - | |
| 21 | + | |
23 | 22 | | |
24 | 23 | | |
25 | 24 | | |
| |||
0 commit comments