[Mlir-commits] [mlir] [mlir][arith] Only fold splats for static shape result types (PR #93102)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Thu May 23 10:01:49 PDT 2024


================
@@ -2950,6 +2950,14 @@ func.func @unsignedExtendConstantResource() -> tensor<i16> {
   return %ext : tensor<i16>
 }
 
+// Just checks that this doesn't crash.
+// CHECK-LABEL: @signedExtendSplatAsDynamicShape
+func.func @signedExtendSplatAsDynamicShape() -> tensor<?xi64> {
+  %splat = arith.constant dense<5> : tensor<2xi16>
+  %extsplat = arith.extsi %splat : tensor<2xi16> to tensor<?xi64>
----------------
MaheshRavishankar wrote:

That might be a different can of worms. This is an obvious things to fix for now. Maybe we should land this first.

https://github.com/llvm/llvm-project/pull/93102


More information about the Mlir-commits mailing list