Skip to content

Commit d70f6e3

Browse files
committed
[mlir][Vector] Generate poison vectors in vector.shape_cast lowering
This is the first PR that introduces `ub.poison` vectors as part of a rewrite/conversion pattern in the Vector dialect. It replaces the `arith.constant dense<0>` vector initialization for `vector.insert_slice` ops with a poison vector. This PR depends on all the previous PRs that introduced support for poison in Vector operations such as `vector.shuffle`, `vector.extract`, `vector.insert`, including ODS, canonicalization and lowering support. This PR may improve end-to-end compilation time through LLVM, depending on the workloads.
1 parent 79e804b commit d70f6e3

5 files changed

+31
-33
lines changed

mlir/lib/Dialect/Vector/Transforms/LowerVectorShapeCast.cpp

+5-10
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
//
1212
//===----------------------------------------------------------------------===//
1313

14-
#include "mlir/Dialect/Arith/IR/Arith.h"
1514
#include "mlir/Dialect/MemRef/IR/MemRef.h"
15+
#include "mlir/Dialect/UB//IR/UBOps.h"
1616
#include "mlir/Dialect/Vector/IR/VectorOps.h"
1717
#include "mlir/Dialect/Vector/Transforms/LoweringPatterns.h"
1818
#include "mlir/Dialect/Vector/Transforms/VectorRewritePatterns.h"
@@ -73,8 +73,7 @@ class ShapeCastOpNDDownCastRewritePattern
7373
SmallVector<int64_t> srcIdx(srcRank - 1, 0);
7474
SmallVector<int64_t> resIdx(resRank, 0);
7575
int64_t extractSize = sourceVectorType.getShape().back();
76-
Value result = rewriter.create<arith::ConstantOp>(
77-
loc, resultVectorType, rewriter.getZeroAttr(resultVectorType));
76+
Value result = rewriter.create<ub::PoisonOp>(loc, resultVectorType);
7877

7978
// Compute the indices of each 1-D vector element of the source extraction
8079
// and destination slice insertion and generate such instructions.
@@ -129,8 +128,7 @@ class ShapeCastOpNDUpCastRewritePattern
129128
SmallVector<int64_t> srcIdx(srcRank, 0);
130129
SmallVector<int64_t> resIdx(resRank - 1, 0);
131130
int64_t extractSize = resultVectorType.getShape().back();
132-
Value result = rewriter.create<arith::ConstantOp>(
133-
loc, resultVectorType, rewriter.getZeroAttr(resultVectorType));
131+
Value result = rewriter.create<ub::PoisonOp>(loc, resultVectorType);
134132
for (int64_t i = 0; i < numElts; ++i) {
135133
if (i != 0) {
136134
incIdx(srcIdx, sourceVectorType, /*step=*/extractSize);
@@ -184,8 +182,7 @@ class ShapeCastOpRewritePattern : public OpRewritePattern<vector::ShapeCastOp> {
184182
// within the source and result shape.
185183
SmallVector<int64_t> srcIdx(srcRank, 0);
186184
SmallVector<int64_t> resIdx(resRank, 0);
187-
Value result = rewriter.create<arith::ConstantOp>(
188-
loc, resultVectorType, rewriter.getZeroAttr(resultVectorType));
185+
Value result = rewriter.create<ub::PoisonOp>(loc, resultVectorType);
189186
for (int64_t i = 0; i < numElts; i++) {
190187
if (i != 0) {
191188
incIdx(srcIdx, sourceVectorType);
@@ -291,9 +288,7 @@ class ScalableShapeCastOpRewritePattern
291288
auto extractionVectorType = VectorType::get(
292289
{minExtractionSize}, sourceVectorType.getElementType(), {true});
293290

294-
Value result = rewriter.create<arith::ConstantOp>(
295-
loc, resultVectorType, rewriter.getZeroAttr(resultVectorType));
296-
291+
Value result = rewriter.create<ub::PoisonOp>(loc, resultVectorType);
297292
SmallVector<int64_t> srcIdx(srcRank, 0);
298293
SmallVector<int64_t> resIdx(resRank, 0);
299294

mlir/test/Conversion/ConvertToSPIRV/vector-unroll.mlir

+7-4
Original file line numberDiff line numberDiff line change
@@ -83,17 +83,20 @@ func.func @vaddi_reduction(%arg0 : vector<8xi32>, %arg1 : vector<8xi32>) -> (i32
8383
// CHECK-LABEL: @transpose
8484
// CHECK-SAME: (%[[ARG0:.+]]: vector<3xi32>, %[[ARG1:.+]]: vector<3xi32>)
8585
func.func @transpose(%arg0 : vector<2x3xi32>) -> (vector<3x2xi32>) {
86-
// CHECK: %[[CST:.*]] = arith.constant dense<0> : vector<2xi32>
86+
// CHECK: %[[CST:.*]] = ub.poison : vector<1x2xi32>
8787
// CHECK: %[[EXTRACT0:.*]] = vector.extract %[[ARG0]][0] : i32 from vector<3xi32>
88-
// CHECK: %[[INSERT0:.*]]= vector.insert %[[EXTRACT0]], %[[CST]] [0] : i32 into vector<2xi32>
88+
// CHECK: %[[CST1:.*]] = vector.extract %[[CST]][0] : vector<2xi32> from vector<1x2xi32>
89+
// CHECK: %[[INSERT0:.*]]= vector.insert %[[EXTRACT0]], %[[CST1]] [0] : i32 into vector<2xi32>
8990
// CHECK: %[[EXTRACT1:.*]] = vector.extract %[[ARG1]][0] : i32 from vector<3xi32>
9091
// CHECK: %[[INSERT1:.*]] = vector.insert %[[EXTRACT1]], %[[INSERT0]][1] : i32 into vector<2xi32>
9192
// CHECK: %[[EXTRACT2:.*]] = vector.extract %[[ARG0]][1] : i32 from vector<3xi32>
92-
// CHECK: %[[INSERT2:.*]] = vector.insert %[[EXTRACT2]], %[[CST]] [0] : i32 into vector<2xi32>
93+
// CHECK: %[[CST2:.*]] = vector.extract %[[CST]][0] : vector<2xi32> from vector<1x2xi32>
94+
// CHECK: %[[INSERT2:.*]] = vector.insert %[[EXTRACT2]], %[[CST2]] [0] : i32 into vector<2xi32>
9395
// CHECK: %[[EXTRACT3:.*]] = vector.extract %[[ARG1]][1] : i32 from vector<3xi32>
9496
// CHECK: %[[INSERT3:.*]] = vector.insert %[[EXTRACT3]], %[[INSERT2]] [1] : i32 into vector<2xi32>
9597
// CHECK: %[[EXTRACT4:.*]] = vector.extract %[[ARG0]][2] : i32 from vector<3xi32>
96-
// CHECK: %[[INSERT4:.*]] = vector.insert %[[EXTRACT4]], %[[CST]] [0] : i32 into vector<2xi32>
98+
// CHECK: %[[CST3:.*]] = vector.extract %[[CST]][0] : vector<2xi32> from vector<1x2xi32>
99+
// CHECK: %[[INSERT4:.*]] = vector.insert %[[EXTRACT4]], %[[CST3]] [0] : i32 into vector<2xi32>
97100
// CHECK: %[[EXTRACT5:.*]] = vector.extract %[[ARG1]][2] : i32 from vector<3xi32>
98101
// CHECK: %[[INSERT5:.*]] = vector.insert %[[EXTRACT5]], %[[INSERT4]] [1] : i32 into vector<2xi32>
99102
// CHECK: return %[[INSERT1]], %[[INSERT3]], %[[INSERT5]] : vector<2xi32>, vector<2xi32>, vector<2xi32>

mlir/test/Dialect/Vector/vector-contract-to-matrix-intrinsics-transforms.mlir

+3-3
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@
1414
// CHECK-SAME: %[[A:[a-zA-Z0-9]*]]: vector<2x4xf32>,
1515
// CHECK-SAME: %[[B:[a-zA-Z0-9]*]]: vector<4x3xf32>,
1616
// CHECK-SAME: %[[C:[a-zA-Z0-9]*]]: vector<2x3xf32>
17-
// CHECK-DAG: %[[vcst:.*]] = arith.constant dense<0.000000e+00> : vector<8xf32>
18-
// CHECK-DAG: %[[vcst_0:.*]] = arith.constant dense<0.000000e+00> : vector<12xf32>
19-
// CHECK-DAG: %[[vcst_1:.*]] = arith.constant dense<0.000000e+00> : vector<2x3xf32>
17+
// CHECK-DAG: %[[vcst:.*]] = ub.poison : vector<8xf32>
18+
// CHECK-DAG: %[[vcst_0:.*]] = ub.poison : vector<12xf32>
19+
// CHECK-DAG: %[[vcst_1:.*]] = ub.poison : vector<2x3xf32>
2020
// CHECK: %[[a0:.*]] = vector.extract %[[A]][0] : vector<4xf32> from vector<2x4xf32>
2121
// CHECK: %[[a1:.*]] = vector.insert_strided_slice %[[a0]], %[[vcst]] {offsets = [0], strides = [1]} : vector<4xf32> into vector<8xf32>
2222
// CHECK: %[[a2:.*]] = vector.extract %[[A]][1] : vector<4xf32> from vector<2x4xf32>

mlir/test/Dialect/Vector/vector-shape-cast-lowering-scalable-vectors.mlir

+9-9
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
// CHECK-SAME: %[[arg0:.*]]: vector<2x1x[4]xi32>
88
func.func @i32_3d_to_1d_last_dim_scalable(%arg0: vector<2x1x[4]xi32>) -> vector<[8]xi32>
99
{
10-
// CHECK-NEXT: %[[cst:.*]] = arith.constant dense<0> : vector<[8]xi32>
10+
// CHECK-NEXT: %[[cst:.*]] = ub.poison : vector<[8]xi32>
1111
// CHECK-NEXT: %[[subvec0:.*]] = vector.extract %[[arg0]][0, 0] : vector<[4]xi32> from vector<2x1x[4]xi32>
1212
// CHECK-NEXT: %[[res0:.*]] = vector.scalable.insert %[[subvec0]], %[[cst]][0] : vector<[4]xi32> into vector<[8]xi32>
1313
// CHECK-NEXT: %[[subvec1:.*]] = vector.extract %[[arg0]][1, 0] : vector<[4]xi32> from vector<2x1x[4]xi32>
@@ -22,7 +22,7 @@ func.func @i32_3d_to_1d_last_dim_scalable(%arg0: vector<2x1x[4]xi32>) -> vector<
2222
// CHECK-LABEL: i32_1d_to_3d_last_dim_scalable
2323
// CHECK-SAME: %[[arg0:.*]]: vector<[8]xi32>
2424
func.func @i32_1d_to_3d_last_dim_scalable(%arg0: vector<[8]xi32>) -> vector<2x1x[4]xi32> {
25-
// CHECK-NEXT: %[[cst:.*]] = arith.constant dense<0> : vector<2x1x[4]xi32>
25+
// CHECK-NEXT: %[[cst:.*]] = ub.poison : vector<2x1x[4]xi32>
2626
// CHECK-NEXT: %[[subvec0:.*]] = vector.scalable.extract %[[arg0]][0] : vector<[4]xi32> from vector<[8]xi32>
2727
// CHECK-NEXT: %[[res0:.*]] = vector.insert %[[subvec0]], %[[cst]] [0, 0] : vector<[4]xi32> into vector<2x1x[4]xi32>
2828
// CHECK-NEXT: %[[subvec1:.*]] = vector.scalable.extract %[[arg0]][4] : vector<[4]xi32> from vector<[8]xi32>
@@ -37,7 +37,7 @@ func.func @i32_1d_to_3d_last_dim_scalable(%arg0: vector<[8]xi32>) -> vector<2x1x
3737
// CHECK-LABEL: i8_2d_to_1d_last_dim_scalable
3838
// CHECK-SAME: %[[arg0:.*]]: vector<4x[8]xi8>
3939
func.func @i8_2d_to_1d_last_dim_scalable(%arg0: vector<4x[8]xi8>) -> vector<[32]xi8> {
40-
// CHECK-NEXT: %[[cst:.*]] = arith.constant dense<0> : vector<[32]xi8>
40+
// CHECK-NEXT: %[[cst:.*]] = ub.poison : vector<[32]xi8>
4141
// CHECK-NEXT: %[[subvec0:.*]] = vector.extract %[[arg0]][0] : vector<[8]xi8> from vector<4x[8]xi8>
4242
// CHECK-NEXT: %[[res0:.*]] = vector.scalable.insert %[[subvec0]], %[[cst]][0] : vector<[8]xi8> into vector<[32]xi8>
4343
// CHECK-NEXT: %[[subvec1:.*]] = vector.extract %[[arg0]][1] : vector<[8]xi8> from vector<4x[8]xi8>
@@ -56,7 +56,7 @@ func.func @i8_2d_to_1d_last_dim_scalable(%arg0: vector<4x[8]xi8>) -> vector<[32]
5656
// CHECK-LABEL: i8_1d_to_2d_last_dim_scalable
5757
// CHECK-SAME: %[[arg0:.*]]: vector<[32]xi8>
5858
func.func @i8_1d_to_2d_last_dim_scalable(%arg0: vector<[32]xi8>) -> vector<4x[8]xi8> {
59-
// CHECK-NEXT: %[[cst:.*]] = arith.constant dense<0> : vector<4x[8]xi8>
59+
// CHECK-NEXT: %[[cst:.*]] = ub.poison : vector<4x[8]xi8>
6060
// CHECK-NEXT: %[[subvec0:.*]] = vector.scalable.extract %[[arg0]][0] : vector<[8]xi8> from vector<[32]xi8>
6161
// CHECK-NEXT: %[[res0:.*]] = vector.insert %[[subvec0]], %[[cst]] [0] : vector<[8]xi8> into vector<4x[8]xi8>
6262
// CHECK-NEXT: %[[subvec1:.*]] = vector.scalable.extract %[[arg0]][8] : vector<[8]xi8> from vector<[32]xi8>
@@ -75,7 +75,7 @@ func.func @i8_1d_to_2d_last_dim_scalable(%arg0: vector<[32]xi8>) -> vector<4x[8]
7575
// CHECK-LABEL: f32_permute_leading_non_scalable_dims
7676
// CHECK-SAME: %[[arg0:.*]]: vector<2x3x[4]xf32>
7777
func.func @f32_permute_leading_non_scalable_dims(%arg0: vector<2x3x[4]xf32>) -> vector<3x2x[4]xf32> {
78-
// CHECK-NEXT: %[[cst:.*]] = arith.constant dense<0.000000e+00> : vector<3x2x[4]xf32>
78+
// CHECK-NEXT: %[[cst:.*]] = ub.poison : vector<3x2x[4]xf32>
7979
// CHECK-NEXT: %[[subvec0:.*]] = vector.extract %[[arg0]][0, 0] : vector<[4]xf32> from vector<2x3x[4]xf32>
8080
// CHECK-NEXT: %[[res0:.*]] = vector.insert %[[subvec0]], %[[cst]] [0, 0] : vector<[4]xf32> into vector<3x2x[4]xf32>
8181
// CHECK-NEXT: %[[subvec1:.*]] = vector.extract %[[arg0]][0, 1] : vector<[4]xf32> from vector<2x3x[4]xf32>
@@ -99,7 +99,7 @@ func.func @f32_permute_leading_non_scalable_dims(%arg0: vector<2x3x[4]xf32>) ->
9999
// CHECK-SAME: %[[arg0:.*]]: vector<2x2x[2]xf64>
100100
func.func @f64_flatten_leading_non_scalable_dims(%arg0: vector<2x2x[2]xf64>) -> vector<4x[2]xf64>
101101
{
102-
// CHECK-NEXT: %[[cst:.*]] = arith.constant dense<0.000000e+00> : vector<4x[2]xf64>
102+
// CHECK-NEXT: %[[cst:.*]] = ub.poison : vector<4x[2]xf64>
103103
// CHECK-NEXT: %[[subvec0:.*]] = vector.extract %[[arg0]][0, 0] : vector<[2]xf64> from vector<2x2x[2]xf64>
104104
// CHECK-NEXT: %[[res0:.*]] = vector.insert %[[subvec0]], %[[cst]] [0] : vector<[2]xf64> into vector<4x[2]xf64>
105105
// CHECK-NEXT: %[[subvec1:.*]] = vector.extract %[[arg0]][0, 1] : vector<[2]xf64> from vector<2x2x[2]xf64>
@@ -109,7 +109,7 @@ func.func @f64_flatten_leading_non_scalable_dims(%arg0: vector<2x2x[2]xf64>) ->
109109
// CHECK-NEXT: %[[subvec3:.*]] = vector.extract %[[arg0]][1, 1] : vector<[2]xf64> from vector<2x2x[2]xf64>
110110
// CHECK-NEXT: %[[res3:.*]] = vector.insert %[[subvec3]], %[[res2]] [3] : vector<[2]xf64> into vector<4x[2]xf64>
111111
%res = vector.shape_cast %arg0: vector<2x2x[2]xf64> to vector<4x[2]xf64>
112-
// CHECK-NEXT: return %7 : vector<4x[2]xf64>
112+
// CHECK-NEXT: return %[[res3:.*]] : vector<4x[2]xf64>
113113
return %res : vector<4x[2]xf64>
114114
}
115115

@@ -119,7 +119,7 @@ func.func @f64_flatten_leading_non_scalable_dims(%arg0: vector<2x2x[2]xf64>) ->
119119
// CHECK-SAME: %[[arg0:.*]]: vector<3x[4]xf32>
120120
func.func @f32_reduce_trailing_scalable_dim(%arg0: vector<3x[4]xf32>) -> vector<6x[2]xf32>
121121
{
122-
// CHECK-NEXT: %[[cst:.*]] = arith.constant dense<0.000000e+00> : vector<6x[2]xf32>
122+
// CHECK-NEXT: %[[cst:.*]] = ub.poison : vector<6x[2]xf32>
123123
// CHECK-NEXT: %[[srcvec0:.*]] = vector.extract %[[arg0]][0] : vector<[4]xf32> from vector<3x[4]xf32>
124124
// CHECK-NEXT: %[[subvec0:.*]] = vector.scalable.extract %[[srcvec0]][0] : vector<[2]xf32> from vector<[4]xf32>
125125
// CHECK-NEXT: %[[res0:.*]] = vector.insert %[[subvec0]], %[[cst]] [0] : vector<[2]xf32> into vector<6x[2]xf32>
@@ -146,7 +146,7 @@ func.func @f32_reduce_trailing_scalable_dim(%arg0: vector<3x[4]xf32>) -> vector<
146146
// CHECK-SAME: %[[arg0:.*]]: vector<4x[2]xf32>
147147
func.func @f32_increase_trailing_scalable_dim(%arg0: vector<4x[2]xf32>) -> vector<2x[4]xf32>
148148
{
149-
// CHECK-NEXT: %[[cst:.*]] = arith.constant dense<0.000000e+00> : vector<2x[4]xf32>
149+
// CHECK-NEXT: %[[cst:.*]] = ub.poison : vector<2x[4]xf32>
150150
// CHECK-NEXT: %[[subvec0:.*]] = vector.extract %[[arg0]][0] : vector<[2]xf32> from vector<4x[2]xf32>
151151
// CHECK-NEXT: %[[resvec0:.*]] = vector.extract %[[cst]][0] : vector<[4]xf32> from vector<2x[4]xf32>
152152
// CHECK-NEXT: %[[resvec1:.*]] = vector.scalable.insert %[[subvec0]], %[[resvec0]][0] : vector<[2]xf32> into vector<[4]xf32>

mlir/test/Dialect/Vector/vector-shape-cast-lowering-transforms.mlir

+7-7
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ func.func @cancel_shape_cast(%arg0: vector<16xf32>) -> vector<16xf32> {
2222
// llvm.matrix operations
2323
// CHECK-LABEL: func @shape_casts
2424
func.func @shape_casts(%a: vector<2x2xf32>) -> (vector<4xf32>, vector<2x2xf32>) {
25-
// CHECK-DAG: %[[cst22:.*]] = arith.constant dense<0.000000e+00> : vector<2x2xf32>
26-
// CHECK-DAG: %[[cst:.*]] = arith.constant dense<0.000000e+00> : vector<4xf32>
25+
// CHECK-DAG: %[[cst22:.*]] = ub.poison : vector<2x2xf32>
26+
// CHECK-DAG: %[[cst:.*]] = ub.poison : vector<4xf32>
2727
// CHECK: %[[ex0:.*]] = vector.extract %{{.*}}[0] : vector<2xf32> from vector<2x2xf32>
2828
//
2929
// CHECK: %[[in0:.*]] = vector.insert_strided_slice %[[ex0]], %[[cst]]
@@ -59,7 +59,7 @@ func.func @shape_casts(%a: vector<2x2xf32>) -> (vector<4xf32>, vector<2x2xf32>)
5959

6060
// CHECK-LABEL: func @shape_cast_2d2d
6161
// CHECK-SAME: %[[A:.*]]: vector<3x2xf32>
62-
// CHECK: %[[C:.*]] = arith.constant dense<0.000000e+00> : vector<2x3xf32>
62+
// CHECK: %[[C:.*]] = ub.poison : vector<2x3xf32>
6363
// CHECK: %[[T0:.*]] = vector.extract %[[A]][0, 0] : f32 from vector<3x2xf32>
6464
// CHECK: %[[T1:.*]] = vector.insert %[[T0]], %[[C]] [0, 0] : f32 into vector<2x3xf32>
6565
// CHECK: %[[T2:.*]] = vector.extract %[[A]][0, 1] : f32 from vector<3x2xf32>
@@ -81,7 +81,7 @@ func.func @shape_cast_2d2d(%arg0 : vector<3x2xf32>) -> vector<2x3xf32> {
8181

8282
// CHECK-LABEL: func @shape_cast_3d1d
8383
// CHECK-SAME: %[[A:.*]]: vector<1x3x2xf32>
84-
// CHECK: %[[C:.*]] = arith.constant dense<0.000000e+00> : vector<6xf32>
84+
// CHECK: %[[C:.*]] = ub.poison : vector<6xf32>
8585
// CHECK: %[[T0:.*]] = vector.extract %[[A]][0, 0] : vector<2xf32> from vector<1x3x2xf32>
8686
// CHECK: %[[T1:.*]] = vector.insert_strided_slice %[[T0]], %[[C]]
8787
// CHECK-SAME: {offsets = [0], strides = [1]} : vector<2xf32> into vector<6xf32>
@@ -100,7 +100,7 @@ func.func @shape_cast_3d1d(%arg0 : vector<1x3x2xf32>) -> vector<6xf32> {
100100

101101
// CHECK-LABEL: func @shape_cast_1d3d
102102
// CHECK-SAME: %[[A:.*]]: vector<6xf32>
103-
// CHECK: %[[C:.*]] = arith.constant dense<0.000000e+00> : vector<2x1x3xf32>
103+
// CHECK: %[[C:.*]] = ub.poison : vector<2x1x3xf32>
104104
// CHECK: %[[T0:.*]] = vector.extract_strided_slice %[[A]]
105105
// CHECK-SAME: {offsets = [0], sizes = [3], strides = [1]} : vector<6xf32> to vector<3xf32>
106106
// CHECK: %[[T1:.*]] = vector.insert %[[T0]], %[[C]] [0, 0] : vector<3xf32> into vector<2x1x3xf32>
@@ -116,7 +116,7 @@ func.func @shape_cast_1d3d(%arg0 : vector<6xf32>) -> vector<2x1x3xf32> {
116116

117117
// CHECK-LABEL: func.func @shape_cast_0d1d(
118118
// CHECK-SAME: %[[VAL_0:.*]]: vector<f32>) -> vector<1xf32> {
119-
// CHECK: %[[VAL_1:.*]] = arith.constant dense<0.000000e+00> : vector<1xf32>
119+
// CHECK: %[[VAL_1:.*]] = ub.poison : vector<1xf32>
120120
// CHECK: %[[VAL_2:.*]] = vector.extractelement %[[VAL_0]][] : vector<f32>
121121
// CHECK: %[[VAL_3:.*]] = vector.insert %[[VAL_2]], %[[VAL_1]] [0] : f32 into vector<1xf32>
122122
// CHECK: return %[[VAL_3]] : vector<1xf32>
@@ -129,7 +129,7 @@ func.func @shape_cast_0d1d(%arg0 : vector<f32>) -> vector<1xf32> {
129129

130130
// CHECK-LABEL: func.func @shape_cast_1d0d(
131131
// CHECK-SAME: %[[VAL_0:.*]]: vector<1xf32>) -> vector<f32> {
132-
// CHECK: %[[VAL_1:.*]] = arith.constant dense<0.000000e+00> : vector<f32>
132+
// CHECK: %[[VAL_1:.*]] = ub.poison : vector<f32>
133133
// CHECK: %[[VAL_2:.*]] = vector.extract %[[VAL_0]][0] : f32 from vector<1xf32>
134134
// CHECK: %[[VAL_3:.*]] = vector.insertelement %[[VAL_2]], %[[VAL_1]][] : vector<f32>
135135
// CHECK: return %[[VAL_3]] : vector<f32>

0 commit comments

Comments
 (0)