1 ; RUN: llc < %s -march=avr | FileCheck %s
2 ; RUN: llc < %s -march=avr -mcpu=avr5 | FileCheck -check-prefix=AVR5 %s
4 ; CHECK-LABEL: relax_breq
5 ; CHECK: cpi r{{[0-9]+}}, 0
12 ; AVR5-LABEL: relax_breq
21 define i8 @relax_breq(i1 %a) {
23 br i1 %a, label %hello, label %finished
26 call void asm sideeffect "nop", ""()
27 call void asm sideeffect "nop", ""()
28 call void asm sideeffect "nop", ""()
29 call void asm sideeffect "nop", ""()
30 call void asm sideeffect "nop", ""()
31 call void asm sideeffect "nop", ""()
32 call void asm sideeffect "nop", ""()
33 call void asm sideeffect "nop", ""()
34 call void asm sideeffect "nop", ""()
35 call void asm sideeffect "nop", ""()
36 call void asm sideeffect "nop", ""()
37 call void asm sideeffect "nop", ""()
38 call void asm sideeffect "nop", ""()
39 call void asm sideeffect "nop", ""()
40 call void asm sideeffect "nop", ""()
41 call void asm sideeffect "nop", ""()
42 call void asm sideeffect "nop", ""()
43 call void asm sideeffect "nop", ""()
44 call void asm sideeffect "nop", ""()
45 call void asm sideeffect "nop", ""()
46 call void asm sideeffect "nop", ""()
47 call void asm sideeffect "nop", ""()
48 call void asm sideeffect "nop", ""()
49 call void asm sideeffect "nop", ""()
50 call void asm sideeffect "nop", ""()
51 call void asm sideeffect "nop", ""()
52 call void asm sideeffect "nop", ""()
53 call void asm sideeffect "nop", ""()
54 call void asm sideeffect "nop", ""()
55 call void asm sideeffect "nop", ""()
56 call void asm sideeffect "nop", ""()
57 call void asm sideeffect "nop", ""()
58 call void asm sideeffect "nop", ""()
59 call void asm sideeffect "nop", ""()
60 call void asm sideeffect "nop", ""()
61 call void asm sideeffect "nop", ""()
62 call void asm sideeffect "nop", ""()
63 call void asm sideeffect "nop", ""()
64 call void asm sideeffect "nop", ""()
65 call void asm sideeffect "nop", ""()
66 call void asm sideeffect "nop", ""()
67 call void asm sideeffect "nop", ""()
68 call void asm sideeffect "nop", ""()
69 call void asm sideeffect "nop", ""()
70 call void asm sideeffect "nop", ""()
71 call void asm sideeffect "nop", ""()
72 call void asm sideeffect "nop", ""()
73 call void asm sideeffect "nop", ""()
74 call void asm sideeffect "nop", ""()
75 call void asm sideeffect "nop", ""()
81 ; CHECK-LABEL: no_relax_breq
82 ; CHECK: cpi r{{[0-9]+}}, 0
83 ; CHECK: breq [[END_BB:.LBB[0-9]+_[0-9]+]]
87 ; AVR5-LABEL: no_relax_breq
88 ; AVR5: cpi r{{[0-9]+}}, 0
89 ; AVR5: breq [[END_BB:.LBB[0-9]+_[0-9]+]]
93 define i8 @no_relax_breq(i1 %a) {
95 br i1 %a, label %hello, label %finished
98 ; There are not enough NOPs to require relaxation.
99 call void asm sideeffect "nop", ""()
100 call void asm sideeffect "nop", ""()
101 call void asm sideeffect "nop", ""()
102 call void asm sideeffect "nop", ""()
103 call void asm sideeffect "nop", ""()
104 call void asm sideeffect "nop", ""()
105 call void asm sideeffect "nop", ""()
106 call void asm sideeffect "nop", ""()
107 call void asm sideeffect "nop", ""()
108 call void asm sideeffect "nop", ""()
109 call void asm sideeffect "nop", ""()