[Mlir-commits] [mlir] [mlir][Vector] Fold `vector.extract` from poison vector (PR #126122)
Jakub Kuderski
llvmlistbot at llvm.org
Fri Feb 7 07:12:12 PST 2025
================
@@ -2886,6 +2908,37 @@ func.func @vector_insert_const_regression(%arg0: i8) -> vector<4xi8> {
return %1 : vector<4xi8>
}
+// -----
+
+// Insert a poison value shouldn't be folded as the resulting vector is not
+// fully poison.
+
+// CHECK-LABEL: @insert_scalar_poison
+func.func @insert_scalar_poison(%a: vector<4x8xf32>)
+ -> vector<4x8xf32> {
+ // CHECK-NEXT: %[[UB:.*]] = ub.poison : f32
+ // CHECK-NEXT: vector.insert %[[UB]]
----------------
kuhar wrote:
Can we check that this is returned?
https://github.com/llvm/llvm-project/pull/126122
More information about the Mlir-commits
mailing list