[Mlir-commits] [mlir] [mlir][spirv] Fix crash in ArithToSPIRV trunc-i lowering on tensor types (PR #179009)

Samarth Narang llvmlistbot at llvm.org
Mon Feb 2 07:48:50 PST 2026


================
@@ -726,15 +723,15 @@ struct ExtSIPattern final : public OpConversionPattern<arith::ExtSIOp> {
       return failure();
 
     // extSI is only meaningful for integer scalar/vector types in SPIR-V.
-    if (!isIntScalarOrVectorType(srcType))
+    if (!isScalarOrVectorOfScalar(srcType))
       return rewriter.notifyMatchFailure(
           op, "expected integer scalar or vector input type");
 
     Type dstType = getTypeConverter()->convertType(op.getType());
     if (!dstType)
       return getTypeConversionFailure(rewriter, op);
 
-    if (!isIntScalarOrVectorType(dstType))
+    if (!isScalarOrVectorOfScalar(dstType))
----------------
snarang181 wrote:

I think it would be a bug if something like tensors are supported on `arith.extsi` but most of these patterns are only for scalar/vector cases; tensors should be either unsupported or handled via other paths. 

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


More information about the Mlir-commits mailing list