[Mlir-commits] [mlir] [MLIR][Vector] Fix i32 overflow in vector mask lowering for large index bounds (PR #188782)
Andrzej WarzyĆski
llvmlistbot at llvm.org
Thu Apr 16 03:18:02 PDT 2026
banach-space wrote:
> > What you did makes sense to me, but I would avoid special-casing for scalable vectors and just use INT32_MAX everywhere. For consistency.
>
> Isn't that making the non-scalable path less precise? The current implementation provides a tighter bound for the non-scalable case, which can be exploited by integer-range analysis or other simplifications.
If we hit issues with integer-range analysis then we can always relax the fix.
While I appreciate the fix, IMHO this is correcting code in cases that seem unrealistic to me. As in, if we ever hit this case in practice, I feel that it would merely be a manifestation of a much more serious issues elsewhere, higher up in the compilation stack. Hence my preference to keep things simple.
The current approach is fine with me - I just wanted to share my opinion should we encounter more cases like this. Thanks again!
https://github.com/llvm/llvm-project/pull/188782
More information about the Mlir-commits
mailing list