[Mlir-commits] [mlir] [mlir][spirv] Fix crash in ArithToSPIRV trunc-i lowering on tensor types (PR #179009)
Jakub Kuderski
llvmlistbot at llvm.org
Mon Feb 2 09:49:30 PST 2026
================
@@ -708,13 +728,20 @@ struct ExtSIPattern final : public OpConversionPattern<arith::ExtSIOp> {
matchAndRewrite(arith::ExtSIOp op, OpAdaptor adaptor,
ConversionPatternRewriter &rewriter) const override {
Type srcType = adaptor.getIn().getType();
- if (isBoolScalarOrVector(srcType))
- return failure();
+
+ // extSI is only meaningful for integer scalar/vector types in SPIR-V.
+ if (!isScalarOrVectorOfScalar(srcType, /*excludeBool=*/true))
+ return rewriter.notifyMatchFailure(
+ op, "expected integer scalar or vector input type");
Type dstType = getTypeConverter()->convertType(op.getType());
----------------
kuhar wrote:
I still don't understand why the type converter would ever return a tensor type -- do you know if it's like this on purpose?
https://github.com/llvm/llvm-project/pull/179009
More information about the Mlir-commits
mailing list