1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -mtriple=powerpcspe -verify-machineinstrs < %s | FileCheck %s
4 define void @baz() #0 {
6 ; CHECK: # %bb.0: # %bb
8 ; CHECK-NEXT: stwu 1, -16(1)
9 ; CHECK-NEXT: stw 0, 20(1)
11 ; CHECK-NEXT: .p2align 4
12 ; CHECK-NEXT: .LBB0_1: # %bb1
14 ; CHECK-NEXT: bdnz .LBB0_1
15 ; CHECK-NEXT: # %bb.2: # %bb8
16 ; CHECK-NEXT: bl wibble
17 ; CHECK-NEXT: lwz 0, 20(1)
18 ; CHECK-NEXT: addi 1, 1, 16
25 %tmp = phi i32 [ %tmp6, %bb1 ], [ undef, %bb ]
26 %tmp2 = phi i32 [ %tmp3, %bb1 ], [ undef, %bb ]
27 %tmp3 = add nsw i32 %tmp2, 1
28 %tmp4 = sitofp i32 %tmp to double
29 %tmp5 = tail call double @llvm.fmuladd.f64(double 0.000000e+00, double -0.000000e+00, double %tmp4)
30 %tmp6 = fptosi double %tmp5 to i32
31 %tmp7 = icmp eq i32 %tmp2, 0
32 br i1 %tmp7, label %bb8, label %bb1
35 call void @wibble(i32 %tmp6)
39 define void @wombat() #0 {
40 ; CHECK-LABEL: wombat:
41 ; CHECK: # %bb.0: # %bb
43 ; CHECK-NEXT: stwu 1, -48(1)
44 ; CHECK-NEXT: li 3, .LCPI1_0@l
45 ; CHECK-NEXT: li 5, .LCPI1_1@l
46 ; CHECK-NEXT: lis 4, .LCPI1_0@ha
47 ; CHECK-NEXT: lis 6, .LCPI1_1@ha
48 ; CHECK-NEXT: stw 0, 52(1)
49 ; CHECK-NEXT: evstdd 29, 24(1) # 8-byte Folded Spill
50 ; CHECK-NEXT: evstdd 30, 32(1) # 8-byte Folded Spill
51 ; CHECK-NEXT: evlddx 30, 4, 3
52 ; CHECK-NEXT: # implicit-def: $r3
53 ; CHECK-NEXT: evlddx 29, 6, 5
54 ; CHECK-NEXT: evstdd 28, 16(1) # 8-byte Folded Spill
55 ; CHECK-NEXT: # implicit-def: $r28
56 ; CHECK-NEXT: .p2align 4
57 ; CHECK-NEXT: .LBB1_1: # %bb1
59 ; CHECK-NEXT: efdcfsi 8, 3
60 ; CHECK-NEXT: mr 4, 30
61 ; CHECK-NEXT: mr 6, 29
62 ; CHECK-NEXT: evmergehi 3, 30, 30
63 ; CHECK-NEXT: evmergehi 5, 29, 29
64 ; CHECK-NEXT: # kill: def $r3 killed $r3 killed $s3
65 ; CHECK-NEXT: # kill: def $r5 killed $r5 killed $s5
66 ; CHECK-NEXT: evmergehi 7, 8, 8
67 ; CHECK-NEXT: # kill: def $r8 killed $r8 killed $s8
68 ; CHECK-NEXT: # kill: def $r7 killed $r7 killed $s7
70 ; CHECK-NEXT: evmergelo 3, 3, 4
71 ; CHECK-NEXT: addi 28, 28, -1
72 ; CHECK-NEXT: cmplwi 28, 0
73 ; CHECK-NEXT: efdctsiz 3, 3
74 ; CHECK-NEXT: bc 12, 1, .LBB1_1
75 ; CHECK-NEXT: # %bb.2: # %bb8
76 ; CHECK-NEXT: bl wibble
77 ; CHECK-NEXT: evldd 30, 32(1) # 8-byte Folded Reload
78 ; CHECK-NEXT: evldd 29, 24(1) # 8-byte Folded Reload
79 ; CHECK-NEXT: evldd 28, 16(1) # 8-byte Folded Reload
80 ; CHECK-NEXT: lwz 0, 52(1)
81 ; CHECK-NEXT: addi 1, 1, 48
88 %tmp = phi i32 [ %tmp6, %bb1 ], [ undef, %bb ]
89 %tmp2 = phi i32 [ %tmp3, %bb1 ], [ undef, %bb ]
90 %tmp3 = add nsw i32 %tmp2, 1
91 %tmp4 = sitofp i32 %tmp to double
92 %tmp5 = tail call double @llvm.fma.f64(double 0.000000e+00, double -0.000000e+00, double %tmp4)
93 %tmp6 = fptosi double %tmp5 to i32
94 %tmp7 = icmp eq i32 %tmp2, 0
95 br i1 %tmp7, label %bb8, label %bb1
98 call void @wibble(i32 %tmp6)
102 declare void @wibble(i32)
103 declare double @llvm.fmuladd.f64(double, double, double)
104 declare double @llvm.fma.f64(double, double, double)
106 attributes #0 = { nounwind }