Lines Matching full:index

6 //  CHECK-SAME:     %[[a:.*]]: index, %[[b:.*]]: index
10 func.func @affine_apply(%a: index, %b: index) -> index {
12 %1 = "test.reify_bound"(%0) : (index) -> (index)
13 return %1 : index
19 // CHECK-SAME: %[[a:.*]]: index
20 // CHECK: %[[c2:.*]] = arith.constant 2 : index
22 func.func @affine_max_lb(%a: index) -> (index) {
26 %2 = "test.reify_bound"(%1) {type = "LB"}: (index) -> (index)
27 return %2 : index
32 func.func @affine_max_ub(%a: index) -> (index) {
35 %2 = "test.reify_bound"(%1) {type = "UB"}: (index) -> (index)
36 return %2 : index
42 // CHECK-SAME: %[[a:.*]]: index
43 // CHECK: %[[c3:.*]] = arith.constant 3 : index
45 func.func @affine_min_ub(%a: index) -> (index) {
49 %2 = "test.reify_bound"(%1) {type = "UB"}: (index) -> (index)
50 return %2 : index
55 func.func @affine_min_lb(%a: index) -> (index) {
58 %2 = "test.reify_bound"(%1) {type = "LB"}: (index) -> (index)
59 return %2 : index
65 // CHECK: %[[cst:.*]] = arith.constant -8 : index
67 func.func @composed_affine_apply(%i1 : index) -> (index) {
77 %reified = "test.reify_bound"(%s) {type = "EQ", constant} : (index) -> (index)
78 return %reified : index
84 func.func @are_equal(%i1 : index) {
89 "test.compare"(%i2, %i3) : (index, index) -> ()
96 func.func @composed_are_equal(%i1 : index) {
101 "test.compare"(%i2, %i3) {compose} : (index, index) -> ()
107 func.func @compare_affine_max(%a: index, %b: index) {
110 "test.compare"(%0, %a) {cmp = "GE"} : (index, index) -> ()
112 "test.compare"(%0, %a) {cmp = "GT"} : (index, index) -> ()
114 "test.compare"(%0, %a) {cmp = "LT"} : (index, index) -> ()
116 "test.compare"(%0, %a) {cmp = "LE"} : (index, index) -> ()
122 func.func @compare_affine_min(%a: index, %b: index) {
125 "test.compare"(%0, %a) {cmp = "GE"} : (index, index) -> ()
127 "test.compare"(%0, %a) {cmp = "GT"} : (index, index) -> ()
129 "test.compare"(%0, %a) {cmp = "LT"} : (index, index) -> ()
131 "test.compare"(%0, %a) {cmp = "LE"} : (index, index) -> ()
138 %c5 = arith.constant 5 : index
141 : (index) -> ()
144 : (index) -> ()
150 func.func @compare_maps(%a: index, %b: index) {
155 : (index, index, index, index) -> ()
165 // CHECK-SAME: (%[[arg0:.+]]: index)
170 func.func @delinearize_static(%arg0: index) -> (index, index, index) {
171 %c2 = arith.constant 2 : index
172 %c3 = arith.constant 3 : index
173 %0:3 = affine.delinearize_index %arg0 into (2, 3, 5) : index, index, index
174 %1 = "test.reify_bound"(%0#0) {type = "EQ"} : (index) -> (index)
175 %2 = "test.reify_bound"(%0#1) {type = "EQ"} : (index) -> (index)
176 %3 = "test.reify_bound"(%0#2) {type = "EQ"} : (index) -> (index)
178 "test.compare"(%0#0, %c2) {cmp = "LT"} : (index, index) -> ()
180 "test.compare"(%0#1, %c3) {cmp = "LT"} : (index, index) -> ()
181 return %1, %2, %3 : index, index, index
190 // CHECK-SAME: (%[[arg0:.+]]: index)
195 func.func @delinearize_static_no_outer_bound(%arg0: index) -> (index, index, index) {
196 %c2 = arith.constant 2 : index
197 %c3 = arith.constant 3 : index
198 %0:3 = affine.delinearize_index %arg0 into (3, 5) : index, index, index
199 %1 = "test.reify_bound"(%0#0) {type = "EQ"} : (index) -> (index)
200 %2 = "test.reify_bound"(%0#1) {type = "EQ"} : (index) -> (index)
201 %3 = "test.reify_bound"(%0#2) {type = "EQ"} : (index) -> (index)
202 "test.compaare"(%0#0, %c2) {cmp = "LT"} : (index, index) -> ()
204 "test.compare"(%0#1, %c3) {cmp = "LT"} : (index, index) -> ()
205 return %1, %2, %3 : index, index, index
212 // CHECK-SAME: (%[[arg0:.+]]: index, %[[arg1:.+]]: index)
215 func.func @linearize_static(%arg0: index, %arg1: index) -> index {
216 %c6 = arith.constant 6 : index
217 %0 = affine.linearize_index disjoint [%arg0, %arg1] by (2, 3) : index
218 %1 = "test.reify_bound"(%0) {type = "EQ"} : (index) -> (index)
220 "test.compare"(%0, %c6) {cmp = "LT"} : (index, index) -> ()
221 return %1 : index
228 // CHECK-SAME: (%[[arg0:.+]]: index, %[[arg1:.+]]: index)
231 func.func @linearize_static_no_outer_bound(%arg0: index, %arg1: index) -> index {
232 %c6 = arith.constant 6 : index
233 %0 = affine.linearize_index disjoint [%arg0, %arg1] by (3) : index
234 %1 = "test.reify_bound"(%0) {type = "EQ"} : (index) -> (index)
236 "test.compare"(%0, %c6) {cmp = "LT"} : (index, index) -> ()
237 return %1 : index