1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 2
2 ; RUN: llc < %s -mtriple=arm -o - | FileCheck %s
4 define void @foo(i32 %i) nounwind {
6 ; CHECK: @ %bb.0: @ %entry
7 ; CHECK-NEXT: push {r11, lr}
8 ; CHECK-NEXT: cmp r0, #7
9 ; CHECK-NEXT: beq .LBB0_3
10 ; CHECK-NEXT: @ %bb.1: @ %entry
11 ; CHECK-NEXT: cmp r0, #5
12 ; CHECK-NEXT: bne .LBB0_4
13 ; CHECK-NEXT: @ %bb.2: @ %if.then
15 ; CHECK-NEXT: pop {r11, lr}
17 ; CHECK-NEXT: .LBB0_3: @ %if.then2
19 ; CHECK-NEXT: .LBB0_4: @ %if.end3
20 ; CHECK-NEXT: pop {r11, lr}
23 switch i32 %i, label %if.end3 [
25 i32 7, label %if.then2
29 tail call void @bar() #0
33 tail call void @bar() #0
37 tail call void @bar() #0
41 define void @foo_tail(i1 %i) nounwind {
42 ; CHECK-LABEL: foo_tail:
43 ; CHECK: @ %bb.0: @ %entry
44 ; CHECK-NEXT: tst r0, #1
45 ; CHECK-NEXT: beq .LBB1_2
46 ; CHECK-NEXT: @ %bb.1: @ %if.then
48 ; CHECK-NEXT: .LBB1_2: @ %if.else
51 br i1 %i, label %if.then, label %if.else
54 tail call void @bar() #0
58 tail call void @bar() #0
67 attributes #0 = { nomerge }