[Mlir-commits] [mlir] [mlir][Vector] Generate poison vectors in vector.shape_cast lowering (PR #125613)
Jakub Kuderski
llvmlistbot at llvm.org
Wed Feb 5 06:49:28 PST 2025
================
@@ -83,17 +83,20 @@ func.func @vaddi_reduction(%arg0 : vector<8xi32>, %arg1 : vector<8xi32>) -> (i32
// CHECK-LABEL: @transpose
// CHECK-SAME: (%[[ARG0:.+]]: vector<3xi32>, %[[ARG1:.+]]: vector<3xi32>)
func.func @transpose(%arg0 : vector<2x3xi32>) -> (vector<3x2xi32>) {
- // CHECK: %[[CST:.*]] = arith.constant dense<0> : vector<2xi32>
+ // CHECK: %[[CST:.*]] = ub.poison : vector<1x2xi32>
----------------
kuhar wrote:
Ah, I must have forgotten about it 🙂
>From the commit description:
> SPIR-V doesn't have poison, but poison can be converted to undef.
This is not correct in all contests and generally not safe. IMO we should convert to something like zero constants. cc: @Hardcode84
We can enable this conversion and revisit the exact conversion strategy separately.
https://github.com/llvm/llvm-project/pull/125613
More information about the Mlir-commits
mailing list