1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 2
2 ; RUN: llc < %s -mtriple=powerpc -o - | FileCheck %s
4 define void @foo(i32 %i) nounwind {
6 ; CHECK: # %bb.0: # %entry
8 ; CHECK-NEXT: stwu 1, -16(1)
9 ; CHECK-NEXT: cmplwi 3, 7
10 ; CHECK-NEXT: stw 0, 20(1)
11 ; CHECK-NEXT: beq 0, .LBB0_3
12 ; CHECK-NEXT: # %bb.1: # %entry
13 ; CHECK-NEXT: cmplwi 3, 5
14 ; CHECK-NEXT: bne 0, .LBB0_4
15 ; CHECK-NEXT: # %bb.2: # %if.then
17 ; CHECK-NEXT: b .LBB0_4
18 ; CHECK-NEXT: .LBB0_3: # %if.then2
20 ; CHECK-NEXT: .LBB0_4: # %if.end3
22 ; CHECK-NEXT: lwz 0, 20(1)
23 ; CHECK-NEXT: addi 1, 1, 16
27 switch i32 %i, label %if.end3 [
29 i32 7, label %if.then2
33 tail call void @bar() #0
37 tail call void @bar() #0
41 tail call void @bar() #0
45 define void @foo_tail(i1 %i) nounwind {
46 ; CHECK-LABEL: foo_tail:
47 ; CHECK: # %bb.0: # %entry
49 ; CHECK-NEXT: stwu 1, -16(1)
50 ; CHECK-NEXT: andi. 3, 3, 1
51 ; CHECK-NEXT: stw 0, 20(1)
52 ; CHECK-NEXT: bc 4, 1, .LBB1_2
53 ; CHECK-NEXT: # %bb.1: # %if.then
55 ; CHECK-NEXT: b .LBB1_3
56 ; CHECK-NEXT: .LBB1_2: # %if.else
58 ; CHECK-NEXT: .LBB1_3: # %if.end
59 ; CHECK-NEXT: lwz 0, 20(1)
60 ; CHECK-NEXT: addi 1, 1, 16
64 br i1 %i, label %if.then, label %if.else
67 tail call void @bar() #0
71 tail call void @bar() #0
80 attributes #0 = { nomerge }