1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -mtriple=powerpc64-unknown-unknown -verify-machineinstrs \
3 ; RUN: -ppc-asm-full-reg-names < %s | FileCheck %s
4 @a = dso_local local_unnamed_addr global double 0.000000e+00, align 8
6 define dso_local signext i32 @b() local_unnamed_addr #0 {
8 ; CHECK: # %bb.0: # %entry
10 ; CHECK-NEXT: stdu r1, -144(r1)
11 ; CHECK-NEXT: std r0, 160(r1)
12 ; CHECK-NEXT: addis r3, r2, a@toc@ha
13 ; CHECK-NEXT: lfd f0, a@toc@l(r3)
14 ; CHECK-NEXT: addis r3, r2, .LCPI0_0@toc@ha
15 ; CHECK-NEXT: lfs f1, .LCPI0_0@toc@l(r3)
16 ; CHECK-NEXT: fsub f2, f0, f1
17 ; CHECK-NEXT: fctidz f2, f2
18 ; CHECK-NEXT: stfd f2, 128(r1)
19 ; CHECK-NEXT: fctidz f2, f0
20 ; CHECK-NEXT: fcmpu cr0, f0, f1
21 ; CHECK-NEXT: stfd f2, 120(r1)
22 ; CHECK-NEXT: blt cr0, .LBB0_2
23 ; CHECK-NEXT: # %bb.1: # %entry
24 ; CHECK-NEXT: ld r3, 128(r1)
25 ; CHECK-NEXT: li r4, 1
26 ; CHECK-NEXT: rldic r4, r4, 63, 0
27 ; CHECK-NEXT: xor r3, r3, r4
28 ; CHECK-NEXT: b .LBB0_3
29 ; CHECK-NEXT: .LBB0_2:
30 ; CHECK-NEXT: ld r3, 120(r1)
31 ; CHECK-NEXT: .LBB0_3: # %entry
32 ; CHECK-NEXT: std r3, 112(r1)
33 ; CHECK-NEXT: addis r3, r2, .LCPI0_1@toc@ha
34 ; CHECK-NEXT: lfd f0, 112(r1)
35 ; CHECK-NEXT: lfs f1, .LCPI0_1@toc@l(r3)
36 ; CHECK-NEXT: fcfid f0, f0
37 ; CHECK-NEXT: fmul f0, f0, f1
38 ; CHECK-NEXT: fctiwz f0, f0
39 ; CHECK-NEXT: stfd f0, 136(r1)
40 ; CHECK-NEXT: lwa r3, 140(r1)
43 ; CHECK-NEXT: addi r1, r1, 144
44 ; CHECK-NEXT: ld r0, 16(r1)
48 %0 = load double, ptr @a, align 8
49 %conv = fptoui double %0 to i64
50 %conv1 = sitofp i64 %conv to double
51 %mul = fmul double %conv1, 1.000000e+06
52 %conv2 = fptosi double %mul to i32
53 %call = tail call signext i32 @g(i32 signext %conv2) #0
57 declare signext i32 @g(i32 signext) local_unnamed_addr
59 attributes #0 = { nounwind }