Lines Matching refs:vector
7 %0 = vector.transfer_read %arg0[], %f0 {permutation_map = affine_map<()->()>} :
8 tensor<f32>, vector<f32>
9 %1 = vector.transfer_write %0, %arg0[] {permutation_map = affine_map<()->()>} :
10 vector<f32>, tensor<f32>
11 %2 = vector.transfer_read %arg1[], %f0 {permutation_map = affine_map<()->()>} :
12 memref<f32>, vector<f32>
13 vector.transfer_write %2, %arg1[] {permutation_map = affine_map<()->()>} :
14 vector<f32>, memref<f32>
23 %0 = vector.transfer_read %arg0[%c0], %f0 {permutation_map = affine_map<(d0)->()>} :
24 tensor<?xf32>, vector<f32>
25 %1 = vector.transfer_write %0, %arg0[%c0] {permutation_map = affine_map<(d0)->()>} :
26 vector<f32>, tensor<?xf32>
27 %2 = vector.transfer_read %arg1[%c0, %c0], %f0 {permutation_map = affine_map<(d0, d1)->()>} :
28 memref<?x?xf32>, vector<f32>
29 vector.transfer_write %2, %arg1[%c0, %c0] {permutation_map = affine_map<(d0, d1)->()>} :
30 vector<f32>, memref<?x?xf32>
48 %vf0 = vector.splat %f0 : vector<4x3xf32>
49 %v0 = vector.splat %c0 : vector<4x3xi32>
50 %vi0 = vector.splat %i0 : vector<4x3xindex>
51 %m = arith.constant dense<[0, 0, 1, 0, 1]> : vector<5xi1>
52 %m2 = vector.splat %i1 : vector<5x4xi1>
54 // CHECK: vector.transfer_read
55 …%0 = vector.transfer_read %arg0[%c3, %c3], %f0 {permutation_map = affine_map<(d0, d1)->(d0)>} : me…
56 // CHECK: vector.transfer_read
57 …%1 = vector.transfer_read %arg0[%c3, %c3], %f0 {permutation_map = affine_map<(d0, d1)->(d1, d0)>} …
58 // CHECK: vector.transfer_read
59 …%2 = vector.transfer_read %arg0[%c3, %c3], %cst {permutation_map = affine_map<(d0, d1)->(d0)>} : m…
60 // CHECK: vector.transfer_read
61 …%3 = vector.transfer_read %arg0[%c3, %c3], %cst {permutation_map = affine_map<(d0, d1)->(d1)>} : m…
62 …// CHECK: vector.transfer_read %{{.*}}[%[[C3]], %[[C3]]], %{{.*}} : memref<?x?xvector<4x3xf32>>, v…
63 …%4 = vector.transfer_read %arg1[%c3, %c3], %vf0 {permutation_map = affine_map<(d0, d1)->(d0, d1)>}…
64 …// CHECK: vector.transfer_read %{{.*}}[%[[C3]], %[[C3]]], %{{.*}} {in_bounds = [false, true]} : me…
65 …%5 = vector.transfer_read %arg1[%c3, %c3], %vf0 {in_bounds = [false, true]} : memref<?x?xvector<4x…
66 …// CHECK: vector.transfer_read %{{.*}}[%[[C3]], %[[C3]]], %{{.*}} : memref<?x?xvector<4x3xi32>>, v…
67 %6 = vector.transfer_read %arg2[%c3, %c3], %v0 : memref<?x?xvector<4x3xi32>>, vector<5x24xi8>
68 …// CHECK: vector.transfer_read %{{.*}}[%[[C3]], %[[C3]]], %{{.*}} : memref<?x?xvector<4x3xindex>>,…
69 %7 = vector.transfer_read %arg3[%c3, %c3], %vi0 : memref<?x?xvector<4x3xindex>>, vector<5x48xi8>
70 …// CHECK: vector.transfer_read %{{.*}}[%[[C3]], %[[C3]]], %{{.*}}, %{{.*}} : memref<?x?xf32>, vect…
71 %8 = vector.transfer_read %arg0[%c3, %c3], %f0, %m : memref<?x?xf32>, vector<5xf32>
72 …// CHECK: vector.transfer_read %{{.*}}[%[[C3]], %[[C3]], %[[C3]]], %{{.*}}, %{{.*}} : memref<?x?x?…
73 …%9 = vector.transfer_read %arg4[%c3, %c3, %c3], %f0, %m2 {permutation_map = affine_map<(d0, d1, d2…
75 // CHECK: vector.transfer_write
76 …vector.transfer_write %0, %arg0[%c3, %c3] {permutation_map = affine_map<(d0, d1)->(d0)>} : vector<…
77 // CHECK: vector.transfer_write
78 …vector.transfer_write %1, %arg0[%c3, %c3] {permutation_map = affine_map<(d0, d1)->(d1, d0)>} : vec…
79 …// CHECK: vector.transfer_write %{{.*}}, %{{.*}}[%[[C3]], %[[C3]]] : vector<1x1x4x3xf32>, memref<?…
80 …vector.transfer_write %4, %arg1[%c3, %c3] {permutation_map = affine_map<(d0, d1)->(d0, d1)>} : vec…
81 …// CHECK: vector.transfer_write %{{.*}}, %{{.*}}[%[[C3]], %[[C3]]] : vector<1x1x4x3xf32>, memref<?…
82 …vector.transfer_write %5, %arg1[%c3, %c3] {in_bounds = [false, false]} : vector<1x1x4x3xf32>, memr…
83 …// CHECK: vector.transfer_write %{{.*}}, %{{.*}}[%[[C3]], %[[C3]]] : vector<5x24xi8>, memref<?x?xv…
84 vector.transfer_write %6, %arg2[%c3, %c3] : vector<5x24xi8>, memref<?x?xvector<4x3xi32>>
85 …// CHECK: vector.transfer_write %{{.*}}, %{{.*}}[%[[C3]], %[[C3]]] : vector<5x48xi8>, memref<?x?xv…
86 vector.transfer_write %7, %arg3[%c3, %c3] : vector<5x48xi8>, memref<?x?xvector<4x3xindex>>
87 …// CHECK: vector.transfer_write %{{.*}}, %{{.*}}[%[[C3]], %[[C3]]], %{{.*}} : vector<5xf32>, memre…
88 vector.transfer_write %8, %arg0[%c3, %c3], %m : vector<5xf32>, memref<?x?xf32>
109 %vf0 = vector.splat %f0 : vector<4x3xf32>
110 %v0 = vector.splat %c0 : vector<4x3xi32>
111 %vi0 = vector.splat %i0 : vector<4x3xindex>
114 // CHECK: vector.transfer_read
115 …%0 = vector.transfer_read %arg0[%c3, %c3], %f0 {permutation_map = affine_map<(d0, d1)->(d0)>} : te…
116 // CHECK: vector.transfer_read
117 …%1 = vector.transfer_read %arg0[%c3, %c3], %f0 {permutation_map = affine_map<(d0, d1)->(d1, d0)>} …
118 // CHECK: vector.transfer_read
119 …%2 = vector.transfer_read %arg0[%c3, %c3], %cst {permutation_map = affine_map<(d0, d1)->(d0)>} : t…
120 // CHECK: vector.transfer_read
121 …%3 = vector.transfer_read %arg0[%c3, %c3], %cst {permutation_map = affine_map<(d0, d1)->(d1)>} : t…
122 …// CHECK: vector.transfer_read %{{.*}}[%[[C3]], %[[C3]]], %{{.*}} : tensor<?x?xvector<4x3xf32>>, v…
123 …%4 = vector.transfer_read %arg1[%c3, %c3], %vf0 {permutation_map = affine_map<(d0, d1)->(d0, d1)>}…
124 …// CHECK: vector.transfer_read %{{.*}}[%[[C3]], %[[C3]]], %{{.*}} {in_bounds = [false, true]} : te…
125 …%5 = vector.transfer_read %arg1[%c3, %c3], %vf0 {in_bounds = [false, true]} : tensor<?x?xvector<4x…
126 …// CHECK: vector.transfer_read %{{.*}}[%[[C3]], %[[C3]]], %{{.*}} : tensor<?x?xvector<4x3xi32>>, v…
127 %6 = vector.transfer_read %arg2[%c3, %c3], %v0 : tensor<?x?xvector<4x3xi32>>, vector<5x24xi8>
128 …// CHECK: vector.transfer_read %{{.*}}[%[[C3]], %[[C3]]], %{{.*}} : tensor<?x?xvector<4x3xindex>>,…
129 %7 = vector.transfer_read %arg3[%c3, %c3], %vi0 : tensor<?x?xvector<4x3xindex>>, vector<5x48xi8>
132 // CHECK: vector.transfer_write
133 …%8 = vector.transfer_write %0, %arg0[%c3, %c3] {permutation_map = affine_map<(d0, d1)->(d0)>} : ve…
134 // CHECK: vector.transfer_write
135 …%9 = vector.transfer_write %1, %arg0[%c3, %c3] {permutation_map = affine_map<(d0, d1)->(d1, d0)>} …
136 …// CHECK: vector.transfer_write %{{.*}}, %{{.*}}[%[[C3]], %[[C3]]] : vector<1x1x4x3xf32>, tensor<?…
137 …%10 = vector.transfer_write %4, %arg1[%c3, %c3] {permutation_map = affine_map<(d0, d1)->(d0, d1)>}…
138 …// CHECK: vector.transfer_write %{{.*}}, %{{.*}}[%[[C3]], %[[C3]]] : vector<1x1x4x3xf32>, tensor<?…
139 …%11 = vector.transfer_write %5, %arg1[%c3, %c3] {in_bounds = [false, false]} : vector<1x1x4x3xf32>…
140 …// CHECK: vector.transfer_write %{{.*}}, %{{.*}}[%[[C3]], %[[C3]]] : vector<5x24xi8>, tensor<?x?xv…
141 %12 = vector.transfer_write %6, %arg2[%c3, %c3] : vector<5x24xi8>, tensor<?x?xvector<4x3xi32>>
142 …// CHECK: vector.transfer_write %{{.*}}, %{{.*}}[%[[C3]], %[[C3]]] : vector<5x48xi8>, tensor<?x?xv…
143 %13 = vector.transfer_write %7, %arg3[%c3, %c3] : vector<5x48xi8>, tensor<?x?xvector<4x3xindex>>
152 …nc @vector_broadcast(%a: f32, %b: vector<f32>, %c: vector<16xf32>, %d: vector<1x16xf32>, %e: vecto…
153 // CHECK: vector.broadcast %{{.*}} : f32 to vector<f32>
154 %0 = vector.broadcast %a : f32 to vector<f32>
155 // CHECK: vector.broadcast %{{.*}} : vector<f32> to vector<4xf32>
156 %1 = vector.broadcast %b : vector<f32> to vector<4xf32>
157 // CHECK: vector.broadcast %{{.*}} : f32 to vector<16xf32>
158 %2 = vector.broadcast %a : f32 to vector<16xf32>
159 // CHECK-NEXT: vector.broadcast %{{.*}} : vector<16xf32> to vector<8x16xf32>
160 %3 = vector.broadcast %c : vector<16xf32> to vector<8x16xf32>
161 // CHECK-NEXT: vector.broadcast %{{.*}} : vector<1x16xf32> to vector<8x16xf32>
162 %4 = vector.broadcast %d : vector<1x16xf32> to vector<8x16xf32>
163 // CHECK-NEXT: vector.broadcast %{{.*}} : vector<8x1xf32> to vector<8x16xf32>
164 %5 = vector.broadcast %e : vector<8x1xf32> to vector<8x16xf32>
165 return %4 : vector<8x16xf32>
169 func.func @shuffle1D(%a: vector<2xf32>, %b: vector<4xf32>) -> vector<2xf32> {
170 // CHECK: vector.shuffle %{{.*}}, %{{.*}}[0, 1, 2, 3] : vector<2xf32>, vector<2xf32>
171 %1 = vector.shuffle %a, %a[0, 1, 2, 3] : vector<2xf32>, vector<2xf32>
172 // CHECK-NEXT: vector.shuffle %{{.*}}, %{{.*}}[0, 1, 2] : vector<4xf32>, vector<4xf32>
173 %2 = vector.shuffle %1, %b[0, 1, 2] : vector<4xf32>, vector<4xf32>
174 // CHECK-NEXT: vector.shuffle %{{.*}}, %{{.*}}[0, 6] : vector<3xf32>, vector<4xf32>
175 %3 = vector.shuffle %2, %b[0, 6] : vector<3xf32>, vector<4xf32>
176 return %3 : vector<2xf32>
180 func.func @shuffle2D(%a: vector<1x4xf32>, %b: vector<2x4xf32>) -> vector<3x4xf32> {
181 // CHECK: vector.shuffle %{{.*}}, %{{.*}}[0, 1, 2] : vector<1x4xf32>, vector<2x4xf32>
182 %1 = vector.shuffle %a, %b[0, 1, 2] : vector<1x4xf32>, vector<2x4xf32>
183 return %1 : vector<3x4xf32>
187 func.func @extract_element_0d(%a: vector<f32>) -> f32 {
188 // CHECK-NEXT: vector.extractelement %{{.*}}[] : vector<f32>
189 %1 = vector.extractelement %a[] : vector<f32>
194 func.func @extract_element(%a: vector<16xf32>) -> f32 {
197 // CHECK-NEXT: vector.extractelement %{{.*}}[%[[C15]] : i32] : vector<16xf32>
198 %1 = vector.extractelement %a[%c : i32] : vector<16xf32>
203 func.func @extract(%arg0: vector<4x8x16xf32>) -> (vector<4x8x16xf32>, vector<8x16xf32>, vector<16xf…
204 // CHECK: vector.extract {{.*}}[] : vector<4x8x16xf32>
205 %0 = vector.extract %arg0[] : vector<4x8x16xf32>
206 // CHECK: vector.extract {{.*}}[3] : vector<4x8x16xf32>
207 %1 = vector.extract %arg0[3] : vector<4x8x16xf32>
208 // CHECK-NEXT: vector.extract {{.*}}[3, 3] : vector<4x8x16xf32>
209 %2 = vector.extract %arg0[3, 3] : vector<4x8x16xf32>
210 // CHECK-NEXT: vector.extract {{.*}}[3, 3, 3] : vector<4x8x16xf32>
211 %3 = vector.extract %arg0[3, 3, 3] : vector<4x8x16xf32>
212 return %0, %1, %2, %3 : vector<4x8x16xf32>, vector<8x16xf32>, vector<16xf32>, f32
216 func.func @insert_element_0d(%a: f32, %b: vector<f32>) -> vector<f32> {
217 // CHECK-NEXT: vector.insertelement %{{.*}}, %{{.*}}[] : vector<f32>
218 %1 = vector.insertelement %a, %b[] : vector<f32>
219 return %1 : vector<f32>
223 func.func @insert_element(%a: f32, %b: vector<16xf32>) -> vector<16xf32> {
226 // CHECK-NEXT: vector.insertelement %{{.*}}, %{{.*}}[%[[C15]] : i32] : vector<16xf32>
227 %1 = vector.insertelement %a, %b[%c : i32] : vector<16xf32>
228 return %1 : vector<16xf32>
232 func.func @insert(%a: f32, %b: vector<16xf32>, %c: vector<8x16xf32>, %res: vector<4x8x16xf32>) -> v…
233 // CHECK: vector.insert %{{.*}}, %{{.*}}[3] : vector<8x16xf32> into vector<4x8x16xf32>
234 %1 = vector.insert %c, %res[3] : vector<8x16xf32> into vector<4x8x16xf32>
235 // CHECK: vector.insert %{{.*}}, %{{.*}}[3, 3] : vector<16xf32> into vector<4x8x16xf32>
236 %2 = vector.insert %b, %res[3, 3] : vector<16xf32> into vector<4x8x16xf32>
237 // CHECK: vector.insert %{{.*}}, %{{.*}}[3, 3, 3] : f32 into vector<4x8x16xf32>
238 %3 = vector.insert %a, %res[3, 3, 3] : f32 into vector<4x8x16xf32>
239 // CHECK: vector.insert %{{.*}}, %{{.*}}[] : vector<4x8x16xf32> into vector<4x8x16xf32>
240 %4 = vector.insert %3, %3[] : vector<4x8x16xf32> into vector<4x8x16xf32>
241 return %4 : vector<4x8x16xf32>
245 func.func @outerproduct(%arg0: vector<4xf32>, %arg1: vector<8xf32>, %arg2: vector<4x8xf32>) -> vect…
246 // CHECK: vector.outerproduct {{.*}} : vector<4xf32>, vector<8xf32>
247 %0 = vector.outerproduct %arg0, %arg1 : vector<4xf32>, vector<8xf32>
248 // CHECK: vector.outerproduct {{.*}}, {{.*}}, {{.*}} : vector<4xf32>, vector<8xf32>
249 %1 = vector.outerproduct %arg0, %arg1, %arg2 : vector<4xf32>, vector<8xf32>
250 return %1 : vector<4x8xf32>
254 func.func @insert_strided_slice(%a: vector<4x4xf32>, %b: vector<4x8x16xf32>) {
255 …// CHECK: vector.insert_strided_slice %{{.*}}, %{{.*}} {offsets = [2, 2, 2], strides = [1, 1]} : v…
256 …%1 = vector.insert_strided_slice %a, %b {offsets = [2, 2, 2], strides = [1, 1]} : vector<4x4xf32> …
261 func.func @extract_strided_slice(%arg0: vector<4x8x16xf32>) -> vector<2x2x16xf32> {
262 …// CHECK: vector.extract_strided_slice %{{.*}} {offsets = [2, 2], sizes = [2, 2], strides = [1, 1]…
263 …%1 = vector.extract_strided_slice %arg0 {offsets = [2, 2], sizes = [2, 2], strides = [1, 1]} : vec…
264 return %1: vector<2x2x16xf32>
277 func.func @contraction_to_scalar(%arg0: vector<10xf32>, %arg1: vector<10xf32>) -> f32 {
280 …vector.contract {indexing_maps = [#{{.*}}, #{{.*}}, #{{.*}}], iterator_types = ["reduction"], kind…
281 %0 = vector.contract #contraction_to_scalar_trait %arg0, %arg1, %f0
282 : vector<10xf32>, vector<10xf32> into f32
295 kind = #vector.kind<maxf>
298 func.func @contraction_to_scalar_with_max(%arg0: vector<10xf32>, %arg1: vector<10xf32>) -> f32 {
301 …vector.contract {indexing_maps = [#{{.*}}, #{{.*}}, #{{.*}}], iterator_types = ["reduction"], kind…
302 %0 = vector.contract #contraction_to_scalar_max_trait %arg0, %arg1, %f0
303 : vector<10xf32>, vector<10xf32> into f32
333 kind = #vector.kind<maxf>
336 func.func @contraction(%arg0 : vector<7x8x16x15xf32>, %arg1 : vector<8x16x7x5xf32>,
337 %arg2 : vector<8x15x5xf32>, %arg3 : vector<8x8x15x5xf32>,
338 %arg4 : vector<7x8x16x15xf16>, %arg5 : vector<8x16x7x5xf16>) {
340 …vector.contract {indexing_maps = [#{{.*}}, #{{.*}}, #{{.*}}], iterator_types = ["parallel", "paral…
341 %0 = vector.contract #contraction_trait0 %arg0, %arg1, %arg2
342 : vector<7x8x16x15xf32>, vector<8x16x7x5xf32> into vector<8x15x5xf32>
346 …vector.contract {indexing_maps = [#{{.*}}, #{{.*}}, #{{.*}}], iterator_types = ["parallel", "paral…
347 %1 = vector.contract #contraction_trait1 %arg0, %arg1, %arg3
348 : vector<7x8x16x15xf32>, vector<8x16x7x5xf32> into vector<8x8x15x5xf32>
349 // Test contraction with optional vector mask arguments.
350 %lhs_mask = vector.constant_mask [7, 8, 16, 15] : vector<7x8x16x15xi1>
351 %rhs_mask = vector.constant_mask [8, 16, 7, 5] : vector<8x16x7x5xi1>
352 …vector.contract {indexing_maps = [#{{.*}}, #{{.*}}, #{{.*}}], iterator_types = ["parallel", "paral…
353 %2 = vector.contract #contraction_trait1 %arg0, %arg1, %arg3, %lhs_mask,
355 : vector<7x8x16x15xf32>, vector<8x16x7x5xf32> into vector<8x8x15x5xf32>
357 …vector.contract {indexing_maps = [#{{.*}}, #{{.*}}, #{{.*}}], iterator_types = ["parallel", "paral…
358 %3 = vector.contract #contraction_trait1 %arg4, %arg5, %arg3
359 : vector<7x8x16x15xf16>, vector<8x16x7x5xf16> into vector<8x8x15x5xf32>
361 …vector.contract {indexing_maps = [#{{.*}}, #{{.*}}, #{{.*}}], iterator_types = ["parallel", "paral…
362 %4 = vector.contract #contraction_trait2 %arg0, %arg1, %arg3
363 : vector<7x8x16x15xf32>, vector<8x16x7x5xf32> into vector<8x8x15x5xf32>
373 // CHECK-NEXT: vector.create_mask %[[C3]], %[[C2]] : vector<4x3xi1>
374 %0 = vector.create_mask %c3, %c2 : vector<4x3xi1>
381 // CHECK: vector.constant_mask [0] : vector<i1>
382 %0 = vector.constant_mask [0] : vector<i1>
383 // CHECK: vector.constant_mask [1] : vector<i1>
384 %1 = vector.constant_mask [1] : vector<i1>
390 // CHECK: vector.constant_mask [3, 2] : vector<4x3xi1>
391 %0 = vector.constant_mask [3, 2] : vector<4x3xi1>
392 // CHECK: vector.constant_mask [0] : vector<[4]xi1>
393 %1 = vector.constant_mask [0] : vector<[4]xi1>
398 func.func @vector_print(%arg0: vector<8x4xf32>) {
399 // CHECK: vector.print %{{.*}} : vector<8x4xf32>
400 vector.print %arg0 : vector<8x4xf32>
405 func.func @reshape(%arg0 : vector<3x2x4xf32>) -> (vector<2x3x4xf32>) {
414 …// CHECK: vector.reshape %{{.*}}, [%[[C3]], %[[C6]]], [%[[C2]], %[[C9]]], [4] : vector<3x2x4xf32> …
415 %1 = vector.reshape %arg0, [%c3, %c6], [%c2, %c9], [4]
416 : vector<3x2x4xf32> to vector<2x3x4xf32>
418 return %1 : vector<2x3x4xf32>
422 func.func @shape_cast(%arg0 : vector<5x1x3x2xf32>,
423 %arg1 : vector<8x1xf32>,
424 %arg2 : vector<16x1x1xf32>)
425 -> (vector<15x2xf32>, vector<8xf32>, vector<16xf32>, vector<16x1xf32>) {
427 // CHECK: vector.shape_cast %{{.*}} : vector<5x1x3x2xf32> to vector<15x2xf32>
428 %0 = vector.shape_cast %arg0 : vector<5x1x3x2xf32> to vector<15x2xf32>
430 // CHECK-NEXT: vector.shape_cast %{{.*}} : vector<8x1xf32> to vector<8xf32>
431 %1 = vector.shape_cast %arg1 : vector<8x1xf32> to vector<8xf32>
433 // CHECK-NEXT: vector.shape_cast %{{.*}} : vector<16x1x1xf32> to vector<16xf32>
434 %2 = vector.shape_cast %arg2 : vector<16x1x1xf32> to vector<16xf32>
436 // CHECK-NEXT: vector.shape_cast %{{.*}} : vector<16x1x1xf32> to vector<16x1xf32>
437 %3 = vector.shape_cast %arg2 : vector<16x1x1xf32> to vector<16x1xf32>
439 return %0, %1, %2, %3 : vector<15x2xf32>, vector<8xf32>, vector<16xf32>, vector<16x1xf32>
443 func.func @bitcast(%arg0 : vector<5x1x3x2xf32>,
444 %arg1 : vector<8x1xi32>,
445 %arg2 : vector<16x1x8xi8>,
446 %arg3 : vector<8x2x1xindex>,
447 %arg4 : vector<f32>)
448 …vector<5x1x3x4xf16>, vector<5x1x3x8xi8>, vector<8x4xi8>, vector<8x1xf32>, vector<16x1x2xi32>, vect…
450 // CHECK: vector.bitcast %{{.*}} : vector<5x1x3x2xf32> to vector<5x1x3x4xf16>
451 %0 = vector.bitcast %arg0 : vector<5x1x3x2xf32> to vector<5x1x3x4xf16>
453 // CHECK-NEXT: vector.bitcast %{{.*}} : vector<5x1x3x2xf32> to vector<5x1x3x8xi8>
454 %1 = vector.bitcast %arg0 : vector<5x1x3x2xf32> to vector<5x1x3x8xi8>
456 // CHECK-NEXT: vector.bitcast %{{.*}} : vector<8x1xi32> to vector<8x4xi8>
457 %2 = vector.bitcast %arg1 : vector<8x1xi32> to vector<8x4xi8>
459 // CHECK-NEXT: vector.bitcast %{{.*}} : vector<8x1xi32> to vector<8x1xf32>
460 %3 = vector.bitcast %arg1 : vector<8x1xi32> to vector<8x1xf32>
462 // CHECK-NEXT: vector.bitcast %{{.*}} : vector<16x1x8xi8> to vector<16x1x2xi32>
463 %4 = vector.bitcast %arg2 : vector<16x1x8xi8> to vector<16x1x2xi32>
465 // CHECK-NEXT: vector.bitcast %{{.*}} : vector<16x1x8xi8> to vector<16x1x4xi16>
466 %5 = vector.bitcast %arg2 : vector<16x1x8xi8> to vector<16x1x4xi16>
468 // CHECK-NEXT: vector.bitcast %{{.*}} : vector<16x1x8xi8> to vector<16x1x1xindex>
469 %6 = vector.bitcast %arg2 : vector<16x1x8xi8> to vector<16x1x1xindex>
471 // CHECK-NEXT: vector.bitcast %{{.*}} : vector<8x2x1xindex> to vector<8x2x2xf32>
472 %7 = vector.bitcast %arg3 : vector<8x2x1xindex> to vector<8x2x2xf32>
474 // CHECK: vector.bitcast %{{.*}} : vector<f32> to vector<i32>
475 %8 = vector.bitcast %arg4 : vector<f32> to vector<i32>
477 …vector<5x1x3x4xf16>, vector<5x1x3x8xi8>, vector<8x4xi8>, vector<8x1xf32>, vector<16x1x2xi32>, vect…
481 func.func @vector_fma(%a: vector<8xf32>, %b: vector<8x4xf32>) {
482 // CHECK: vector.fma %{{.*}} : vector<8xf32>
483 vector.fma %a, %a, %a : vector<8xf32>
484 // CHECK: vector.fma %{{.*}} : vector<8x4xf32>
485 vector.fma %b, %b, %b : vector<8x4xf32>
490 func.func @reduce_fp(%arg0: vector<16xf32>, %arg1: f32) -> f32 {
491 // CHECK: vector.reduction <add>, %{{.*}} : vector<16xf32> into f32
492 vector.reduction <add>, %arg0 : vector<16xf32> into f32
493 // CHECK: vector.reduction <add>, %{{.*}}, %{{.*}} : vector<16xf32> into f32
494 vector.reduction <add>, %arg0, %arg1 : vector<16xf32> into f32
495 // CHECK: vector.reduction <mul>, %{{.*}} : vector<16xf32> into f32
496 vector.reduction <mul>, %arg0 : vector<16xf32> into f32
497 // CHECK: vector.reduction <mul>, %{{.*}}, %{{.*}} : vector<16xf32> into f32
498 vector.reduction <mul>, %arg0, %arg1 : vector<16xf32> into f32
499 // CHECK: vector.reduction <minf>, %{{.*}} : vector<16xf32> into f32
500 vector.reduction <minf>, %arg0 : vector<16xf32> into f32
501 // CHECK: %[[X:.*]] = vector.reduction <maxf>, %{{.*}} : vector<16xf32> into f32
502 %0 = vector.reduction <maxf>, %arg0 : vector<16xf32> into f32
508 func.func @reduce_int(%arg0: vector<16xi32>) -> i32 {
509 // CHECK: vector.reduction <add>, %{{.*}} : vector<16xi32> into i32
510 vector.reduction <add>, %arg0 : vector<16xi32> into i32
511 // CHECK: vector.reduction <mul>, %{{.*}} : vector<16xi32> into i32
512 vector.reduction <mul>, %arg0 : vector<16xi32> into i32
513 // CHECK: vector.reduction <minui>, %{{.*}} : vector<16xi32> into i32
514 vector.reduction <minui>, %arg0 : vector<16xi32> into i32
515 // CHECK: vector.reduction <minsi>, %{{.*}} : vector<16xi32> into i32
516 vector.reduction <minsi>, %arg0 : vector<16xi32> into i32
517 // CHECK: vector.reduction <maxui>, %{{.*}} : vector<16xi32> into i32
518 vector.reduction <maxui>, %arg0 : vector<16xi32> into i32
519 // CHECK: vector.reduction <maxsi>, %{{.*}} : vector<16xi32> into i32
520 vector.reduction <maxsi>, %arg0 : vector<16xi32> into i32
521 // CHECK: vector.reduction <and>, %{{.*}} : vector<16xi32> into i32
522 vector.reduction <and>, %arg0 : vector<16xi32> into i32
523 // CHECK: vector.reduction <or>, %{{.*}} : vector<16xi32> into i32
524 vector.reduction <or>, %arg0 : vector<16xi32> into i32
525 // CHECK: %[[X:.*]] = vector.reduction <xor>, %{{.*}} : vector<16xi32> into i32
526 %0 = vector.reduction <xor>, %arg0 : vector<16xi32> into i32
532 func.func @transpose_fp(%arg0: vector<3x7xf32>) -> vector<7x3xf32> {
533 // CHECK: %[[X:.*]] = vector.transpose %{{.*}}, [1, 0] : vector<3x7xf32> to vector<7x3xf32>
534 %0 = vector.transpose %arg0, [1, 0] : vector<3x7xf32> to vector<7x3xf32>
535 // CHECK: return %[[X]] : vector<7x3xf32>
536 return %0 : vector<7x3xf32>
540 func.func @transpose_int(%arg0: vector<11x7x3x2xi32>) -> vector<2x11x7x3xi32> {
541 …// CHECK: %[[X:.*]] = vector.transpose %{{.*}}, [3, 0, 1, 2] : vector<11x7x3x2xi32> to vector<2x11…
542 %0 = vector.transpose %arg0, [3, 0, 1, 2] : vector<11x7x3x2xi32> to vector<2x11x7x3xi32>
543 // CHECK: return %[[X]] : vector<2x11x7x3xi32>
544 return %0 : vector<2x11x7x3xi32>
548 func.func @flat_transpose_fp(%arg0: vector<16xf32>) -> vector<16xf32> {
549 …// CHECK: %[[X:.*]] = vector.flat_transpose %{{.*}} {columns = 4 : i32, rows = 4 : i32} : vector<1…
550 …%0 = vector.flat_transpose %arg0 { rows = 4: i32, columns = 4: i32 } : vector<16xf32> -> vector<16…
551 // CHECK: return %[[X]] : vector<16xf32>
552 return %0 : vector<16xf32>
556 func.func @flat_transpose_int(%arg0: vector<16xi32>) -> vector<16xi32> {
557 …// CHECK: %[[X:.*]] = vector.flat_transpose %{{.*}} {columns = 8 : i32, rows = 2 : i32} : vector<1…
558 …%0 = vector.flat_transpose %arg0 { rows = 2: i32, columns = 8: i32 } : vector<16xi32> -> vector<16…
559 // CHECK: return %[[X]] : vector<16xi32>
560 return %0 : vector<16xi32>
566 // CHECK: %[[ld:.*]] = vector.load %{{.*}}[%{{.*}}] : memref<200x100xf32>, vector<8xf32>
567 %0 = vector.load %memref[%i, %j] : memref<200x100xf32>, vector<8xf32>
568 // CHECK: vector.store %[[ld]], %{{.*}}[%{{.*}}] : memref<200x100xf32>, vector<8xf32>
569 vector.store %0, %memref[%i, %j] : memref<200x100xf32>, vector<8xf32>
576 // CHECK: %[[ld:.*]] = vector.load %{{.*}}[%{{.*}}] : memref<200x100xvector<8xf32>>, vector<8xf32>
577 %0 = vector.load %memref[%i, %j] : memref<200x100xvector<8xf32>>, vector<8xf32>
578 // CHECK: vector.store %[[ld]], %{{.*}}[%{{.*}}] : memref<200x100xvector<8xf32>>, vector<8xf32>
579 vector.store %0, %memref[%i, %j] : memref<200x100xvector<8xf32>>, vector<8xf32>
584 …unc @vector_load_and_store_scalable_vector_memref(%v: vector<[4]xi32>, %m: memref<?xi32>) -> vecto…
586 // CHECK: vector.load {{.*}}: memref<?xi32>, vector<[4]xi32>
587 %0 = vector.load %m[%c0] : memref<?xi32>, vector<[4]xi32>
588 // CHECK: vector.store {{.*}}: memref<?xi32>, vector<[4]xi32>
589 vector.store %v, %m[%c0] : memref<?xi32>, vector<[4]xi32>
590 return %0 : vector<[4]xi32>
595 // CHECK: %[[ld:.*]] = vector.load %{{.*}}[%{{.*}}] : memref<200x100xvector<8xf32>>, vector<8xf32>
596 %0 = vector.load %memref[%i, %j] : memref<200x100xvector<8xf32>>, vector<8xf32>
597 // CHECK: vector.store %[[ld]], %{{.*}}[%{{.*}}] : memref<200x100xvector<8xf32>>, vector<8xf32>
598 vector.store %0, %memref[%i, %j] : memref<200x100xvector<8xf32>>, vector<8xf32>
605 // CHECK: %[[ld:.*]] = vector.load %{{.*}}[%{{.*}}] : memref<7xf32>, vector<8xf32>
606 %0 = vector.load %memref[%c0] : memref<7xf32>, vector<8xf32>
607 // CHECK: vector.store %[[ld]], %{{.*}}[%{{.*}}] : memref<7xf32>, vector<8xf32>
608 vector.store %0, %memref[%c0] : memref<7xf32>, vector<8xf32>
615 // CHECK: %[[ld:.*]] = vector.load %{{.*}}[%{{.*}}] : memref<200x100xf32>, vector<4x8xf32>
616 %0 = vector.load %memref[%i, %j] : memref<200x100xf32>, vector<4x8xf32>
617 // CHECK: vector.store %[[ld]], %{{.*}}[%{{.*}}] : memref<200x100xf32>, vector<4x8xf32>
618 vector.store %0, %memref[%i, %j] : memref<200x100xf32>, vector<4x8xf32>
625 …// CHECK: %[[ld:.*]] = vector.load %{{.*}}[%{{.*}}] : memref<200x100xvector<4x8xf32>>, vector<4x8x…
626 %0 = vector.load %memref[%i, %j] : memref<200x100xvector<4x8xf32>>, vector<4x8xf32>
627 …// CHECK: vector.store %[[ld]], %{{.*}}[%{{.*}}] : memref<200x100xvector<4x8xf32>>, vector<4x8xf32>
628 vector.store %0, %memref[%i, %j] : memref<200x100xvector<4x8xf32>>, vector<4x8xf32>
633 func.func @masked_load_and_store(%base: memref<?xf32>, %mask: vector<16xi1>, %passthru: vector<16xf…
635 …/ CHECK: %[[X:.*]] = vector.maskedload %{{.*}}[%{{.*}}], %{{.*}}, %{{.*}} : memref<?xf32>, vector<…
636 …%0 = vector.maskedload %base[%c0], %mask, %passthru : memref<?xf32>, vector<16xi1>, vector<16xf32>…
637 …// CHECK: vector.maskedstore %{{.*}}[%{{.*}}], %{{.*}}, %[[X]] : memref<?xf32>, vector<16xi1>, vec…
638 vector.maskedstore %base[%c0], %mask, %0 : memref<?xf32>, vector<16xi1>, vector<16xf32>
643 func.func @masked_load_and_store2d(%base: memref<?x?xf32>, %mask: vector<16xi1>, %passthru: vector<…
645 …K: %[[X:.*]] = vector.maskedload %{{.*}}[%{{.*}}, %{{.*}}], %{{.*}}, %{{.*}} : memref<?x?xf32>, ve…
646 …%0 = vector.maskedload %base[%c0, %c0], %mask, %passthru : memref<?x?xf32>, vector<16xi1>, vector<…
647 …// CHECK: vector.maskedstore %{{.*}}[%{{.*}}, %{{.*}}], %{{.*}}, %[[X]] : memref<?x?xf32>, vector<…
648 vector.maskedstore %base[%c0, %c0], %mask, %0 : memref<?x?xf32>, vector<16xi1>, vector<16xf32>
653 …c @gather_and_scatter(%base: memref<?xf32>, %v: vector<16xi32>, %mask: vector<16xi1>, %pass_thru: …
655 …[X:.*]] = vector.gather %{{.*}}[%{{.*}}] [%{{.*}}], %{{.*}}, %{{.*}} : memref<?xf32>, vector<16xi3…
656 …%0 = vector.gather %base[%c0][%v], %mask, %pass_thru : memref<?xf32>, vector<16xi32>, vector<16xi1…
657 …// CHECK: vector.scatter %{{.*}}[%{{.*}}] [%{{.*}}], %{{.*}}, %[[X]] : memref<?xf32>, vector<16xi3…
658 …vector.scatter %base[%c0][%v], %mask, %0 : memref<?xf32>, vector<16xi32>, vector<16xi1>, vector<16…
663 …ather_and_scatter2d(%base: memref<?x?xf32>, %v: vector<16xi32>, %mask: vector<16xi1>, %pass_thru: …
665 …] = vector.gather %{{.*}}[%{{.*}}, %{{.*}}] [%{{.*}}], %{{.*}}, %{{.*}} : memref<?x?xf32>, vector<…
666 …%0 = vector.gather %base[%c0, %c0][%v], %mask, %pass_thru : memref<?x?xf32>, vector<16xi32>, vecto…
667 …// CHECK: vector.scatter %{{.*}}[%{{.*}}] [%{{.*}}], %{{.*}}, %[[X]] : memref<?x?xf32>, vector<16x…
668 …vector.scatter %base[%c0, %c0][%v], %mask, %0 : memref<?x?xf32>, vector<16xi32>, vector<16xi1>, ve…
673 func.func @expand_and_compress(%base: memref<?xf32>, %mask: vector<16xi1>, %pass_thru: vector<16xf3…
675 …/ CHECK: %[[X:.*]] = vector.expandload %{{.*}}[%{{.*}}], %{{.*}}, %{{.*}} : memref<?xf32>, vector<…
676 …%0 = vector.expandload %base[%c0], %mask, %pass_thru : memref<?xf32>, vector<16xi1>, vector<16xf32…
677 …// CHECK: vector.compressstore %{{.*}}[%{{.*}}], %{{.*}}, %[[X]] : memref<?xf32>, vector<16xi1>, v…
678 vector.compressstore %base[%c0], %mask, %0 : memref<?xf32>, vector<16xi1>, vector<16xf32>
683 func.func @expand_and_compress2d(%base: memref<?x?xf32>, %mask: vector<16xi1>, %pass_thru: vector<1…
685 …K: %[[X:.*]] = vector.expandload %{{.*}}[%{{.*}}, %{{.*}}], %{{.*}}, %{{.*}} : memref<?x?xf32>, ve…
686 …%0 = vector.expandload %base[%c0, %c0], %mask, %pass_thru : memref<?x?xf32>, vector<16xi1>, vector…
687 …// CHECK: vector.compressstore %{{.*}}[%{{.*}}, %{{.*}}], %{{.*}}, %[[X]] : memref<?x?xf32>, vecto…
688 vector.compressstore %base[%c0, %c0], %mask, %0 : memref<?x?xf32>, vector<16xi1>, vector<16xf32>
693 func.func @extract_insert_map(%v: vector<32xf32>, %v2: vector<16x32xf32>,
694 %id0 : index, %id1 : index) -> (vector<32xf32>, vector<16x32xf32>) {
695 // CHECK: %[[V:.*]] = vector.extract_map %{{.*}}[%{{.*}}] : vector<32xf32> to vector<2xf32>
696 %vd = vector.extract_map %v[%id0] : vector<32xf32> to vector<2xf32>
697 …// CHECK: %[[V1:.*]] = vector.extract_map %{{.*}}[%{{.*}}, %{{.*}}] : vector<16x32xf32> to vector<…
698 %vd2 = vector.extract_map %v2[%id0, %id1] : vector<16x32xf32> to vector<4x2xf32>
699 …// CHECK: %[[R:.*]] = vector.insert_map %[[V]], %{{.*}}[%{{.*}}] : vector<2xf32> into vector<32xf3…
700 %r = vector.insert_map %vd, %v[%id0] : vector<2xf32> into vector<32xf32>
701 …// CHECK: %[[R1:.*]] = vector.insert_map %[[V1]], %{{.*}}[%{{.*}}, %{{.*}}] : vector<4x2xf32> into…
702 %r2 = vector.insert_map %vd2, %v2[%id0, %id1] : vector<4x2xf32> into vector<16x32xf32>
703 // CHECK: return %[[R]], %[[R1]] : vector<32xf32>, vector<16x32xf32>
704 return %r, %r2 : vector<32xf32>, vector<16x32xf32>
708 func.func @multi_reduction(%0: vector<4x8x16x32xf32>, %acc0: vector<4x16xf32>,
710 …// CHECK: vector.multi_reduction <add>, %{{.*}}, %{{.*}} [1, 3] : vector<4x8x16x32xf32> to vector<…
711 %1 = vector.multi_reduction <add>, %0, %acc0 [1, 3] :
712 vector<4x8x16x32xf32> to vector<4x16xf32>
713 // CHECK: vector.multi_reduction <add>, %{{.*}}, %{{.*}} [0, 1] : vector<4x16xf32> to f32
714 %2 = vector.multi_reduction <add>, %1, %acc1 [0, 1] :
715 vector<4x16xf32> to f32
721 // CHECK: vector.vscale
722 %0 = vector.vscale
727 func.func @vector_scan(%0: vector<4x8x16x32xf32>) -> vector<4x8x16x32xf32> {
728 %1 = arith.constant dense<0.0> : vector<4x16x32xf32>
729 %2:2 = vector.scan <add>, %0, %1 {reduction_dim = 1 : i64, inclusive = true} :
730 vector<4x8x16x32xf32>, vector<4x16x32xf32>
731 return %2#0 : vector<4x8x16x32xf32>
737 // CHECK: vector.splat [[S]] : vector<8xf32>
738 %v = vector.splat %s : vector<8xf32>
740 // CHECK: vector.splat [[S]] : vector<4xf32>
741 %u = "vector.splat"(%s) : (f32) -> vector<4xf32>
746 func.func @vector_splat_0d(%a: f32) -> vector<f32> {
747 // CHECK: vector.splat %{{.*}} : vector<f32>
748 %0 = vector.splat %a : vector<f32>
749 return %0 : vector<f32>
754 // CHECK-NEXT: vector.warp_execute_on_lane_0(%{{.*}})[32] {
755 vector.warp_execute_on_lane_0(%laneid)[32] {
763 func.func @warp_operand_result(%laneid: index, %v0 : vector<4xi32>) -> (vector<4xi32>) {
764 // CHECK-NEXT: %{{.*}} = vector.warp_execute_on_lane_0(%{{.*}})[32] args(%{{.*}} : vector<4xi3…
765 %2 = vector.warp_execute_on_lane_0(%laneid)[32]
766 args(%v0 : vector<4xi32>) -> (vector<4xi32>) {
767 ^bb0(%arg0 : vector<128xi32>) :
768 %0 = arith.constant dense<2>: vector<128xi32>
769 %1 = arith.addi %arg0, %0 : vector<128xi32>
770 // CHECK: vector.yield %{{.*}} : vector<128xi32>
771 vector.yield %1 : vector<128xi32>
774 return %2 : vector<4xi32>