annotate mlir/test/Dialect/Vector/vector-mask-lowering-transforms.mlir @ 266:00f31e85ec16 default tip

Added tag current for changeset 31d058e83c98
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Sat, 14 Oct 2023 10:13:55 +0900
parents 1f2b6ac9f198
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
252
1f2b6ac9f198 LLVM16-1
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1 // RUN: mlir-opt %s --test-transform-dialect-interpreter --split-input-file | FileCheck %s
1f2b6ac9f198 LLVM16-1
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
2
1f2b6ac9f198 LLVM16-1
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
3 // CHECK-LABEL: func @genbool_1d
1f2b6ac9f198 LLVM16-1
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
4 // CHECK: %[[T0:.*]] = arith.constant dense<[true, true, true, true, false, false, false, false]> : vector<8xi1>
1f2b6ac9f198 LLVM16-1
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
5 // CHECK: return %[[T0]] : vector<8xi1>
1f2b6ac9f198 LLVM16-1
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
6
1f2b6ac9f198 LLVM16-1
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
7 func.func @genbool_1d() -> vector<8xi1> {
1f2b6ac9f198 LLVM16-1
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
8 %0 = vector.constant_mask [4] : vector<8xi1>
1f2b6ac9f198 LLVM16-1
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
9 return %0 : vector<8xi1>
1f2b6ac9f198 LLVM16-1
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
10 }
1f2b6ac9f198 LLVM16-1
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
11
1f2b6ac9f198 LLVM16-1
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
12 // CHECK-LABEL: func @genbool_2d
1f2b6ac9f198 LLVM16-1
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
13 // CHECK: %[[C1:.*]] = arith.constant dense<[true, true, false, false]> : vector<4xi1>
1f2b6ac9f198 LLVM16-1
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
14 // CHECK: %[[C2:.*]] = arith.constant dense<false> : vector<4x4xi1>
1f2b6ac9f198 LLVM16-1
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
15 // CHECK: %[[T0:.*]] = vector.insert %[[C1]], %[[C2]] [0] : vector<4xi1> into vector<4x4xi1>
1f2b6ac9f198 LLVM16-1
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
16 // CHECK: %[[T1:.*]] = vector.insert %[[C1]], %[[T0]] [1] : vector<4xi1> into vector<4x4xi1>
1f2b6ac9f198 LLVM16-1
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
17 // CHECK: return %[[T1]] : vector<4x4xi1>
1f2b6ac9f198 LLVM16-1
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
18
1f2b6ac9f198 LLVM16-1
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
19 func.func @genbool_2d() -> vector<4x4xi1> {
1f2b6ac9f198 LLVM16-1
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
20 %v = vector.constant_mask [2, 2] : vector<4x4xi1>
1f2b6ac9f198 LLVM16-1
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
21 return %v: vector<4x4xi1>
1f2b6ac9f198 LLVM16-1
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
22 }
1f2b6ac9f198 LLVM16-1
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
23
1f2b6ac9f198 LLVM16-1
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
24 // CHECK-LABEL: func @genbool_3d
1f2b6ac9f198 LLVM16-1
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
25 // CHECK: %[[C1:.*]] = arith.constant dense<[true, true, true, false]> : vector<4xi1>
1f2b6ac9f198 LLVM16-1
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
26 // CHECK: %[[C2:.*]] = arith.constant dense<false> : vector<3x4xi1>
1f2b6ac9f198 LLVM16-1
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
27 // CHECK: %[[C3:.*]] = arith.constant dense<false> : vector<2x3x4xi1>
1f2b6ac9f198 LLVM16-1
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
28 // CHECK: %[[T0:.*]] = vector.insert %[[C1]], %[[C2]] [0] : vector<4xi1> into vector<3x4xi1>
1f2b6ac9f198 LLVM16-1
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
29 // CHECK: %[[T1:.*]] = vector.insert %[[T0]], %[[C3]] [0] : vector<3x4xi1> into vector<2x3x4xi1>
1f2b6ac9f198 LLVM16-1
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
30 // CHECK: return %[[T1]] : vector<2x3x4xi1>
1f2b6ac9f198 LLVM16-1
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
31
1f2b6ac9f198 LLVM16-1
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
32 func.func @genbool_3d() -> vector<2x3x4xi1> {
1f2b6ac9f198 LLVM16-1
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
33 %v = vector.constant_mask [1, 1, 3] : vector<2x3x4xi1>
1f2b6ac9f198 LLVM16-1
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
34 return %v: vector<2x3x4xi1>
1f2b6ac9f198 LLVM16-1
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
35 }
1f2b6ac9f198 LLVM16-1
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
36
1f2b6ac9f198 LLVM16-1
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
37 // CHECK-LABEL: func @genbool_var_1d(
1f2b6ac9f198 LLVM16-1
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
38 // CHECK-SAME: %[[A:.*]]: index)
1f2b6ac9f198 LLVM16-1
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
39 // CHECK: %[[T0:.*]] = vector.create_mask %[[A]] : vector<3xi1>
1f2b6ac9f198 LLVM16-1
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
40 // CHECK: return %[[T0]] : vector<3xi1>
1f2b6ac9f198 LLVM16-1
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
41
1f2b6ac9f198 LLVM16-1
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
42 func.func @genbool_var_1d(%arg0: index) -> vector<3xi1> {
1f2b6ac9f198 LLVM16-1
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
43 %0 = vector.create_mask %arg0 : vector<3xi1>
1f2b6ac9f198 LLVM16-1
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
44 return %0 : vector<3xi1>
1f2b6ac9f198 LLVM16-1
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
45 }
1f2b6ac9f198 LLVM16-1
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
46
1f2b6ac9f198 LLVM16-1
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
47 // CHECK-LABEL: func @genbool_var_2d(
1f2b6ac9f198 LLVM16-1
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
48 // CHECK-SAME: %[[A:.*0]]: index,
1f2b6ac9f198 LLVM16-1
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
49 // CHECK-SAME: %[[B:.*1]]: index)
1f2b6ac9f198 LLVM16-1
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
50 // CHECK: %[[C1:.*]] = arith.constant dense<false> : vector<3xi1>
1f2b6ac9f198 LLVM16-1
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
51 // CHECK: %[[C2:.*]] = arith.constant dense<false> : vector<2x3xi1>
1f2b6ac9f198 LLVM16-1
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
52 // CHECK: %[[c0:.*]] = arith.constant 0 : index
1f2b6ac9f198 LLVM16-1
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
53 // CHECK: %[[c1:.*]] = arith.constant 1 : index
1f2b6ac9f198 LLVM16-1
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
54 // CHECK: %[[T0:.*]] = vector.create_mask %[[B]] : vector<3xi1>
1f2b6ac9f198 LLVM16-1
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
55 // CHECK: %[[T1:.*]] = arith.cmpi sgt, %[[A]], %[[c0]] : index
1f2b6ac9f198 LLVM16-1
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
56 // CHECK: %[[T2:.*]] = arith.select %[[T1]], %[[T0]], %[[C1]] : vector<3xi1>
1f2b6ac9f198 LLVM16-1
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
57 // CHECK: %[[T3:.*]] = vector.insert %[[T2]], %[[C2]] [0] : vector<3xi1> into vector<2x3xi1>
1f2b6ac9f198 LLVM16-1
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
58 // CHECK: %[[T4:.*]] = arith.cmpi sgt, %[[A]], %[[c1]] : index
1f2b6ac9f198 LLVM16-1
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
59 // CHECK: %[[T5:.*]] = arith.select %[[T4]], %[[T0]], %[[C1]] : vector<3xi1>
1f2b6ac9f198 LLVM16-1
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
60 // CHECK: %[[T6:.*]] = vector.insert %[[T5]], %[[T3]] [1] : vector<3xi1> into vector<2x3xi1>
1f2b6ac9f198 LLVM16-1
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
61 // CHECK: return %[[T6]] : vector<2x3xi1>
1f2b6ac9f198 LLVM16-1
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
62
1f2b6ac9f198 LLVM16-1
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
63 func.func @genbool_var_2d(%arg0: index, %arg1: index) -> vector<2x3xi1> {
1f2b6ac9f198 LLVM16-1
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
64 %0 = vector.create_mask %arg0, %arg1 : vector<2x3xi1>
1f2b6ac9f198 LLVM16-1
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
65 return %0 : vector<2x3xi1>
1f2b6ac9f198 LLVM16-1
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
66 }
1f2b6ac9f198 LLVM16-1
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
67
1f2b6ac9f198 LLVM16-1
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
68 // CHECK-LABEL: func @genbool_var_3d(
1f2b6ac9f198 LLVM16-1
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
69 // CHECK-SAME: %[[A:.*0]]: index,
1f2b6ac9f198 LLVM16-1
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
70 // CHECK-SAME: %[[B:.*1]]: index,
1f2b6ac9f198 LLVM16-1
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
71 // CHECK-SAME: %[[C:.*2]]: index)
1f2b6ac9f198 LLVM16-1
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
72 // CHECK-DAG: %[[C1:.*]] = arith.constant dense<false> : vector<7xi1>
1f2b6ac9f198 LLVM16-1
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
73 // CHECK-DAG: %[[C2:.*]] = arith.constant dense<false> : vector<1x7xi1>
1f2b6ac9f198 LLVM16-1
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
74 // CHECK-DAG: %[[C3:.*]] = arith.constant dense<false> : vector<2x1x7xi1>
1f2b6ac9f198 LLVM16-1
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
75 // CHECK-DAG: %[[c0:.*]] = arith.constant 0 : index
1f2b6ac9f198 LLVM16-1
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
76 // CHECK-DAG: %[[c1:.*]] = arith.constant 1 : index
1f2b6ac9f198 LLVM16-1
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
77 // CHECK: %[[T0:.*]] = vector.create_mask %[[C]] : vector<7xi1>
1f2b6ac9f198 LLVM16-1
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
78 // CHECK: %[[T1:.*]] = arith.cmpi sgt, %[[B]], %[[c0]] : index
1f2b6ac9f198 LLVM16-1
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
79 // CHECK: %[[T2:.*]] = arith.select %[[T1]], %[[T0]], %[[C1]] : vector<7xi1>
1f2b6ac9f198 LLVM16-1
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
80 // CHECK: %[[T3:.*]] = vector.insert %[[T2]], %[[C2]] [0] : vector<7xi1> into vector<1x7xi1>
1f2b6ac9f198 LLVM16-1
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
81 // CHECK: %[[T4:.*]] = arith.cmpi sgt, %[[A]], %[[c0]] : index
1f2b6ac9f198 LLVM16-1
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
82 // CHECK: %[[T5:.*]] = arith.select %[[T4]], %[[T3]], %[[C2]] : vector<1x7xi1>
1f2b6ac9f198 LLVM16-1
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
83 // CHECK: %[[T6:.*]] = vector.insert %[[T5]], %[[C3]] [0] : vector<1x7xi1> into vector<2x1x7xi1>
1f2b6ac9f198 LLVM16-1
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
84 // CHECK: %[[T7:.*]] = arith.cmpi sgt, %[[A]], %[[c1]] : index
1f2b6ac9f198 LLVM16-1
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
85 // CHECK: %[[T8:.*]] = arith.select %[[T7]], %[[T3]], %[[C2]] : vector<1x7xi1>
1f2b6ac9f198 LLVM16-1
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
86 // CHECK: %[[T9:.*]] = vector.insert %[[T8]], %[[T6]] [1] : vector<1x7xi1> into vector<2x1x7xi1>
1f2b6ac9f198 LLVM16-1
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
87 // CHECK: return %[[T9]] : vector<2x1x7xi1>
1f2b6ac9f198 LLVM16-1
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
88
1f2b6ac9f198 LLVM16-1
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
89 func.func @genbool_var_3d(%arg0: index, %arg1: index, %arg2: index) -> vector<2x1x7xi1> {
1f2b6ac9f198 LLVM16-1
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
90 %0 = vector.create_mask %arg0, %arg1, %arg2 : vector<2x1x7xi1>
1f2b6ac9f198 LLVM16-1
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
91 return %0 : vector<2x1x7xi1>
1f2b6ac9f198 LLVM16-1
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
92 }
1f2b6ac9f198 LLVM16-1
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
93
1f2b6ac9f198 LLVM16-1
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
94 transform.sequence failures(propagate) {
1f2b6ac9f198 LLVM16-1
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
95 ^bb1(%module_op: !transform.any_op):
1f2b6ac9f198 LLVM16-1
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
96 %f = transform.structured.match ops{["func.func"]} in %module_op
1f2b6ac9f198 LLVM16-1
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
97 : (!transform.any_op) -> !transform.any_op
1f2b6ac9f198 LLVM16-1
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
98
1f2b6ac9f198 LLVM16-1
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
99 transform.apply_patterns to %f {
1f2b6ac9f198 LLVM16-1
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
100 transform.apply_patterns.vector.lower_masks
1f2b6ac9f198 LLVM16-1
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
101 } : !transform.any_op
1f2b6ac9f198 LLVM16-1
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
102 }
1f2b6ac9f198 LLVM16-1
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
103
1f2b6ac9f198 LLVM16-1
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
104 // -----
1f2b6ac9f198 LLVM16-1
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
105
1f2b6ac9f198 LLVM16-1
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
106 // CHECK-LABEL: func @transfer_read_3d(
1f2b6ac9f198 LLVM16-1
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
107 func.func @transfer_read_3d(
1f2b6ac9f198 LLVM16-1
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
108 %t: tensor<?x?x?xf32>, %arg0: index, %arg1: index, %arg2: index)
1f2b6ac9f198 LLVM16-1
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
109 -> vector<2x1x7xf32> {
1f2b6ac9f198 LLVM16-1
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
110 %c0 = arith.constant 0 : index
1f2b6ac9f198 LLVM16-1
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
111 %f0 = arith.constant 0.0 : f32
1f2b6ac9f198 LLVM16-1
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
112 // CHECK: %[[mask:.*]] = vector.create_mask
1f2b6ac9f198 LLVM16-1
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
113 // CHECK-NOT: vector.mask
1f2b6ac9f198 LLVM16-1
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
114 // CHECK: vector.transfer_read {{.*}}, %[[mask]] {in_bounds = [true, true, true]}
1f2b6ac9f198 LLVM16-1
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
115 // CHECK-SAME: : tensor<?x?x?xf32>, vector<2x1x7xf32>
1f2b6ac9f198 LLVM16-1
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
116 %0 = vector.create_mask %arg0, %arg1, %arg2 : vector<2x1x7xi1>
1f2b6ac9f198 LLVM16-1
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
117 %1 = vector.mask %0 {
1f2b6ac9f198 LLVM16-1
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
118 vector.transfer_read %t[%c0, %c0, %c0], %f0 {in_bounds = [true, true, true]}
1f2b6ac9f198 LLVM16-1
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
119 : tensor<?x?x?xf32>, vector<2x1x7xf32>
1f2b6ac9f198 LLVM16-1
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
120 } : vector<2x1x7xi1> -> vector<2x1x7xf32>
1f2b6ac9f198 LLVM16-1
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
121
1f2b6ac9f198 LLVM16-1
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
122 return %1: vector<2x1x7xf32>
1f2b6ac9f198 LLVM16-1
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
123 }
1f2b6ac9f198 LLVM16-1
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
124
1f2b6ac9f198 LLVM16-1
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
125 transform.sequence failures(propagate) {
1f2b6ac9f198 LLVM16-1
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
126 ^bb1(%module_op: !transform.any_op):
1f2b6ac9f198 LLVM16-1
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
127 %f = transform.structured.match ops{["func.func"]} in %module_op
1f2b6ac9f198 LLVM16-1
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
128 : (!transform.any_op) -> !transform.any_op
1f2b6ac9f198 LLVM16-1
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
129
1f2b6ac9f198 LLVM16-1
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
130 transform.apply_patterns to %f {
1f2b6ac9f198 LLVM16-1
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
131 transform.apply_patterns.vector.lower_masked_transfers
1f2b6ac9f198 LLVM16-1
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
132 } : !transform.any_op
1f2b6ac9f198 LLVM16-1
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
133 }