[Mlir-commits] [mlir] [mlir][Vector] Teach how to materialize UB constant to Vector (PR #125596)
Andrzej WarzyĆski
llvmlistbot at llvm.org
Tue Feb 4 05:04:17 PST 2025
================
@@ -1255,8 +1255,8 @@ func.func @extract_poison_idx(%arg0: vector<16xf32>) -> f32 {
return %0 : f32
}
// CHECK-LABEL: @extract_poison_idx
-// CHECK: %[[IDX:.*]] = llvm.mlir.constant(-1 : i64) : i64
-// CHECK: llvm.extractelement {{.*}}[%[[IDX]] : i64] : vector<16xf32>
+// CHECK: %[[UB:.*]] = ub.poison : f32
+// CHECK: return %[[UB]] : f32
----------------
banach-space wrote:
Could you use this opportunity and rename:
* `@extract_poison_idx`, as
* `@extract_scalar_from_vec_1d_f32_poison_idx`
This way we would maintain consistent naming.
Also, is there a test with poison idx when extracting form something rank > 1?
https://github.com/llvm/llvm-project/pull/125596
More information about the Mlir-commits
mailing list