Commit a1afe66
authored
[SCEV] Generalize (C * A /u C) -> A fold to (C1 * A /u C2) -> C1/C2 * A. (#157159)
Generalize fold added in 74ec38f
(#156730) to support multiplying and
dividing by different constants, given they are both powers-of-2 and C1 is a
multiple of C2, checked via logBase2.
https://alive2.llvm.org/ce/z/eqJ2xj
PR: #1571591 parent e741b71 commit a1afe66
File tree
2 files changed
+10
-7
lines changed- llvm
- lib/Analysis
- test/Analysis/ScalarEvolution
2 files changed
+10
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3216 | 3216 | | |
3217 | 3217 | | |
3218 | 3218 | | |
3219 | | - | |
3220 | | - | |
| 3219 | + | |
| 3220 | + | |
3221 | 3221 | | |
3222 | | - | |
3223 | | - | |
3224 | | - | |
3225 | | - | |
| 3222 | + | |
| 3223 | + | |
| 3224 | + | |
| 3225 | + | |
| 3226 | + | |
| 3227 | + | |
| 3228 | + | |
3226 | 3229 | | |
3227 | 3230 | | |
3228 | 3231 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
| 26 | + | |
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| |||
0 commit comments