[Mlir-commits] [mlir] [mlir][Vector] Generate poison vectors in vector.shape_cast lowering (PR #125613)

Jakub Kuderski llvmlistbot at llvm.org
Thu Feb 6 10:55:08 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: %[[UB:.*]] = ub.poison : vector<1x2xi32>
   // CHECK: %[[EXTRACT0:.*]] = vector.extract %[[ARG0]][0] : i32 from vector<3xi32>
-  // CHECK: %[[INSERT0:.*]]= vector.insert %[[EXTRACT0]], %[[CST]] [0] : i32 into vector<2xi32>
+  // CHECK: %[[UB1:.*]] = vector.extract %[[UB]][0] : vector<2xi32> from vector<1x2xi32>
----------------
kuhar wrote:

@dcaballe does this get folded when we run the canonicalizer?

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


More information about the Mlir-commits mailing list