1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc < %s -mtriple=aarch64 -o - | FileCheck %s
4 define void @foo(i32 %i) nounwind {
6 ; CHECK: // %bb.0: // %entry
7 ; CHECK-NEXT: str x30, [sp, #-16]! // 8-byte Folded Spill
8 ; CHECK-NEXT: cmp w0, #7
9 ; CHECK-NEXT: b.eq .LBB0_3
10 ; CHECK-NEXT: // %bb.1: // %entry
11 ; CHECK-NEXT: cmp w0, #5
12 ; CHECK-NEXT: b.ne .LBB0_4
13 ; CHECK-NEXT: // %bb.2: // %if.then
15 ; CHECK-NEXT: ldr x30, [sp], #16 // 8-byte Folded Reload
17 ; CHECK-NEXT: .LBB0_3: // %if.then2
19 ; CHECK-NEXT: .LBB0_4: // %if.end3
20 ; CHECK-NEXT: ldr x30, [sp], #16 // 8-byte Folded Reload
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: tbz w0, #0, .LBB1_2
45 ; CHECK-NEXT: // %bb.1: // %if.then
47 ; CHECK-NEXT: .LBB1_2: // %if.else
50 br i1 %i, label %if.then, label %if.else
53 tail call void @bar() #0
57 tail call void @bar() #0
66 attributes #0 = { nomerge }