1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 2
2 ; RUN: llc -verify-machineinstrs -ppc-asm-full-reg-names \
3 ; RUN: -mtriple=powerpc64-unknown-linux-gnu < %s | FileCheck %s
4 define dso_local void @calc_buffer() local_unnamed_addr #0 {
5 ; CHECK-LABEL: calc_buffer:
7 ; CHECK-NEXT: ld r3, 0(r3)
8 ; CHECK-NEXT: sradi r5, r3, 53
9 ; CHECK-NEXT: rldicl r6, r3, 63, 1
10 ; CHECK-NEXT: clrldi r7, r3, 63
11 ; CHECK-NEXT: clrldi r4, r3, 53
12 ; CHECK-NEXT: addi r5, r5, 1
13 ; CHECK-NEXT: or r7, r7, r6
14 ; CHECK-NEXT: cmpldi r5, 1
15 ; CHECK-NEXT: clrldi r5, r7, 53
16 ; CHECK-NEXT: addi r4, r4, 2047
17 ; CHECK-NEXT: addi r5, r5, 2047
18 ; CHECK-NEXT: or r5, r5, r6
19 ; CHECK-NEXT: rldicl r6, r3, 10, 54
20 ; CHECK-NEXT: or r4, r4, r3
21 ; CHECK-NEXT: addi r6, r6, 1
22 ; CHECK-NEXT: rldicl r5, r5, 53, 11
23 ; CHECK-NEXT: cmpldi cr1, r6, 1
24 ; CHECK-NEXT: rldicr r4, r4, 0, 52
25 ; CHECK-NEXT: rldicl r5, r5, 11, 1
26 ; CHECK-NEXT: bc 12, gt, .LBB0_2
27 ; CHECK-NEXT: # %bb.1:
28 ; CHECK-NEXT: ori r4, r3, 0
29 ; CHECK-NEXT: b .LBB0_2
30 ; CHECK-NEXT: .LBB0_2:
31 ; CHECK-NEXT: bc 12, 4*cr1+gt, .LBB0_4
32 ; CHECK-NEXT: # %bb.3:
33 ; CHECK-NEXT: ori r5, r7, 0
34 ; CHECK-NEXT: b .LBB0_4
35 ; CHECK-NEXT: .LBB0_4:
36 ; CHECK-NEXT: cmpdi r3, 0
37 ; CHECK-NEXT: std r4, -32(r1)
38 ; CHECK-NEXT: std r5, -24(r1)
39 ; CHECK-NEXT: bc 12, lt, .LBB0_6
40 ; CHECK-NEXT: # %bb.5:
41 ; CHECK-NEXT: lfd f0, -32(r1)
42 ; CHECK-NEXT: fcfid f0, f0
43 ; CHECK-NEXT: frsp f0, f0
44 ; CHECK-NEXT: b .LBB0_7
45 ; CHECK-NEXT: .LBB0_6:
46 ; CHECK-NEXT: lfd f0, -24(r1)
47 ; CHECK-NEXT: fcfid f0, f0
48 ; CHECK-NEXT: frsp f0, f0
49 ; CHECK-NEXT: fadds f0, f0, f0
50 ; CHECK-NEXT: .LBB0_7:
51 ; CHECK-NEXT: addis r3, r2, .LCPI0_0@toc@ha
52 ; CHECK-NEXT: li r4, 1
53 ; CHECK-NEXT: lfs f1, .LCPI0_0@toc@l(r3)
54 ; CHECK-NEXT: rldic r4, r4, 63, 0
55 ; CHECK-NEXT: fsubs f2, f0, f1
56 ; CHECK-NEXT: fctidz f2, f2
57 ; CHECK-NEXT: stfd f2, -8(r1)
58 ; CHECK-NEXT: fctidz f2, f0
59 ; CHECK-NEXT: stfd f2, -16(r1)
60 ; CHECK-NEXT: ld r3, -8(r1)
61 ; CHECK-NEXT: ld r5, -16(r1)
62 ; CHECK-NEXT: fcmpu cr0, f0, f1
63 ; CHECK-NEXT: xor r3, r3, r4
64 ; CHECK-NEXT: bc 12, lt, .LBB0_8
65 ; CHECK-NEXT: b .LBB0_9
66 ; CHECK-NEXT: .LBB0_8:
67 ; CHECK-NEXT: addi r3, r5, 0
68 ; CHECK-NEXT: .LBB0_9:
69 ; CHECK-NEXT: std r3, 0(r3)
70 %load_initial = load i64, ptr poison, align 8
71 %conv39 = uitofp i64 %load_initial to float
72 %add48 = fadd float 0.000000e+00, %conv39
73 %conv49 = fptoui float %add48 to i64
74 store i64 %conv49, ptr poison, align 8