[Mlir-commits] [mlir] [mlir][ArithToSPIRV] Fix crash on tensor arith.uitofp/sitofp lowering (PR #227102)
Vinicius Silva
llvmlistbot at llvm.org
Tue Sep 29 05:00:33 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))) {
----------------
viniciusfdasilva wrote:
It works! Thanks!
https://github.com/llvm/llvm-project/pull/227102
More information about the Mlir-commits
mailing list