Commit c3ca5fc
committed
[SCEV] Preserve divisibility info when creating UMax/SMax expressions.
Currently we generate (S|U)Max(1, Op) for Op >= 1. This may discard
divisibility info of Op. This patch rewrites such SMax/UMax expressions
to use the lowest common multiplier for all non-constant operands.1 parent 857961d commit c3ca5fc
File tree
2 files changed
+24
-4
lines changed- llvm
- lib/Analysis
- test/Analysis/ScalarEvolution
2 files changed
+24
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15869 | 15869 | | |
15870 | 15870 | | |
15871 | 15871 | | |
| 15872 | + | |
| 15873 | + | |
15872 | 15874 | | |
15873 | 15875 | | |
15874 | 15876 | | |
15875 | 15877 | | |
15876 | | - | |
| 15878 | + | |
15877 | 15879 | | |
| 15880 | + | |
| 15881 | + | |
| 15882 | + | |
15878 | 15883 | | |
15879 | 15884 | | |
15880 | 15885 | | |
| |||
16005 | 16010 | | |
16006 | 16011 | | |
16007 | 16012 | | |
16008 | | - | |
| 16013 | + | |
| 16014 | + | |
| 16015 | + | |
| 16016 | + | |
| 16017 | + | |
| 16018 | + | |
| 16019 | + | |
| 16020 | + | |
| 16021 | + | |
| 16022 | + | |
| 16023 | + | |
| 16024 | + | |
| 16025 | + | |
| 16026 | + | |
| 16027 | + | |
| 16028 | + | |
16009 | 16029 | | |
16010 | 16030 | | |
16011 | 16031 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
64 | | - | |
| 64 | + | |
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
| |||
157 | 157 | | |
158 | 158 | | |
159 | 159 | | |
160 | | - | |
| 160 | + | |
161 | 161 | | |
162 | 162 | | |
163 | 163 | | |
| |||
0 commit comments