|
| 1 | +; RUN: opt -mcpu=cortex-m7 -mtriple=thumbv8.1m.main -passes=loop-unroll -S %s -o - | FileCheck %s --check-prefix=NLOB |
1 | 2 | ; RUN: opt -mcpu=cortex-m55 -mtriple=thumbv8.1m.main -passes=loop-unroll -S %s -o - | FileCheck %s --check-prefix=LOB
|
2 | 3 |
|
3 | 4 | ; This test checks behaviour of loop unrolling on processors with low overhead branching available
|
4 | 5 |
|
5 |
| -; LOB-CHECK-LABEL: for.body{{.*}}.prol |
6 |
| -; LOB-COUNT-1: fmul fast float |
7 |
| -; LOB-CHECK-LABEL: for.body{{.*}}.prol.1 |
8 |
| -; LOB-COUNT-1: fmul fast float |
9 |
| -; LOB-CHECK-LABEL: for.body{{.*}}.prol.2 |
10 |
| -; LOB-COUNT-1: fmul fast float |
11 |
| -; LOB-CHECK-LABEL: for.body{{.*}} |
12 |
| -; LOB-COUNT-4: fmul fast float |
| 6 | +; NLOB-LABEL: for.body{{.*}}.prol: |
| 7 | +; NLOB-COUNT-1: fmul fast float |
| 8 | +; NLOB-LABEL: for.body{{.*}}.prol.1: |
| 9 | +; NLOB-COUNT-1: fmul fast float |
| 10 | +; NLOB-LABEL: for.body{{.*}}.prol.2: |
| 11 | +; NLOB-COUNT-1: fmul fast float |
| 12 | +; NLOB-LABEL: for.body{{.*}}: |
| 13 | +; NLOB-COUNT-4: fmul fast float |
| 14 | +; NLOB-NOT: fmul fast float |
| 15 | + |
| 16 | +; LOB-LABEL: for.body{{.*}}: |
| 17 | +; LOB: fmul fast float |
13 | 18 | ; LOB-NOT: fmul fast float
|
14 | 19 |
|
| 20 | + |
15 | 21 | ; Function Attrs: nofree norecurse nosync nounwind memory(argmem: readwrite)
|
16 | 22 | define dso_local void @test(i32 noundef %n, ptr nocapture noundef %pA) local_unnamed_addr #0 {
|
17 | 23 | entry:
|
|
20 | 26 |
|
21 | 27 | for.cond.loopexit: ; preds = %for.cond6.for.cond.cleanup8_crit_edge.us, %for.body
|
22 | 28 | %exitcond49.not = icmp eq i32 %add, %n
|
23 |
| - br i1 %exitcond49.not, label %for.cond.cleanup, label %for.body |
| 29 | + br i1 %exitcond49.not, label %for.cond.cleanup, label %for.body, !llvm.loop !0 |
24 | 30 |
|
25 | 31 | for.cond.cleanup: ; preds = %for.cond.loopexit, %entry
|
26 | 32 | ret void
|
@@ -61,3 +67,6 @@ for.cond6.for.cond.cleanup8_crit_edge.us: ; preds = %for.body9.us
|
61 | 67 | br i1 %exitcond48.not, label %for.cond.loopexit, label %for.cond6.preheader.us
|
62 | 68 | }
|
63 | 69 |
|
| 70 | +!0 = distinct !{!0, !1, !2} |
| 71 | +!1 = !{!"llvm.loop.mustprogress"} |
| 72 | +!2 = !{!"llvm.loop.unroll.disable"} |
0 commit comments