1; RUN: llc < %s -march=avr | FileCheck %s 2 3; CHECK-LABEL: relax_breq 4; CHECK: cpi r{{[0-9]+}}, 0 5; CHECK: brne .LBB0_1 6; CHECK: rjmp .LBB0_2 7; .LBB0_1: 8 9define i8 @relax_breq(i1 %a) { 10entry-block: 11 br i1 %a, label %hello, label %finished 12 13hello: 14 call void asm sideeffect "nop", ""() 15 call void asm sideeffect "nop", ""() 16 call void asm sideeffect "nop", ""() 17 call void asm sideeffect "nop", ""() 18 call void asm sideeffect "nop", ""() 19 call void asm sideeffect "nop", ""() 20 call void asm sideeffect "nop", ""() 21 call void asm sideeffect "nop", ""() 22 call void asm sideeffect "nop", ""() 23 call void asm sideeffect "nop", ""() 24 call void asm sideeffect "nop", ""() 25 call void asm sideeffect "nop", ""() 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 br label %finished 65finished: 66 ret i8 3 67} 68 69; CHECK-LABEL: no_relax_breq 70; CHECK: cpi r{{[0-9]+}}, 0 71; CHECK: breq [[END_BB:.LBB[0-9]+_[0-9]+]] 72; CHECK: nop 73; ... 74; .LBB0_1: 75define i8 @no_relax_breq(i1 %a) { 76entry-block: 77 br i1 %a, label %hello, label %finished 78 79hello: 80 ; There are not enough NOPs to require relaxation. 81 call void asm sideeffect "nop", ""() 82 call void asm sideeffect "nop", ""() 83 call void asm sideeffect "nop", ""() 84 call void asm sideeffect "nop", ""() 85 call void asm sideeffect "nop", ""() 86 call void asm sideeffect "nop", ""() 87 call void asm sideeffect "nop", ""() 88 call void asm sideeffect "nop", ""() 89 call void asm sideeffect "nop", ""() 90 call void asm sideeffect "nop", ""() 91 call void asm sideeffect "nop", ""() 92 br label %finished 93finished: 94 ret i8 3 95} 96 97