[Mlir-commits] [mlir] [mlir][ArithToSPIRV] Fix crash on tensor arith.uitofp/sitofp lowering (PR #227102)
Igor Wodiany
llvmlistbot at llvm.org
Fri Oct 2 02:52:13 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:
I didn't mean it as a fix. It was just a suggestion to move the `!srcType` part of the fix into `if (!srcType || isBoolScalarOrVector(srcType))`. You'd still need the element check regardless. Checking `srcType` before `isBoolScalarOrVector` would prevent hitting an assert there if `srcType` is missing.
https://github.com/llvm/llvm-project/pull/227102
More information about the Mlir-commits
mailing list