Commit 2e612f8
authored
[MLIR][Arith] Improve accuracy of
1) We can always bound the maximum with the numerator.
- https://alive2.llvm.org/ce/z/PqHvuT
2) Even if denominator min can be zero, we can still bound the minimum
result with `lhs.umin u/ rhs.umax`.
This is similar to #110169inferDivU (#113789)1 parent a388df7 commit 2e612f8
File tree
2 files changed
+25
-6
lines changed- mlir
- lib/Interfaces/Utils
- test/Dialect/Arith
2 files changed
+25
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
298 | 298 | | |
299 | 299 | | |
300 | 300 | | |
301 | | - | |
302 | | - | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
303 | 309 | | |
304 | 310 | | |
305 | 311 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
178 | 178 | | |
179 | 179 | | |
180 | 180 | | |
181 | | - | |
182 | | - | |
| 181 | + | |
| 182 | + | |
183 | 183 | | |
184 | 184 | | |
185 | 185 | | |
| |||
190 | 190 | | |
191 | 191 | | |
192 | 192 | | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
193 | 206 | | |
194 | 207 | | |
195 | 208 | | |
| |||
271 | 284 | | |
272 | 285 | | |
273 | 286 | | |
274 | | - | |
| 287 | + | |
275 | 288 | | |
276 | 289 | | |
277 | 290 | | |
278 | 291 | | |
279 | 292 | | |
280 | | - | |
| 293 | + | |
281 | 294 | | |
282 | 295 | | |
283 | 296 | | |
| |||
0 commit comments