[Mlir-commits] [mlir] [MLIR][Arith] Fix index_cast/index_castui chain folding to check intermediate width (PR #189042)
Mehdi Amini
llvmlistbot at llvm.org
Sat Mar 28 02:35:18 PDT 2026
================
@@ -1909,6 +1909,15 @@ OpFoldResult arith::FPToSIOp::fold(FoldAdaptor adaptor) {
// IndexCastOp
//===----------------------------------------------------------------------===//
+/// Return the bit-width of \p t for the purpose of index_cast width checks.
+/// For vector types use the element type; index maps to its internal storage
+/// width (64 on all current targets).
----------------
joker-eph wrote:
So seems like I could just merge this as-is for now? Until we decide on a more principled approach to handle index types, this seems like a reasonable step right?
https://github.com/llvm/llvm-project/pull/189042
More information about the Mlir-commits
mailing list