Commit 12e1f40
committed
Allow folding icmp eq (add X, C2), C when there is more than one-use when we can compute the range
If there are multiple uses of an add, we can fold a comparison anyway if we can compute a constant range for it, which should happen in cases such as saturated add.1 parent 1c0705f commit 12e1f40
File tree
6 files changed
+22
-41
lines changed- llvm
- lib/Transforms/InstCombine
- test
- Analysis/ValueTracking
- Transforms
- InstCombine
- LoopVectorize
- PhaseOrdering
6 files changed
+22
-41
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3160 | 3160 | | |
3161 | 3161 | | |
3162 | 3162 | | |
3163 | | - | |
| 3163 | + | |
3164 | 3164 | | |
3165 | 3165 | | |
3166 | 3166 | | |
| |||
3184 | 3184 | | |
3185 | 3185 | | |
3186 | 3186 | | |
3187 | | - | |
3188 | | - | |
| 3187 | + | |
| 3188 | + | |
| 3189 | + | |
3189 | 3190 | | |
3190 | 3191 | | |
3191 | 3192 | | |
| |||
3205 | 3206 | | |
3206 | 3207 | | |
3207 | 3208 | | |
| 3209 | + | |
| 3210 | + | |
| 3211 | + | |
3208 | 3212 | | |
3209 | 3213 | | |
3210 | 3214 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1119 | 1119 | | |
1120 | 1120 | | |
1121 | 1121 | | |
1122 | | - | |
| 1122 | + | |
1123 | 1123 | | |
1124 | 1124 | | |
1125 | 1125 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2352 | 2352 | | |
2353 | 2353 | | |
2354 | 2354 | | |
2355 | | - | |
2356 | | - | |
2357 | | - | |
| 2355 | + | |
2358 | 2356 | | |
2359 | 2357 | | |
2360 | 2358 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
158 | 158 | | |
159 | 159 | | |
160 | 160 | | |
161 | | - | |
| 161 | + | |
162 | 162 | | |
163 | 163 | | |
164 | 164 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3183 | 3183 | | |
3184 | 3184 | | |
3185 | 3185 | | |
3186 | | - | |
| 3186 | + | |
3187 | 3187 | | |
3188 | 3188 | | |
3189 | 3189 | | |
| |||
3225 | 3225 | | |
3226 | 3226 | | |
3227 | 3227 | | |
3228 | | - | |
| 3228 | + | |
3229 | 3229 | | |
3230 | 3230 | | |
3231 | 3231 | | |
| |||
3315 | 3315 | | |
3316 | 3316 | | |
3317 | 3317 | | |
3318 | | - | |
| 3318 | + | |
3319 | 3319 | | |
3320 | 3320 | | |
3321 | 3321 | | |
| |||
5399 | 5399 | | |
5400 | 5400 | | |
5401 | 5401 | | |
5402 | | - | |
| 5402 | + | |
5403 | 5403 | | |
5404 | 5404 | | |
5405 | 5405 | | |
| |||
Lines changed: 8 additions & 29 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
96 | 96 | | |
97 | 97 | | |
98 | 98 | | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | | - | |
103 | | - | |
104 | | - | |
105 | | - | |
106 | | - | |
107 | | - | |
108 | | - | |
109 | | - | |
110 | | - | |
111 | | - | |
112 | | - | |
113 | | - | |
114 | | - | |
115 | | - | |
116 | | - | |
117 | | - | |
118 | | - | |
119 | | - | |
120 | | - | |
121 | | - | |
122 | | - | |
123 | | - | |
124 | | - | |
125 | | - | |
126 | | - | |
127 | | - | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
128 | 103 | | |
129 | 104 | | |
130 | 105 | | |
| |||
182 | 157 | | |
183 | 158 | | |
184 | 159 | | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
0 commit comments