Lines Matching refs:UNROLL

1 …unregistered-dialect %s -affine-loop-unroll="unroll-full" | FileCheck %s --check-prefix UNROLL-FULL
3 …gistered-dialect %s -affine-loop-unroll="unroll-factor=4" | FileCheck %s --check-prefix UNROLL-BY-4
4 …gistered-dialect %s -affine-loop-unroll="unroll-factor=1" | FileCheck %s --check-prefix UNROLL-BY-1
6 // UNROLL-FULL-DAG: [[$MAP0:#map[0-9]+]] = affine_map<(d0) -> (d0 + 1)>
7 // UNROLL-FULL-DAG: [[$MAP1:#map[0-9]+]] = affine_map<(d0) -> (d0 + 2)>
8 // UNROLL-FULL-DAG: [[$MAP2:#map[0-9]+]] = affine_map<(d0) -> (d0 + 3)>
9 // UNROLL-FULL-DAG: [[$MAP3:#map[0-9]+]] = affine_map<(d0) -> (d0 + 4)>
10 // UNROLL-FULL-DAG: [[$MAP4:#map[0-9]+]] = affine_map<(d0, d1) -> (d0 + 1)>
11 // UNROLL-FULL-DAG: [[$MAP5:#map[0-9]+]] = affine_map<(d0, d1) -> (d0 + 3)>
12 // UNROLL-FULL-DAG: [[$MAP6:#map[0-9]+]] = affine_map<(d0)[s0] -> (d0 + s0 + 1)>
16 // UNROLL-BY-4-DAG: [[$MAP0:#map[0-9]+]] = affine_map<(d0) -> (d0 + 1)>
17 // UNROLL-BY-4-DAG: [[$MAP1:#map[0-9]+]] = affine_map<(d0) -> (d0 + 2)>
18 // UNROLL-BY-4-DAG: [[$MAP2:#map[0-9]+]] = affine_map<(d0) -> (d0 + 3)>
19 // UNROLL-BY-4-DAG: [[$MAP3:#map[0-9]+]] = affine_map<(d0, d1) -> (d0 + 1)>
20 // UNROLL-BY-4-DAG: [[$MAP4:#map[0-9]+]] = affine_map<(d0, d1) -> (d0 + 3)>
21 // UNROLL-BY-4-DAG: [[$MAP5:#map[0-9]+]] = affine_map<(d0)[s0] -> (d0 + s0 + 1)>
22 // UNROLL-BY-4-DAG: [[$MAP6:#map[0-9]+]] = affine_map<(d0, d1) -> (d0 * 16 + d1)>
23 // UNROLL-BY-4-DAG: [[$MAP11:#map[0-9]+]] = affine_map<(d0) -> (d0)>
24 // UNROLL-BY-4-DAG: [[$MAP_TRIP_COUNT_MULTIPLE_FOUR:#map[0-9]+]] = affine_map<()[s0, s1, s2] -> (s0…
26 // UNROLL-FULL-LABEL: func @loop_nest_simplest() {
28 // UNROLL-FULL: affine.for %arg0 = 0 to 100 step 2 {
30 // UNROLL-FULL: %c1_i32 = constant 1 : i32
31 // UNROLL-FULL-NEXT: %c1_i32_0 = constant 1 : i32
32 // UNROLL-FULL-NEXT: %c1_i32_1 = constant 1 : i32
33 // UNROLL-FULL-NEXT: %c1_i32_2 = constant 1 : i32
37 } // UNROLL-FULL: }
38 return // UNROLL-FULL: return
39 } // UNROLL-FULL }
41 // UNROLL-FULL-LABEL: func @loop_nest_simple_iv_use() {
43 // UNROLL-FULL: %c0 = constant 0 : index
44 // UNROLL-FULL-NEXT: affine.for %arg0 = 0 to 100 step 2 {
46 // UNROLL-FULL: %0 = "addi32"(%c0, %c0) : (index, index) -> i32
47 // UNROLL-FULL: %1 = affine.apply [[$MAP0]](%c0)
48 // UNROLL-FULL-NEXT: %2 = "addi32"(%1, %1) : (index, index) -> i32
49 // UNROLL-FULL: %3 = affine.apply [[$MAP1]](%c0)
50 // UNROLL-FULL-NEXT: %4 = "addi32"(%3, %3) : (index, index) -> i32
51 // UNROLL-FULL: %5 = affine.apply [[$MAP2]](%c0)
52 // UNROLL-FULL-NEXT: %6 = "addi32"(%5, %5) : (index, index) -> i32
56 } // UNROLL-FULL: }
57 return // UNROLL-FULL: return
58 } // UNROLL-FULL }
61 // UNROLL-FULL-LABEL: func @loop_nest_body_def_use() {
63 // UNROLL-FULL: %c0 = constant 0 : index
64 // UNROLL-FULL-NEXT: affine.for %arg0 = 0 to 100 step 2 {
66 // UNROLL-FULL: %c0_0 = constant 0 : index
68 // UNROLL-FULL: %0 = affine.apply [[$MAP0]](%c0)
69 // UNROLL-FULL-NEXT: %1 = "addi32"(%0, %c0_0) : (index, index) -> index
70 // UNROLL-FULL-NEXT: %2 = affine.apply [[$MAP0]](%c0)
71 // UNROLL-FULL-NEXT: %3 = affine.apply [[$MAP0]](%2)
72 // UNROLL-FULL-NEXT: %4 = "addi32"(%3, %c0_0) : (index, index) -> index
73 // UNROLL-FULL-NEXT: %5 = affine.apply [[$MAP1]](%c0)
74 // UNROLL-FULL-NEXT: %6 = affine.apply [[$MAP0]](%5)
75 // UNROLL-FULL-NEXT: %7 = "addi32"(%6, %c0_0) : (index, index) -> index
76 // UNROLL-FULL-NEXT: %8 = affine.apply [[$MAP2]](%c0)
77 // UNROLL-FULL-NEXT: %9 = affine.apply [[$MAP0]](%8)
78 // UNROLL-FULL-NEXT: %10 = "addi32"(%9, %c0_0) : (index, index) -> index
84 } // UNROLL-FULL: }
85 return // UNROLL-FULL: return
86 } // UNROLL-FULL }
88 // UNROLL-FULL-LABEL: func @loop_nest_strided() {
90 // UNROLL-FULL: %c2 = constant 2 : index
91 // UNROLL-FULL-NEXT: %c2_0 = constant 2 : index
92 // UNROLL-FULL-NEXT: affine.for %arg0 = 0 to 100 {
94 // UNROLL-FULL: %0 = affine.apply [[$MAP0]](%c2_0)
95 // UNROLL-FULL-NEXT: %1 = "addi32"(%0, %0) : (index, index) -> index
96 // UNROLL-FULL-NEXT: %2 = affine.apply [[$MAP1]](%c2_0)
97 // UNROLL-FULL-NEXT: %3 = affine.apply [[$MAP0]](%2)
98 // UNROLL-FULL-NEXT: %4 = "addi32"(%3, %3) : (index, index) -> index
104 // UNROLL-FULL: %5 = affine.apply [[$MAP0]](%c2)
105 // UNROLL-FULL-NEXT: %6 = "addi32"(%5, %5) : (index, index) -> index
106 // UNROLL-FULL-NEXT: %7 = affine.apply [[$MAP1]](%c2)
107 // UNROLL-FULL-NEXT: %8 = affine.apply [[$MAP0]](%7)
108 // UNROLL-FULL-NEXT: %9 = "addi32"(%8, %8) : (index, index) -> index
109 // UNROLL-FULL-NEXT: %10 = affine.apply [[$MAP3]](%c2)
110 // UNROLL-FULL-NEXT: %11 = affine.apply [[$MAP0]](%10)
111 // UNROLL-FULL-NEXT: %12 = "addi32"(%11, %11) : (index, index) -> index
117 } // UNROLL-FULL: }
118 return // UNROLL-FULL: return
119 } // UNROLL-FULL }
121 // UNROLL-FULL-LABEL: func @loop_nest_multiple_results() {
123 // UNROLL-FULL: %c0 = constant 0 : index
124 // UNROLL-FULL-NEXT: affine.for %arg0 = 0 to 100 {
126 // UNROLL-FULL: %0 = affine.apply [[$MAP4]](%arg0, %c0)
127 // UNROLL-FULL-NEXT: %1 = "addi32"(%0, %0) : (index, index) -> index
128 // UNROLL-FULL-NEXT: %2 = affine.apply #map{{.*}}(%arg0, %c0)
129 // UNROLL-FULL-NEXT: %3:2 = "fma"(%2, %0, %0) : (index, index, index) -> (index, index)
130 // UNROLL-FULL-NEXT: %4 = affine.apply #map{{.*}}(%c0)
131 // UNROLL-FULL-NEXT: %5 = affine.apply #map{{.*}}(%arg0, %4)
132 // UNROLL-FULL-NEXT: %6 = "addi32"(%5, %5) : (index, index) -> index
133 // UNROLL-FULL-NEXT: %7 = affine.apply #map{{.*}}(%arg0, %4)
134 // UNROLL-FULL-NEXT: %8:2 = "fma"(%7, %5, %5) : (index, index, index) -> (index, index)
141 } // UNROLL-FULL: }
142 return // UNROLL-FULL: return
143 } // UNROLL-FULL }
147 // UNROLL-FULL-LABEL: func @loop_nest_seq_imperfect(%arg0: memref<128x128xf32>) {
149 // UNROLL-FULL: %c0 = constant 0 : index
150 // UNROLL-FULL-NEXT: %c128 = constant 128 : index
152 // UNROLL-FULL: affine.for %arg1 = 0 to 100 {
154 // UNROLL-FULL: %0 = "vld"(%arg1) : (index) -> i32
156 // UNROLL-FULL: %1 = affine.apply [[$MAP0]](%c0)
157 // UNROLL-FULL-NEXT: %2 = "vmulf"(%c0, %1) : (index, index) -> index
158 // UNROLL-FULL-NEXT: %3 = "vaddf"(%2, %2) : (index, index) -> index
159 // UNROLL-FULL-NEXT: %4 = affine.apply [[$MAP0]](%c0)
160 // UNROLL-FULL-NEXT: %5 = affine.apply [[$MAP0]](%4)
161 // UNROLL-FULL-NEXT: %6 = "vmulf"(%4, %5) : (index, index) -> index
162 // UNROLL-FULL-NEXT: %7 = "vaddf"(%6, %6) : (index, index) -> index
163 // UNROLL-FULL-NEXT: %8 = affine.apply [[$MAP1]](%c0)
164 // UNROLL-FULL-NEXT: %9 = affine.apply [[$MAP0]](%8)
165 // UNROLL-FULL-NEXT: %10 = "vmulf"(%8, %9) : (index, index) -> index
166 // UNROLL-FULL-NEXT: %11 = "vaddf"(%10, %10) : (index, index) -> index
167 // UNROLL-FULL-NEXT: %12 = affine.apply [[$MAP2]](%c0)
168 // UNROLL-FULL-NEXT: %13 = affine.apply [[$MAP0]](%12)
169 // UNROLL-FULL-NEXT: %14 = "vmulf"(%12, %13) : (index, index) -> index
170 // UNROLL-FULL-NEXT: %15 = "vaddf"(%14, %14) : (index, index) -> index
177 // UNROLL-FULL: %16 = "scale"(%c128, %arg1) : (index, index) -> index
179 // UNROLL-FULL: "vst"(%16, %arg1) : (index, index) -> ()
181 } // UNROLL-FULL }
182 return // UNROLL-FULL: return
185 // UNROLL-FULL-LABEL: func @loop_nest_seq_multiple() {
187 // UNROLL-FULL: c0 = constant 0 : index
188 // UNROLL-FULL-NEXT: %c0_0 = constant 0 : index
189 // UNROLL-FULL-NEXT: %0 = affine.apply [[$MAP0]](%c0_0)
190 // UNROLL-FULL-NEXT: "mul"(%0, %0) : (index, index) -> ()
191 // UNROLL-FULL-NEXT: %1 = affine.apply [[$MAP0]](%c0_0)
192 // UNROLL-FULL-NEXT: %2 = affine.apply [[$MAP0]](%1)
193 // UNROLL-FULL-NEXT: "mul"(%2, %2) : (index, index) -> ()
194 // UNROLL-FULL-NEXT: %3 = affine.apply [[$MAP1]](%c0_0)
195 // UNROLL-FULL-NEXT: %4 = affine.apply [[$MAP0]](%3)
196 // UNROLL-FULL-NEXT: "mul"(%4, %4) : (index, index) -> ()
197 // UNROLL-FULL-NEXT: %5 = affine.apply [[$MAP2]](%c0_0)
198 // UNROLL-FULL-NEXT: %6 = affine.apply [[$MAP0]](%5)
199 // UNROLL-FULL-NEXT: "mul"(%6, %6) : (index, index) -> ()
206 // UNROLL-FULL: %c99 = constant 99 : index
208 // UNROLL-FULL: affine.for %arg0 = 0 to 100 step 2 {
210 // UNROLL-FULL: %7 = affine.apply [[$MAP0]](%c0)
211 // UNROLL-FULL-NEXT: %8 = affine.apply [[$MAP6]](%c0)[%c99]
212 // UNROLL-FULL-NEXT: %9 = affine.apply [[$MAP0]](%c0)
213 // UNROLL-FULL-NEXT: %10 = affine.apply [[$MAP0]](%9)
214 // UNROLL-FULL-NEXT: %11 = affine.apply [[$MAP6]](%9)[%c99]
215 // UNROLL-FULL-NEXT: %12 = affine.apply [[$MAP1]](%c0)
216 // UNROLL-FULL-NEXT: %13 = affine.apply [[$MAP0]](%12)
217 // UNROLL-FULL-NEXT: %14 = affine.apply [[$MAP6]](%12)[%c99]
218 // UNROLL-FULL-NEXT: %15 = affine.apply [[$MAP2]](%c0)
219 // UNROLL-FULL-NEXT: %16 = affine.apply [[$MAP0]](%15)
220 // UNROLL-FULL-NEXT: %17 = affine.apply [[$MAP6]](%15)[%c99]
226 } // UNROLL-FULL }
227 } // UNROLL-FULL }
228 return // UNROLL-FULL: return
229 } // UNROLL-FULL }
231 // UNROLL-FULL-LABEL: func @loop_nest_unroll_full() {
233 // UNROLL-FULL-NEXT: %0 = "foo"() : () -> i32
234 // UNROLL-FULL-NEXT: %1 = "bar"() : () -> i32
235 // UNROLL-FULL-NEXT: return
241 } // UNROLL-FULL }
319 // UNROLL-BY-4-LABEL: func @unroll_unit_stride_no_cleanup() {
321 // UNROLL-BY-4: affine.for %arg0 = 0 to 100 {
323 // UNROLL-BY-4: for [[L1:%arg[0-9]+]] = 0 to 8 step 4 {
324 // UNROLL-BY-4-NEXT: %0 = "addi32"([[L1]], [[L1]]) : (index, index) -> i32
325 // UNROLL-BY-4-NEXT: %1 = "addi32"(%0, %0) : (i32, i32) -> i32
326 // UNROLL-BY-4-NEXT: %2 = affine.apply #map{{[0-9]+}}([[L1]])
327 // UNROLL-BY-4-NEXT: %3 = "addi32"(%2, %2) : (index, index) -> i32
328 // UNROLL-BY-4-NEXT: %4 = "addi32"(%3, %3) : (i32, i32) -> i32
329 // UNROLL-BY-4-NEXT: %5 = affine.apply #map{{[0-9]+}}([[L1]])
330 // UNROLL-BY-4-NEXT: %6 = "addi32"(%5, %5) : (index, index) -> i32
331 // UNROLL-BY-4-NEXT: %7 = "addi32"(%6, %6) : (i32, i32) -> i32
332 // UNROLL-BY-4-NEXT: %8 = affine.apply #map{{[0-9]+}}([[L1]])
333 // UNROLL-BY-4-NEXT: %9 = "addi32"(%8, %8) : (index, index) -> i32
334 // UNROLL-BY-4-NEXT: %10 = "addi32"(%9, %9) : (i32, i32) -> i32
335 // UNROLL-BY-4-NEXT: }
341 // UNROLL-BY-4: affine.for %arg1 = 0 to 8 {
348 // UNROLL-BY-4-LABEL: func @unroll_unit_stride_cleanup() {
350 // UNROLL-BY-4: affine.for %arg0 = 0 to 100 {
352 // UNROLL-BY-4: for [[L1:%arg[0-9]+]] = 0 to 8 step 4 {
353 // UNROLL-BY-4-NEXT: %0 = "addi32"([[L1]], [[L1]]) : (index, index) -> i32
354 // UNROLL-BY-4-NEXT: %1 = "addi32"(%0, %0) : (i32, i32) -> i32
355 // UNROLL-BY-4-NEXT: %2 = affine.apply #map{{[0-9]+}}([[L1]])
356 // UNROLL-BY-4-NEXT: %3 = "addi32"(%2, %2) : (index, index) -> i32
357 // UNROLL-BY-4-NEXT: %4 = "addi32"(%3, %3) : (i32, i32) -> i32
358 // UNROLL-BY-4-NEXT: %5 = affine.apply #map{{[0-9]+}}([[L1]])
359 // UNROLL-BY-4-NEXT: %6 = "addi32"(%5, %5) : (index, index) -> i32
360 // UNROLL-BY-4-NEXT: %7 = "addi32"(%6, %6) : (i32, i32) -> i32
361 // UNROLL-BY-4-NEXT: %8 = affine.apply #map{{[0-9]+}}([[L1]])
362 // UNROLL-BY-4-NEXT: %9 = "addi32"(%8, %8) : (index, index) -> i32
363 // UNROLL-BY-4-NEXT: %10 = "addi32"(%9, %9) : (i32, i32) -> i32
364 // UNROLL-BY-4-NEXT: }
365 // UNROLL-BY-4-NEXT: for [[L2:%arg[0-9]+]] = 8 to 10 {
366 // UNROLL-BY-4-NEXT: %0 = "addi32"([[L2]], [[L2]]) : (index, index) -> i32
367 // UNROLL-BY-4-NEXT: %1 = "addi32"(%0, %0) : (i32, i32) -> i32
368 // UNROLL-BY-4-NEXT: }
377 // UNROLL-BY-4-LABEL: func @unroll_non_unit_stride_cleanup() {
379 // UNROLL-BY-4: affine.for %arg0 = 0 to 100 {
381 // UNROLL-BY-4: for [[L1:%arg[0-9]+]] = 2 to 42 step 20 {
382 // UNROLL-BY-4-NEXT: %0 = "addi32"([[L1]], [[L1]]) : (index, index) -> i32
383 // UNROLL-BY-4-NEXT: %1 = "addi32"(%0, %0) : (i32, i32) -> i32
384 // UNROLL-BY-4-NEXT: %2 = affine.apply #map{{[0-9]+}}([[L1]])
385 // UNROLL-BY-4-NEXT: %3 = "addi32"(%2, %2) : (index, index) -> i32
386 // UNROLL-BY-4-NEXT: %4 = "addi32"(%3, %3) : (i32, i32) -> i32
387 // UNROLL-BY-4-NEXT: %5 = affine.apply #map{{[0-9]+}}([[L1]])
388 // UNROLL-BY-4-NEXT: %6 = "addi32"(%5, %5) : (index, index) -> i32
389 // UNROLL-BY-4-NEXT: %7 = "addi32"(%6, %6) : (i32, i32) -> i32
390 // UNROLL-BY-4-NEXT: %8 = affine.apply #map{{[0-9]+}}([[L1]])
391 // UNROLL-BY-4-NEXT: %9 = "addi32"(%8, %8) : (index, index) -> i32
392 // UNROLL-BY-4-NEXT: %10 = "addi32"(%9, %9) : (i32, i32) -> i32
393 // UNROLL-BY-4-NEXT: }
394 // UNROLL-BY-4-NEXT: for [[L2:%arg[0-9]+]] = 42 to 48 step 5 {
395 // UNROLL-BY-4-NEXT: %0 = "addi32"([[L2]], [[L2]]) : (index, index) -> i32
396 // UNROLL-BY-4-NEXT: %1 = "addi32"(%0, %0) : (i32, i32) -> i32
397 // UNROLL-BY-4-NEXT: }
407 // UNROLL-BY-4-LABEL: func @loop_nest_single_iteration_after_unroll
409 // UNROLL-BY-4: %c0 = constant 0 : index
410 // UNROLL-BY-4: %c4 = constant 4 : index
411 // UNROLL-BY-4: affine.for %arg1 = 0 to %arg0 {
413 // UNROLL-BY-4: %0 = "addi32"(%c0, %c0) : (index, index) -> i32
414 // UNROLL-BY-4-NEXT: %1 = affine.apply [[$MAP0]](%c0)
415 // UNROLL-BY-4-NEXT: %2 = "addi32"(%1, %1) : (index, index) -> i32
416 // UNROLL-BY-4-NEXT: %3 = affine.apply [[$MAP1]](%c0)
417 // UNROLL-BY-4-NEXT: %4 = "addi32"(%3, %3) : (index, index) -> i32
418 // UNROLL-BY-4-NEXT: %5 = affine.apply [[$MAP2]](%c0)
419 // UNROLL-BY-4-NEXT: %6 = "addi32"(%5, %5) : (index, index) -> i32
420 // UNROLL-BY-4-NEXT: %7 = "addi32"(%c4, %c4) : (index, index) -> i32
421 // UNROLL-BY-4-NOT: for
424 } // UNROLL-BY-4-NOT: }
425 } // UNROLL-BY-4: }
432 // UNROLL-BY-4-LABEL: func @loop_nest_operand1() {
434 // UNROLL-BY-4: affine.for %arg0 = 0 to 100 step 2 {
435 // UNROLL-BY-4-NEXT: affine.for %arg1 = 0 to #map{{[0-9]+}}(%arg0) step 4
436 // UNROLL-BY-4-NEXT: %0 = "foo"() : () -> i32
437 // UNROLL-BY-4-NEXT: %1 = "foo"() : () -> i32
438 // UNROLL-BY-4-NEXT: %2 = "foo"() : () -> i32
439 // UNROLL-BY-4-NEXT: %3 = "foo"() : () -> i32
440 // UNROLL-BY-4-NEXT: }
441 // UNROLL-BY-4-NEXT: }
442 // UNROLL-BY-4-NEXT: return
452 // UNROLL-BY-4-LABEL: func @loop_nest_operand2() {
454 // UNROLL-BY-4: affine.for %arg0 = 0 to 100 step 2 {
455 // UNROLL-BY-4-NEXT: affine.for %arg1 = [[$MAP11]](%arg0) to #map{{[0-9]+}}(%arg0) step 4 {
456 // UNROLL-BY-4-NEXT: %0 = "foo"() : () -> i32
457 // UNROLL-BY-4-NEXT: %1 = "foo"() : () -> i32
458 // UNROLL-BY-4-NEXT: %2 = "foo"() : () -> i32
459 // UNROLL-BY-4-NEXT: %3 = "foo"() : () -> i32
460 // UNROLL-BY-4-NEXT: }
461 // UNROLL-BY-4-NEXT: }
462 // UNROLL-BY-4-NEXT: return
473 // UNROLL-BY-4-LABEL: func @loop_nest_operand3() {
475 // UNROLL-BY-4: affine.for %arg0 = 0 to 100 step 2 {
477 // UNROLL-BY-4: affine.for %arg1 = [[$MAP11]](%arg0) to #map{{[0-9]+}}(%arg0) step 4 {
478 // UNROLL-BY-4-NEXT: %1 = "foo"() : () -> i32
479 // UNROLL-BY-4-NEXT: %2 = "foo"() : () -> i32
480 // UNROLL-BY-4-NEXT: %3 = "foo"() : () -> i32
481 // UNROLL-BY-4-NEXT: %4 = "foo"() : () -> i32
482 // UNROLL-BY-4-NEXT: }
483 // UNROLL-BY-4-NEXT: %0 = "foo"() : () -> i32
487 } // UNROLL-BY-4: }
491 // UNROLL-BY-4-LABEL: func @loop_nest_symbolic_bound(%arg0: index) {
493 // UNROLL-BY-4: affine.for %arg1 = 0 to 100 {
495 // UNROLL-BY-4: affine.for %arg2 = 0 to #map{{[0-9]+}}()[%arg0] step 4 {
496 // UNROLL-BY-4: %0 = "foo"() : () -> i32
497 // UNROLL-BY-4-NEXT: %1 = "foo"() : () -> i32
498 // UNROLL-BY-4-NEXT: %2 = "foo"() : () -> i32
499 // UNROLL-BY-4-NEXT: %3 = "foo"() : () -> i32
500 // UNROLL-BY-4-NEXT: }
502 // UNROLL-BY-4-NEXT: affine.for %arg2 = #map{{[0-9]+}}()[%arg0] to %arg0 {
503 // UNROLL-BY-4-NEXT: %0 = "foo"() : () -> i32
504 // UNROLL-BY-4-NEXT: }
512 // UNROLL-BY-4-LABEL: func @loop_nest_symbolic_bound_with_step
513 // UNROLL-BY-4-SAME: %[[N:.*]]: index
515 // UNROLL-BY-4: affine.for %arg1 = 0 to 100 {
520 // UNROLL-BY-4: affine.for %{{.*}} = 0 to #map{{[0-9]+}}()[%[[N]]] step 12 {
521 // UNROLL-BY-4: "foo"()
522 // UNROLL-BY-4-NEXT: "foo"()
523 // UNROLL-BY-4-NEXT: "foo"()
524 // UNROLL-BY-4-NEXT: "foo"()
525 // UNROLL-BY-4-NEXT: }
527 // UNROLL-BY-4-NEXT: affine.for %{{.*}} = #map{{[0-9]+}}()[%[[N]]] to %[[N]] step 3 {
528 // UNROLL-BY-4-NEXT: "foo"()
529 // UNROLL-BY-4-NEXT: }
534 // UNROLL-BY-4-LABEL: func @loop_nest_symbolic_and_min_upper_bound
554 // UNROLL-BY-4-LABEL: func @loop_nest_non_trivial_multiple_upper_bound
563 // UNROLL-BY-4: affine.for %arg2 = 0 to min
564 // UNROLL-BY-4-NOT: for
565 // UNROLL-BY-4: return
567 // UNROLL-BY-4-LABEL: func @loop_nest_non_trivial_multiple_upper_bound_alt
573 // UNROLL-BY-4: affine.for %arg2 = 0 to min
574 // UNROLL-BY-4-NEXT: "foo"
575 // UNROLL-BY-4-NEXT: "foo"
576 // UNROLL-BY-4-NEXT: "foo"
577 // UNROLL-BY-4-NEXT: "foo"
578 // UNROLL-BY-4-NOT for
579 // UNROLL-BY-4: return
583 // UNROLL-BY-1-LABEL: func @unroll_by_one_should_promote_single_iteration_loop()
589 // UNROLL-BY-1-NEXT: %c0 = constant 0 : index
590 // UNROLL-BY-1-NEXT: %0 = "foo"(%c0) : (index) -> i32
591 // UNROLL-BY-1-NEXT: return