iree-org / iree

A retargetable MLIR-based machine learning compiler and runtime toolkit.
http://iree.dev/
Apache License 2.0
2.85k stars 621 forks source link

Fix util.assume.int ignoring possible zeroe values sometimes #19252

Closed krzysz00 closed 4 days ago

krzysz00 commented 4 days ago

In some cases, usually when the 0 came first, the existing code for uninoing unsigned ranges would throw away potential 0 results, leading to unwanted constant folding.

()This bug was revealed while investigating correctness issues on my GPU range ID branch.)