[Mlir-commits] [mlir] [mlir][ArithToSPIRV] Fix crash on tensor arith.uitofp/sitofp lowering (PR #227102)

Igor Wodiany llvmlistbot at llvm.org
Wed Sep 30 02:49:33 PDT 2026


================
@@ -731,6 +731,14 @@ struct IntToFPPattern final : public OpConversionPattern<ArithOp> {
     // Check if the source integer type was widened during type conversion.
     unsigned originalBitwidth =
         getElementTypeOrSelf(op.getIn().getType()).getIntOrFloatBitWidth();
+
+    if (!srcType ||
----------------
IgWod wrote:

Don't think we need it here as `isBoolScalarOrVector` would already assert when `srcType` is `null`. Actually we probably should check it there: `if (!srcType || isBoolScalarOrVector(srcType))`

https://github.com/llvm/llvm-project/pull/227102


More information about the Mlir-commits mailing list