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, 8(1) # 8-byte Folded Spill
50 ; CHECK-NEXT: evstdd 30, 16(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: stw 28, 32(1) # 4-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: evmergehi 3, 30, 30
61 ; CHECK-NEXT: evmergehi 5, 29, 29
62 ; CHECK-NEXT: mr 4, 30
63 ; CHECK-NEXT: mr 6, 29
64 ; CHECK-NEXT: evmergehi 7, 8, 8
66 ; CHECK-NEXT: evmergelo 3, 3, 4
67 ; CHECK-NEXT: addi 28, 28, -1
68 ; CHECK-NEXT: cmplwi 28, 0
69 ; CHECK-NEXT: efdctsiz 3, 3
70 ; CHECK-NEXT: bc 12, 1, .LBB1_1
71 ; CHECK-NEXT: # %bb.2: # %bb8
72 ; CHECK-NEXT: bl wibble
73 ; CHECK-NEXT: evldd 30, 16(1) # 8-byte Folded Reload
74 ; CHECK-NEXT: evldd 29, 8(1) # 8-byte Folded Reload
75 ; CHECK-NEXT: lwz 28, 32(1) # 4-byte Folded Reload
76 ; CHECK-NEXT: lwz 0, 52(1)
77 ; CHECK-NEXT: addi 1, 1, 48
84 %tmp = phi i32 [ %tmp6, %bb1 ], [ undef, %bb ]
85 %tmp2 = phi i32 [ %tmp3, %bb1 ], [ undef, %bb ]
86 %tmp3 = add nsw i32 %tmp2, 1
87 %tmp4 = sitofp i32 %tmp to double
88 %tmp5 = tail call double @llvm.fma.f64(double 0.000000e+00, double -0.000000e+00, double %tmp4)
89 %tmp6 = fptosi double %tmp5 to i32
90 %tmp7 = icmp eq i32 %tmp2, 0
91 br i1 %tmp7, label %bb8, label %bb1
94 call void @wibble(i32 %tmp6)
98 declare void @wibble(i32)
99 declare double @llvm.fmuladd.f64(double, double, double)
100 declare double @llvm.fma.f64(double, double, double)
102 attributes #0 = { nounwind }