[Mlir-commits] [mlir] [mlir] Rectify mishandling in `InsertOpConstantFolder` causing crash with assertion when using `mlir-opt --canonicalize` (PR #88314)

Mehdi Amini llvmlistbot at llvm.org
Sat Sep 7 14:30:07 PDT 2024


================
@@ -0,0 +1,10 @@
+// RUN: mlir-opt -split-input-file -verify-diagnostics %s -canonicalize
+
+llvm.func @malloc(i64) -> !llvm.ptr
+func.func @func2(%arg0: index, %arg1: memref<13x13xi64>, %arg2: index) {
+  %cst_7 = arith.constant dense<1526248407> : vector<1xi64>
+  %1 = llvm.mlir.constant(1 : index) : i64
+  %101 = vector.insert %1, %cst_7 [0] : i64 into vector<1xi64>
+  vector.print %101 : vector<1xi64>
+  return
+}
----------------
joker-eph wrote:

Can we add this to the relevant canonicalize test that already covers this pattern and remove this file please?

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


More information about the Mlir-commits mailing list