[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:35 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 ||
+ !(isa<IntegerType, FloatType>(getElementTypeOrSelf(srcType)) ||
+ isa<VectorType>(srcType))) {
----------------
IgWod wrote:
Do we need this part of the check? If we hit it, it would mean element type is neither int nor float and that would still allow the code below to crash, no?
https://github.com/llvm/llvm-project/pull/227102
More information about the Mlir-commits
mailing list