[Mlir-commits] [mlir] [mlir][vector] Fix crash in vector.from_elements folding with poison values (PR #158528)

Diego Caballero llvmlistbot at llvm.org
Wed Sep 17 11:07:48 PDT 2025


================
@@ -3375,6 +3375,42 @@ func.func @negative_from_elements_to_constant() -> vector<1x!llvm.ptr> {
   return %b : vector<1x!llvm.ptr>
 }
 
+// -----
+
+// CHECK-LABEL: @negative_from_elements_poison
+//       CHECK:   %[[VAL:.*]] = ub.poison : vector<2xf32>
+//       CHECK:   return %[[VAL]] : vector<2xf32>
+func.func @negative_from_elements_poison_f32() -> vector<2xf32> {
----------------
dcaballe wrote:

this isn't "negative", right? The canonicalization is happening?

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


More information about the Mlir-commits mailing list