[Mlir-commits] [mlir] [mlir][ArithToSPIRV] Fix crash on tensor arith.uitofp/sitofp lowering (PR #227102)
Igor Wodiany
llvmlistbot at llvm.org
Tue Sep 29 02:02:27 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<mlir::VectorType>(srcType))) {
----------------
IgWod wrote:
```suggestion
isa<VectorType>(srcType))) {
```
Does this work?
https://github.com/llvm/llvm-project/pull/227102
More information about the Mlir-commits
mailing list