Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[mlir][Arith] Fix up integer range inference for truncation
Attempting to apply the range analysis to real code revealed that trunci wasn't correctly handling the case where truncation would create wider ranges - for example, if we truncate [255, 257] : i16 to i8, the result can be 255, 0, or 1, which isn't a contiguous range of values. The previous implementation would naively map this to [255, 1], which would cause issues with unsigned ranges and unification. Reviewed By: Mogball Differential Revision: https://reviews.llvm.org/D130501
- Loading branch information
Showing
2 changed files
with
106 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters