[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
Please sign in to comment