1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 2
2 ; RUN: llc < %s -mtriple=x86_64 -o - | FileCheck %s
4 define void @foo(i32 %i) nounwind {
6 ; CHECK: # %bb.0: # %entry
7 ; CHECK-NEXT: pushq %rax
8 ; CHECK-NEXT: cmpl $7, %edi
9 ; CHECK-NEXT: je .LBB0_3
10 ; CHECK-NEXT: # %bb.1: # %entry
11 ; CHECK-NEXT: cmpl $5, %edi
12 ; CHECK-NEXT: jne .LBB0_4
13 ; CHECK-NEXT: # %bb.2: # %if.then
14 ; CHECK-NEXT: callq bar
15 ; CHECK-NEXT: popq %rax
16 ; CHECK-NEXT: jmp bar # TAILCALL
17 ; CHECK-NEXT: .LBB0_3: # %if.then2
18 ; CHECK-NEXT: callq bar
19 ; CHECK-NEXT: .LBB0_4: # %if.end3
20 ; CHECK-NEXT: popq %rax
21 ; CHECK-NEXT: jmp bar # TAILCALL
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: testb $1, %dil
45 ; CHECK-NEXT: je bar # TAILCALL
46 ; CHECK-NEXT: # %bb.1: # %if.then
47 ; CHECK-NEXT: jmp bar # TAILCALL
49 br i1 %i, label %if.then, label %if.else
52 tail call void @bar() #0
56 tail call void @bar() #0
63 declare dso_local void @bar()
65 attributes #0 = { nomerge }