@@ -31,9 +31,9 @@ func.func @vectorize_nd_tensor_extract_transfer_read_basic(
31
31
// CHECK-SAME: %[[ARG1:.*]]: tensor<1x1x3xf32>
32
32
33
33
// CHECK-DAG: %[[C0:.+]] = arith.constant 0 : index
34
- // CHECK-DAG: %[[CST :.+]] = arith.constant 0.000000e+00 : f32
34
+ // CHECK-DAG: %[[PV :.+]] = ub.poison : f32
35
35
36
- // CHECK: %[[READ:.*]] = vector.transfer_read %[[ARG0]][%[[C0]], %[[C0]], %[[C0]]], %[[CST ]] {in_bounds = [true, true, true]} : tensor<3x3x3xf32>, vector<1x1x3xf32>
36
+ // CHECK: %[[READ:.*]] = vector.transfer_read %[[ARG0]][%[[C0]], %[[C0]], %[[C0]]], %[[PV ]] {in_bounds = [true, true, true]} : tensor<3x3x3xf32>, vector<1x1x3xf32>
37
37
// CHECK: vector.transfer_write %[[READ]], %[[ARG1]][%[[C0]], %[[C0]], %[[C0]]] {in_bounds = [true, true, true]} : vector<1x1x3xf32>, tensor<1x1x3xf32>
38
38
39
39
// -----
@@ -64,12 +64,12 @@ func.func @vectorize_nd_tensor_extract_transfer_read_complex(%6: tensor<45x80x16
64
64
// CHECK-SAME: %[[ARG5:.*]]: tensor<1x4xf32>) -> tensor<1x4xf32> {
65
65
66
66
// CHECK-DAG: %[[C0:.*]] = arith.constant 0 : index
67
- // CHECK-DAG: %[[CST :.*]] = arith.constant 0.000000e+00 : f32
67
+ // CHECK-DAG: %[[PV :.*]] = ub.poison : f32
68
68
// CHECK-DAG: %[[C79:.*]] = arith.constant 79 : index
69
69
// CHECK: %[[ADD1:.*]] = arith.addi %[[ARG1]], %[[ARG2]] : index
70
70
// CHECK: %[[ADD2:.*]] = arith.addi %[[ARG3]], %[[ARG4]] : index
71
71
72
- // CHECK: %[[READ:.*]] = vector.transfer_read %[[ARG0]]{{\[}}%[[ADD1]], %[[C79]], %[[ADD2]]], %[[CST ]] {in_bounds = [true, true]} : tensor<45x80x16xf32>, vector<1x4xf32>
72
+ // CHECK: %[[READ:.*]] = vector.transfer_read %[[ARG0]]{{\[}}%[[ADD1]], %[[C79]], %[[ADD2]]], %[[PV ]] {in_bounds = [true, true]} : tensor<45x80x16xf32>, vector<1x4xf32>
73
73
// CHECK: %[[WRITE:.*]] = vector.transfer_write %[[READ]], %[[ARG5]]{{\[}}%[[C0]], %[[C0]]] {in_bounds = [true, true]} : vector<1x4xf32>, tensor<1x4xf32>
74
74
// CHECK: return %[[WRITE]] : tensor<1x4xf32>
75
75
// CHECK: }
@@ -97,11 +97,11 @@ func.func @vectorize_nd_tensor_extract_with_affine_apply_contiguous(%6: tensor<8
97
97
// CHECK-SAME: %[[ARG1:.*]]: index,
98
98
// CHECK-SAME: %[[ARG2:.*]]: tensor<1x4xf32>) -> tensor<1x4xf32> {
99
99
100
- // CHECK-DAG: %[[CST :.*]] = arith.constant 0.000000e+00 : f32
100
+ // CHECK-DAG: %[[PV :.*]] = ub.poison : f32
101
101
// CHECK-DAG: %[[C0:.*]] = arith.constant 0 : index
102
102
// CHECK-DAG: %[[C79:.*]] = arith.constant 79 : index
103
103
104
- // CHECK: %[[READ:.*]] = vector.transfer_read %[[ARG0]]{{\[}}%[[C79]], %[[ARG1]]], %[[CST ]] {in_bounds = [true, true]} : tensor<80x16xf32>, vector<1x4xf32>
104
+ // CHECK: %[[READ:.*]] = vector.transfer_read %[[ARG0]]{{\[}}%[[C79]], %[[ARG1]]], %[[PV ]] {in_bounds = [true, true]} : tensor<80x16xf32>, vector<1x4xf32>
105
105
// CHECK: %[[WRITE:.*]] = vector.transfer_write %[[READ]], %[[ARG2]]{{\[}}%[[C0]], %[[C0]]] {in_bounds = [true, true]} : vector<1x4xf32>, tensor<1x4xf32>
106
106
// CHECK: return %[[WRITE]] : tensor<1x4xf32>
107
107
// CHECK: }
@@ -164,9 +164,9 @@ func.func @vectorize_nd_tensor_extract_with_maxsi_contiguous(%arg0: tensor<80x16
164
164
// CHECK-SAME: %[[VAL_1:.*]]: tensor<1x4xf32>) -> tensor<1x4xf32> {
165
165
// CHECK-DAG: %[[C0:.*]] = arith.constant 0 : index
166
166
// CHECK-DAG: %[[C16:.*]] = arith.constant 16 : index
167
- // CHECK-DAG: %[[CST :.*]] = arith.constant 0.000000e+00 : f32
167
+ // CHECK-DAG: %[[PV :.*]] = ub.poison : f32
168
168
169
- // CHECK: %[[VAL_8:.*]] = vector.transfer_read %[[VAL_0]]{{\[}}%[[C16]], %[[C0]]], %[[CST ]] {in_bounds = [true, true]} : tensor<80x16xf32>, vector<1x4xf32>
169
+ // CHECK: %[[VAL_8:.*]] = vector.transfer_read %[[VAL_0]]{{\[}}%[[C16]], %[[C0]]], %[[PV ]] {in_bounds = [true, true]} : tensor<80x16xf32>, vector<1x4xf32>
170
170
// CHECK: %[[VAL_9:.*]] = vector.transfer_write %[[VAL_8]], %[[VAL_1]]{{\[}}%[[C0]], %[[C0]]] {in_bounds = [true, true]} : vector<1x4xf32>, tensor<1x4xf32>
171
171
// CHECK: return %[[VAL_9]] : tensor<1x4xf32>
172
172
// CHECK: }
@@ -229,12 +229,12 @@ func.func @vectorize_nd_tensor_extract_index_from_tensor(%arg0: tensor<3x3xf32>,
229
229
// CHECK-SAME: %[[ARG3:.*]]: tensor<4x7x2xf32>
230
230
// CHECK-SAME: %[[ARG4:.*]]: tensor<4x7x3x2xf32>
231
231
// CHECK-DAG: %[[C0:.*]] = arith.constant 0 : index
232
- // CHECK-DAG: %[[C0_i32 :.*]] = arith.constant 0 : i32
232
+ // CHECK-DAG: %[[PV :.*]] = ub.poison : i32
233
233
// CHECK-DAG: %[[CST:.*]] = arith.constant dense<3> : vector<7x2x4x3xindex>
234
234
// CHECK-DAG: %[[CST_1:.*]] = arith.constant dense<true> : vector<4x7x3x2xi1>
235
235
// CHECK-DAG: %[[PASSTHRU:.*]] = arith.constant dense<0.000000e+00> : vector<4x7x3x2xf32>
236
- // CHECK: %[[V0:.*]] = vector.transfer_read %[[ARG1]][%[[C0]], %[[C0]]], %[[C0_i32 ]] {in_bounds = [true, true]} : tensor<4x3xi32>, vector<4x3xi32>
237
- // CHECK: %[[V1:.*]] = vector.transfer_read %[[ARG2]][%[[C0]], %[[C0]]], %[[C0_i32 ]] {in_bounds = [true, true]} : tensor<4x3xi32>, vector<4x3xi32>
236
+ // CHECK: %[[V0:.*]] = vector.transfer_read %[[ARG1]][%[[C0]], %[[C0]]], %[[PV ]] {in_bounds = [true, true]} : tensor<4x3xi32>, vector<4x3xi32>
237
+ // CHECK: %[[V1:.*]] = vector.transfer_read %[[ARG2]][%[[C0]], %[[C0]]], %[[PV ]] {in_bounds = [true, true]} : tensor<4x3xi32>, vector<4x3xi32>
238
238
// CHECK: %[[CAST:.*]] = arith.index_cast %[[V0]] : vector<4x3xi32> to vector<4x3xindex>
239
239
// CHECK: %[[B1:.*]] = vector.broadcast %[[CAST]] : vector<4x3xindex> to vector<7x2x4x3xindex>
240
240
// CHECK: %[[CAST_1:.*]] = arith.index_cast %[[V1]] : vector<4x3xi32> to vector<4x3xindex>
@@ -382,7 +382,7 @@ func.func @vectorize_nd_tensor_extract_contiguous_and_gather(%arg0: tensor<6xf32
382
382
// CHECK-SAME: %[[VAL_0:.*]]: tensor<6xf32>
383
383
// CHECK-SAME: %[[VAL_1:.*]]: tensor<5xi32>
384
384
// CHECK-DAG: %[[VAL_2:.*]] = arith.constant 0 : index
385
- // CHECK-DAG: %[[VAL_3:.*]] = arith.constant 0 : i32
385
+ // CHECK-DAG: %[[VAL_3:.*]] = ub.poison : i32
386
386
// CHECK-DAG: %[[VAL_4:.*]] = arith.constant dense<0> : vector<5xindex>
387
387
// CHECK-DAG: %[[VAL_5:.*]] = arith.constant dense<5> : vector<5xindex>
388
388
// CHECK-DAG: %[[VAL_6:.*]] = arith.constant dense<true> : vector<5xi1>
@@ -480,13 +480,14 @@ func.func @vectorize_nd_tensor_extract_block_arg(%arg0: tensor<5x6xf32>, %arg1:
480
480
// CHECK-LABEL: func.func @vectorize_nd_tensor_extract_block_arg(
481
481
// CHECK-SAME: %[[VAL_0:.*]]: tensor<5x6xf32>,
482
482
// CHECK-SAME: %[[VAL_1:.*]]: tensor<5xindex>) -> tensor<5xf32> {
483
+ // CHECK-DAG: %[[PAD:.*]] = ub.poison : index
483
484
// CHECK-DAG: %[[VAL_2:.*]] = arith.constant 0 : index
484
485
// CHECK-DAG: %[[VAL_3:.*]] = arith.constant dense<[0, 1, 2, 3, 4]> : vector<5xindex>
485
486
// CHECK-DAG: %[[VAL_4:.*]] = arith.constant dense<true> : vector<5xi1>
486
487
// CHECK-DAG: %[[VAL_5:.*]] = arith.constant dense<0.000000e+00> : vector<5xf32>
487
488
// CHECK-DAG: %[[VAL_6:.*]] = arith.constant dense<6> : vector<5xindex>
488
489
// CHECK: %[[VAL_7:.*]] = tensor.empty() : tensor<5xf32>
489
- // CHECK: %[[VAL_8:.*]] = vector.transfer_read %[[VAL_1]]{{\[}}%[[VAL_2]]], %[[VAL_2 ]] {in_bounds = [true]} : tensor<5xindex>, vector<5xindex>
490
+ // CHECK: %[[VAL_8:.*]] = vector.transfer_read %[[VAL_1]]{{\[}}%[[VAL_2]]], %[[PAD ]] {in_bounds = [true]} : tensor<5xindex>, vector<5xindex>
490
491
// CHECK: %[[VAL_9:.*]] = arith.muli %[[VAL_8]], %[[VAL_6]] : vector<5xindex>
491
492
// CHECK: %[[VAL_10:.*]] = arith.addi %[[VAL_9]], %[[VAL_3]] : vector<5xindex>
492
493
// CHECK: %[[VAL_11:.*]] = vector.gather %[[VAL_0]]{{\[}}%[[VAL_2]], %[[VAL_2]]] {{\[}}%[[VAL_10]]], %[[VAL_4]], %[[VAL_5]] : tensor<5x6xf32>, vector<5xindex>, vector<5xi1>, vector<5xf32> into vector<5xf32>
@@ -559,7 +560,7 @@ func.func @vectorize_nd_tensor_extract_scalar_broadcast(%src: tensor<3x3xf32>, %
559
560
// CHECK-DAG: %[[C0:.*]] = arith.constant 0 : index
560
561
// CHECK-DAG: %[[C1:.*]] = arith.constant 1 : index
561
562
// CHECK-DAG: %[[C2:.*]] = arith.constant 2 : index
562
- // CHECK-DAG: %[[PAD:.*]] = arith.constant 0.000000e+00 : f32
563
+ // CHECK-DAG: %[[PAD:.*]] = ub.poison : f32
563
564
// CHECK: %[[READ:.*]] = vector.transfer_read %[[SRC]][%[[C1]], %[[C2]]], %[[PAD]] : tensor<3x3xf32>, vector<f32>
564
565
// CHECK: %[[READ_BCAST:.*]] = vector.broadcast %[[READ]] : vector<f32> to vector<1x1x3xf32>
565
566
// CHECK: vector.transfer_write %[[READ_BCAST]], %[[INIT]][%[[C0]], %[[C0]], %[[C0]]] {in_bounds = [true, true, true]} : vector<1x1x3xf32>, tensor<1x1x3xf32>
@@ -583,7 +584,7 @@ func.func @extract_scalar_from_0d_into_0d(%src: tensor<f32>, %init: tensor<f32>)
583
584
// CHECK-LABEL: func.func @extract_scalar_from_0d_into_0d(
584
585
// CHECK-SAME: %[[SRC:.*]]: tensor<f32>,
585
586
// CHECK-SAME: %[[INIT:.*]]: tensor<f32>) -> tensor<f32> {
586
- // CHECK: %[[PAD:.*]] = arith.constant 0.000000e+00 : f32
587
+ // CHECK: %[[PAD:.*]] = ub.poison : f32
587
588
// CHECK: %[[READ:.*]] = vector.transfer_read %[[SRC]][], %[[PAD]] : tensor<f32>, vector<f32>
588
589
// CHECK: vector.transfer_write %[[READ]], %[[INIT]][] : vector<f32>, tensor<f32>
589
590
@@ -606,7 +607,7 @@ func.func @extract_scalar_from_0d_into_1d(%src: tensor<f32>, %init: tensor<1xf32
606
607
// CHECK-SAME: %[[SRC:.*]]: tensor<f32>,
607
608
// CHECK-SAME: %[[INIT:.*]]: tensor<1xf32>) -> tensor<1xf32> {
608
609
// CHECK-DAG: %[[C0:.*]] = arith.constant 0 : index
609
- // CHECK-DAG: %[[PAD:.*]] = arith.constant 0.000000e+00 : f32
610
+ // CHECK-DAG: %[[PAD:.*]] = ub.poison : f32
610
611
// CHECK: %[[READ:.*]] = vector.transfer_read %[[SRC]][], %[[PAD]] : tensor<f32>, vector<f32>
611
612
// CHECK: %[[READ_BCAST:.*]] = vector.broadcast %[[READ]] : vector<f32> to vector<1xf32>
612
613
// CHECK: vector.transfer_write %[[READ_BCAST]], %[[INIT]][%[[C0]]] {in_bounds = [true]} : vector<1xf32>, tensor<1xf32>
@@ -654,7 +655,7 @@ func.func @scalar_read_with_broadcast_from_column_tensor(%init: tensor<1x1x4xi32
654
655
655
656
// CHECK-LABEL: func.func @scalar_read_with_broadcast_from_column_tensor
656
657
// CHECK-SAME: %[[INIT:.*]]: tensor<1x1x4xi32>) -> tensor<1x1x4xi32> {
657
- // CHECK-DAG: %[[PAD:.*]] = arith.constant 0 : i32
658
+ // CHECK-DAG: %[[PAD:.*]] = ub.poison : i32
658
659
// CHECK-DAG: %[[C0:.*]] = arith.constant 0 : index
659
660
// CHECK-DAG: %[[SRC:.*]] = arith.constant dense<{{\[\[}}0], [1], [2], [3], [4], [5], [6], [7], [8], [9], [10], [11], [12], [13], [14]]> : tensor<15x1xi32>
660
661
// CHECK: %[[READ:.*]] = vector.transfer_read %[[SRC]]{{\[}}%[[C0]], %[[C0]]], %[[PAD]] : tensor<15x1xi32>, vector<i32>
@@ -688,7 +689,7 @@ func.func @vectorize_nd_tensor_extract_transfer_read_basic_column(
688
689
// CHECK-SAME: %[[SRC:.*]]: tensor<3x3x3xf32>,
689
690
// CHECK-SAME: %[[INIT:.*]]: tensor<3x1x1xf32>)
690
691
// CHECK-DAG: %[[C0:.*]] = arith.constant 0 : index
691
- // CHECK-DAG: %[[CST_0 :.*]] = arith.constant 0.000000e+00 : f32
692
- // CHECK: %[[READ:.*]] = vector.transfer_read %[[SRC]][%[[C0]], %[[C0]], %[[C0]]], %[[CST_0 ]] : tensor<3x3x3xf32>, vector<f32>
692
+ // CHECK-DAG: %[[PV :.*]] = ub.poison : f32
693
+ // CHECK: %[[READ:.*]] = vector.transfer_read %[[SRC]][%[[C0]], %[[C0]], %[[C0]]], %[[PV ]] : tensor<3x3x3xf32>, vector<f32>
693
694
// CHECK: %[[READ_BCAST:.*]] = vector.broadcast %[[READ]] : vector<f32> to vector<3x1x1xf32>
694
695
// CHECK: vector.transfer_write %[[READ_BCAST]], %[[INIT]]{{\[}}%[[C0]], %[[C0]], %[[C0]]] {in_bounds = [true, true, true]} : vector<3x1x1xf32>, tensor<3x1x1xf32>
0 commit comments