llvm.org GIT mirror llvm / 5d61adf
[NFC][PowerPC] Add test case for D64195 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@366191 91177308-0d34-0410-b5e6-96231b3b80d8 Zi Xuan Wu 3 months ago
1 changed file(s) with 106 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
0 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
1 ; RUN: llc -verify-machineinstrs < %s -mcpu=pwr9 -mtriple=powerpc64le-ibm-linux| FileCheck %s
2
3 ; This file verifies that for a given floating point load / store pair,
4 ; if the load value isn't used by any other operations,
5 ; then consider transforming the pair to integer load / store operations
6
7 @a1 = local_unnamed_addr global double 0.000000e+00, align 8
8 @a2 = local_unnamed_addr global double 0.000000e+00, align 8
9 @a3 = local_unnamed_addr global double 0.000000e+00, align 8
10 @a4 = local_unnamed_addr global double 0.000000e+00, align 8
11 @a5 = local_unnamed_addr global double 0.000000e+00, align 8
12 @a6 = local_unnamed_addr global double 0.000000e+00, align 8
13 @a7 = local_unnamed_addr global double 0.000000e+00, align 8
14 @a8 = local_unnamed_addr global double 0.000000e+00, align 8
15 @a9 = local_unnamed_addr global double 0.000000e+00, align 8
16 @a10 = local_unnamed_addr global double 0.000000e+00, align 8
17 @a11 = local_unnamed_addr global double 0.000000e+00, align 8
18 @a12 = local_unnamed_addr global double 0.000000e+00, align 8
19 @a13 = local_unnamed_addr global double 0.000000e+00, align 8
20 @a14 = local_unnamed_addr global double 0.000000e+00, align 8
21 @a15 = local_unnamed_addr global double 0.000000e+00, align 8
22 @a16 = local_unnamed_addr global ppc_fp128 0xM00000000000000000000000000000000, align 16
23 @a17 = local_unnamed_addr global fp128 0xL00000000000000000000000000000000, align 16
24
25 ; Because this test function is trying to pass float argument by stack,
26 ; so the fpr is only used to load/store float argument
27 define signext i32 @test() {
28 ; CHECK-LABEL: test:
29 ; CHECK: # %bb.0:
30 ; CHECK-NEXT: mflr 0
31 ; CHECK-NEXT: std 0, 16(1)
32 ; CHECK-NEXT: stdu 1, -192(1)
33 ; CHECK-NEXT: .cfi_def_cfa_offset 192
34 ; CHECK-NEXT: .cfi_offset lr, 16
35 ; CHECK-NEXT: addis 3, 2, a1@toc@ha
36 ; CHECK-NEXT: lfd 1, a1@toc@l(3)
37 ; CHECK-NEXT: addis 3, 2, a2@toc@ha
38 ; CHECK-NEXT: lfd 2, a2@toc@l(3)
39 ; CHECK-NEXT: addis 3, 2, a3@toc@ha
40 ; CHECK-NEXT: lfd 3, a3@toc@l(3)
41 ; CHECK-NEXT: addis 3, 2, a4@toc@ha
42 ; CHECK-NEXT: lfd 4, a4@toc@l(3)
43 ; CHECK-NEXT: addis 3, 2, a5@toc@ha
44 ; CHECK-NEXT: lfd 5, a5@toc@l(3)
45 ; CHECK-NEXT: addis 3, 2, a6@toc@ha
46 ; CHECK-NEXT: lfd 6, a6@toc@l(3)
47 ; CHECK-NEXT: addis 3, 2, a7@toc@ha
48 ; CHECK-NEXT: lfd 7, a7@toc@l(3)
49 ; CHECK-NEXT: addis 3, 2, a8@toc@ha
50 ; CHECK-NEXT: lfd 8, a8@toc@l(3)
51 ; CHECK-NEXT: addis 3, 2, a9@toc@ha
52 ; CHECK-NEXT: lfd 9, a9@toc@l(3)
53 ; CHECK-NEXT: addis 3, 2, a10@toc@ha
54 ; CHECK-NEXT: lfd 10, a10@toc@l(3)
55 ; CHECK-NEXT: addis 3, 2, a11@toc@ha
56 ; CHECK-NEXT: lfd 11, a11@toc@l(3)
57 ; CHECK-NEXT: addis 3, 2, a12@toc@ha
58 ; CHECK-NEXT: lfd 12, a12@toc@l(3)
59 ; CHECK-NEXT: addis 3, 2, a13@toc@ha
60 ; CHECK-NEXT: lfd 13, a13@toc@l(3)
61 ; CHECK-NEXT: addis 3, 2, a14@toc@ha
62 ; CHECK-NEXT: lfd 0, a14@toc@l(3)
63 ; CHECK-NEXT: addis 3, 2, a15@toc@ha
64 ; CHECK-NEXT: addis 4, 2, a17@toc@ha
65 ; CHECK-NEXT: addi 4, 4, a17@toc@l
66 ; CHECK-NEXT: lxsd 2, a15@toc@l(3)
67 ; CHECK-NEXT: addis 3, 2, a16@toc@ha
68 ; CHECK-NEXT: addi 3, 3, a16@toc@l
69 ; CHECK-NEXT: lxvx 36, 0, 4
70 ; CHECK-NEXT: lxvx 35, 0, 3
71 ; CHECK-NEXT: li 3, 168
72 ; CHECK-NEXT: stxvx 36, 1, 3
73 ; CHECK-NEXT: li 3, 152
74 ; CHECK-NEXT: stxvx 35, 1, 3
75 ; CHECK-NEXT: stxsd 2, 144(1)
76 ; CHECK-NEXT: stfd 0, 136(1)
77 ; CHECK-NEXT: bl _Z3fooddddddddddddddd
78 ; CHECK-NEXT: nop
79 ; CHECK-NEXT: li 3, 0
80 ; CHECK-NEXT: addi 1, 1, 192
81 ; CHECK-NEXT: ld 0, 16(1)
82 ; CHECK-NEXT: mtlr 0
83 ; CHECK-NEXT: blr
84 %1 = load double, double* @a1, align 8
85 %2 = load double, double* @a2, align 8
86 %3 = load double, double* @a3, align 8
87 %4 = load double, double* @a4, align 8
88 %5 = load double, double* @a5, align 8
89 %6 = load double, double* @a6, align 8
90 %7 = load double, double* @a7, align 8
91 %8 = load double, double* @a8, align 8
92 %9 = load double, double* @a9, align 8
93 %10 = load double, double* @a10, align 8
94 %11 = load double, double* @a11, align 8
95 %12 = load double, double* @a12, align 8
96 %13 = load double, double* @a13, align 8
97 %14 = load double, double* @a14, align 8
98 %15 = load double, double* @a15, align 8
99 %16 = load ppc_fp128, ppc_fp128* @a16, align 16
100 %17 = load fp128, fp128* @a17, align 16
101 tail call void @_Z3fooddddddddddddddd(double %1, double %2, double %3, double %4, double %5, double %6, double %7, double %8, double %9, double %10, double %11, double %12, double %13, double %14, double %15, ppc_fp128 %16, fp128 %17)
102 ret i32 0
103 }
104
105 declare void @_Z3fooddddddddddddddd(double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, ppc_fp128, fp128)