Debian Codegraph @

llvm/test/CodeGen/PowerPC/p10-splatImm-CPload-pcrel.ll

raw
1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -verify-machineinstrs -mtriple=powerpc64le-unknown-linux-gnu -O2 \
3 ; RUN: -ppc-asm-full-reg-names -mcpu=pwr10 < %s | FileCheck %s --check-prefixes=CHECK-LE
4 ; RUN: llc -verify-machineinstrs -mtriple=powerpc64-unknown-linux-gnu -O2 \
5 ; RUN: -ppc-asm-full-reg-names -mcpu=pwr10 < %s | FileCheck %s \
6 ; RUN: --check-prefixes=CHECK-NOPCREL-BE
7 ; RUN: llc -verify-machineinstrs -mtriple=powerpc64le-unknown-linux-gnu -O2 \
8 ; RUN: -mattr=-pcrelative-memops -ppc-asm-full-reg-names -mcpu=pwr10 < %s | \
9 ; RUN: FileCheck %s --check-prefixes=CHECK-NOPCREL-LE
10 ; RUN: llc -verify-machineinstrs -mtriple=powerpc64le-unknown-linux-gnu -O2 \
11 ; RUN: -mattr=-prefix-instrs -ppc-asm-full-reg-names -mcpu=pwr10 < %s | \
12 ; RUN: FileCheck %s --check-prefixes=CHECK-NOPREFIX
13 ; RUN: llc -verify-machineinstrs -mtriple=powerpc64-unknown-linux-gnu -O2 \
14 ; RUN: -ppc-asm-full-reg-names -target-abi=elfv2 -mcpu=pwr10 < %s | \
15 ; RUN: FileCheck %s --check-prefixes=CHECK-BE
16
17 define dso_local <2 x double> @testDoubleToDoubleFail() local_unnamed_addr {
18 ; CHECK-LE-LABEL: testDoubleToDoubleFail:
19 ; CHECK-LE: # %bb.0: # %entry
20 ; CHECK-LE-NEXT: xxsplti32dx vs34, 0, 1081435463
21 ; CHECK-LE-NEXT: xxsplti32dx vs34, 1, -1374389535
22 ; CHECK-LE-NEXT: blr
23 ;
24 ; CHECK-NOPCREL-BE-LABEL: testDoubleToDoubleFail:
25 ; CHECK-NOPCREL-BE: # %bb.0: # %entry
26 ; CHECK-NOPCREL-BE-NEXT: xxsplti32dx vs34, 0, 1081435463
27 ; CHECK-NOPCREL-BE-NEXT: xxsplti32dx vs34, 1, -1374389535
28 ; CHECK-NOPCREL-BE-NEXT: blr
29 ;
30 ; CHECK-NOPCREL-LE-LABEL: testDoubleToDoubleFail:
31 ; CHECK-NOPCREL-LE: # %bb.0: # %entry
32 ; CHECK-NOPCREL-LE-NEXT: xxsplti32dx vs34, 0, 1081435463
33 ; CHECK-NOPCREL-LE-NEXT: xxsplti32dx vs34, 1, -1374389535
34 ; CHECK-NOPCREL-LE-NEXT: blr
35 ;
36 ; CHECK-NOPREFIX-LABEL: testDoubleToDoubleFail:
37 ; CHECK-NOPREFIX: # %bb.0: # %entry
38 ; CHECK-NOPREFIX-NEXT: addis r3, r2, .LCPI0_0@toc@ha
39 ; CHECK-NOPREFIX-NEXT: addi r3, r3, .LCPI0_0@toc@l
40 ; CHECK-NOPREFIX-NEXT: lxv vs34, 0(r3)
41 ; CHECK-NOPREFIX-NEXT: blr
42 ;
43 ; CHECK-BE-LABEL: testDoubleToDoubleFail:
44 ; CHECK-BE: # %bb.0: # %entry
45 ; CHECK-BE-NEXT: xxsplti32dx vs34, 0, 1081435463
46 ; CHECK-BE-NEXT: xxsplti32dx vs34, 1, -1374389535
47 ; CHECK-BE-NEXT: blr
48 entry:
49 ret <2 x double> <double 3.423300e+02, double 3.423300e+02>
50 }
51
52 define dso_local <2 x double> @testFloatDenormToDouble() local_unnamed_addr {
53 ; CHECK-LE-LABEL: testFloatDenormToDouble:
54 ; CHECK-LE: # %bb.0: # %entry
55 ; CHECK-LE-NEXT: xxsplti32dx vs34, 0, 940259579
56 ; CHECK-LE-NEXT: xxsplti32dx vs34, 1, -2147483648
57 ; CHECK-LE-NEXT: blr
58 ;
59 ; CHECK-NOPCREL-BE-LABEL: testFloatDenormToDouble:
60 ; CHECK-NOPCREL-BE: # %bb.0: # %entry
61 ; CHECK-NOPCREL-BE-NEXT: xxsplti32dx vs34, 0, 940259579
62 ; CHECK-NOPCREL-BE-NEXT: xxsplti32dx vs34, 1, -2147483648
63 ; CHECK-NOPCREL-BE-NEXT: blr
64 ;
65 ; CHECK-NOPCREL-LE-LABEL: testFloatDenormToDouble:
66 ; CHECK-NOPCREL-LE: # %bb.0: # %entry
67 ; CHECK-NOPCREL-LE-NEXT: xxsplti32dx vs34, 0, 940259579
68 ; CHECK-NOPCREL-LE-NEXT: xxsplti32dx vs34, 1, -2147483648
69 ; CHECK-NOPCREL-LE-NEXT: blr
70 ;
71 ; CHECK-NOPREFIX-LABEL: testFloatDenormToDouble:
72 ; CHECK-NOPREFIX: # %bb.0: # %entry
73 ; CHECK-NOPREFIX-NEXT: addis r3, r2, .LCPI1_0@toc@ha
74 ; CHECK-NOPREFIX-NEXT: addi r3, r3, .LCPI1_0@toc@l
75 ; CHECK-NOPREFIX-NEXT: lxv vs34, 0(r3)
76 ; CHECK-NOPREFIX-NEXT: blr
77 ;
78 ; CHECK-BE-LABEL: testFloatDenormToDouble:
79 ; CHECK-BE: # %bb.0: # %entry
80 ; CHECK-BE-NEXT: xxsplti32dx vs34, 0, 940259579
81 ; CHECK-BE-NEXT: xxsplti32dx vs34, 1, -2147483648
82 ; CHECK-BE-NEXT: blr
83 entry:
84 ret <2 x double> <double 0x380B38FB80000000, double 0x380B38FB80000000>
85 }
86
87 define dso_local <2 x double> @testDoubleToDoubleNaNFail() local_unnamed_addr {
88 ; CHECK-LE-LABEL: testDoubleToDoubleNaNFail:
89 ; CHECK-LE: # %bb.0: # %entry
90 ; CHECK-LE-NEXT: xxsplti32dx vs34, 0, -1
91 ; CHECK-LE-NEXT: xxsplti32dx vs34, 1, -16
92 ; CHECK-LE-NEXT: blr
93 ;
94 ; CHECK-NOPCREL-BE-LABEL: testDoubleToDoubleNaNFail:
95 ; CHECK-NOPCREL-BE: # %bb.0: # %entry
96 ; CHECK-NOPCREL-BE-NEXT: xxsplti32dx vs34, 0, -1
97 ; CHECK-NOPCREL-BE-NEXT: xxsplti32dx vs34, 1, -16
98 ; CHECK-NOPCREL-BE-NEXT: blr
99 ;
100 ; CHECK-NOPCREL-LE-LABEL: testDoubleToDoubleNaNFail:
101 ; CHECK-NOPCREL-LE: # %bb.0: # %entry
102 ; CHECK-NOPCREL-LE-NEXT: xxsplti32dx vs34, 0, -1
103 ; CHECK-NOPCREL-LE-NEXT: xxsplti32dx vs34, 1, -16
104 ; CHECK-NOPCREL-LE-NEXT: blr
105 ;
106 ; CHECK-NOPREFIX-LABEL: testDoubleToDoubleNaNFail:
107 ; CHECK-NOPREFIX: # %bb.0: # %entry
108 ; CHECK-NOPREFIX-NEXT: vspltisw v2, -16
109 ; CHECK-NOPREFIX-NEXT: vupklsw v2, v2
110 ; CHECK-NOPREFIX-NEXT: blr
111 ;
112 ; CHECK-BE-LABEL: testDoubleToDoubleNaNFail:
113 ; CHECK-BE: # %bb.0: # %entry
114 ; CHECK-BE-NEXT: xxsplti32dx vs34, 0, -1
115 ; CHECK-BE-NEXT: xxsplti32dx vs34, 1, -16
116 ; CHECK-BE-NEXT: blr
117 entry:
118 ret <2 x double> <double 0xFFFFFFFFFFFFFFF0, double 0xFFFFFFFFFFFFFFF0>
119 }
120
121 define dso_local double @testDoubleNonRepresentableScalar() local_unnamed_addr {
122 ; CHECK-LE-LABEL: testDoubleNonRepresentableScalar:
123 ; CHECK-LE: # %bb.0: # %entry
124 ; CHECK-LE-NEXT: xxsplti32dx vs1, 0, 1081435463
125 ; CHECK-LE-NEXT: xxsplti32dx vs1, 1, -1374389535
126 ; CHECK-LE-NEXT: blr
127 ;
128 ; CHECK-NOPCREL-BE-LABEL: testDoubleNonRepresentableScalar:
129 ; CHECK-NOPCREL-BE: # %bb.0: # %entry
130 ; CHECK-NOPCREL-BE-NEXT: xxsplti32dx vs1, 0, 1081435463
131 ; CHECK-NOPCREL-BE-NEXT: xxsplti32dx vs1, 1, -1374389535
132 ; CHECK-NOPCREL-BE-NEXT: blr
133 ;
134 ; CHECK-NOPCREL-LE-LABEL: testDoubleNonRepresentableScalar:
135 ; CHECK-NOPCREL-LE: # %bb.0: # %entry
136 ; CHECK-NOPCREL-LE-NEXT: xxsplti32dx vs1, 0, 1081435463
137 ; CHECK-NOPCREL-LE-NEXT: xxsplti32dx vs1, 1, -1374389535
138 ; CHECK-NOPCREL-LE-NEXT: blr
139 ;
140 ; CHECK-NOPREFIX-LABEL: testDoubleNonRepresentableScalar:
141 ; CHECK-NOPREFIX: # %bb.0: # %entry
142 ; CHECK-NOPREFIX-NEXT: addis r3, r2, .LCPI3_0@toc@ha
143 ; CHECK-NOPREFIX-NEXT: lfd f1, .LCPI3_0@toc@l(r3)
144 ; CHECK-NOPREFIX-NEXT: blr
145 ;
146 ; CHECK-BE-LABEL: testDoubleNonRepresentableScalar:
147 ; CHECK-BE: # %bb.0: # %entry
148 ; CHECK-BE-NEXT: xxsplti32dx vs1, 0, 1081435463
149 ; CHECK-BE-NEXT: xxsplti32dx vs1, 1, -1374389535
150 ; CHECK-BE-NEXT: blr
151 entry:
152 ret double 3.423300e+02
153 }
154
155 define dso_local float @testFloatDenormScalar() local_unnamed_addr {
156 ; CHECK-LE-LABEL: testFloatDenormScalar:
157 ; CHECK-LE: # %bb.0: # %entry
158 ; CHECK-LE-NEXT: xxsplti32dx vs1, 0, 940259579
159 ; CHECK-LE-NEXT: xxsplti32dx vs1, 1, -2147483648
160 ; CHECK-LE-NEXT: blr
161 ;
162 ; CHECK-NOPCREL-BE-LABEL: testFloatDenormScalar:
163 ; CHECK-NOPCREL-BE: # %bb.0: # %entry
164 ; CHECK-NOPCREL-BE-NEXT: xxsplti32dx vs1, 0, 940259579
165 ; CHECK-NOPCREL-BE-NEXT: xxsplti32dx vs1, 1, -2147483648
166 ; CHECK-NOPCREL-BE-NEXT: blr
167 ;
168 ; CHECK-NOPCREL-LE-LABEL: testFloatDenormScalar:
169 ; CHECK-NOPCREL-LE: # %bb.0: # %entry
170 ; CHECK-NOPCREL-LE-NEXT: xxsplti32dx vs1, 0, 940259579
171 ; CHECK-NOPCREL-LE-NEXT: xxsplti32dx vs1, 1, -2147483648
172 ; CHECK-NOPCREL-LE-NEXT: blr
173 ;
174 ; CHECK-NOPREFIX-LABEL: testFloatDenormScalar:
175 ; CHECK-NOPREFIX: # %bb.0: # %entry
176 ; CHECK-NOPREFIX-NEXT: addis r3, r2, .LCPI4_0@toc@ha
177 ; CHECK-NOPREFIX-NEXT: lfs f1, .LCPI4_0@toc@l(r3)
178 ; CHECK-NOPREFIX-NEXT: blr
179 ;
180 ; CHECK-BE-LABEL: testFloatDenormScalar:
181 ; CHECK-BE: # %bb.0: # %entry
182 ; CHECK-BE-NEXT: xxsplti32dx vs1, 0, 940259579
183 ; CHECK-BE-NEXT: xxsplti32dx vs1, 1, -2147483648
184 ; CHECK-BE-NEXT: blr
185 entry:
186 ret float 0x380B38FB80000000
187 }
188
189 define dso_local double @testFloatDenormToDoubleScalar() local_unnamed_addr {
190 ; CHECK-LE-LABEL: testFloatDenormToDoubleScalar:
191 ; CHECK-LE: # %bb.0: # %entry
192 ; CHECK-LE-NEXT: xxsplti32dx vs1, 0, 940259579
193 ; CHECK-LE-NEXT: xxsplti32dx vs1, 1, -2147483648
194 ; CHECK-LE-NEXT: blr
195 ;
196 ; CHECK-NOPCREL-BE-LABEL: testFloatDenormToDoubleScalar:
197 ; CHECK-NOPCREL-BE: # %bb.0: # %entry
198 ; CHECK-NOPCREL-BE-NEXT: xxsplti32dx vs1, 0, 940259579
199 ; CHECK-NOPCREL-BE-NEXT: xxsplti32dx vs1, 1, -2147483648
200 ; CHECK-NOPCREL-BE-NEXT: blr
201 ;
202 ; CHECK-NOPCREL-LE-LABEL: testFloatDenormToDoubleScalar:
203 ; CHECK-NOPCREL-LE: # %bb.0: # %entry
204 ; CHECK-NOPCREL-LE-NEXT: xxsplti32dx vs1, 0, 940259579
205 ; CHECK-NOPCREL-LE-NEXT: xxsplti32dx vs1, 1, -2147483648
206 ; CHECK-NOPCREL-LE-NEXT: blr
207 ;
208 ; CHECK-NOPREFIX-LABEL: testFloatDenormToDoubleScalar:
209 ; CHECK-NOPREFIX: # %bb.0: # %entry
210 ; CHECK-NOPREFIX-NEXT: addis r3, r2, .LCPI5_0@toc@ha
211 ; CHECK-NOPREFIX-NEXT: lfs f1, .LCPI5_0@toc@l(r3)
212 ; CHECK-NOPREFIX-NEXT: blr
213 ;
214 ; CHECK-BE-LABEL: testFloatDenormToDoubleScalar:
215 ; CHECK-BE: # %bb.0: # %entry
216 ; CHECK-BE-NEXT: xxsplti32dx vs1, 0, 940259579
217 ; CHECK-BE-NEXT: xxsplti32dx vs1, 1, -2147483648
218 ; CHECK-BE-NEXT: blr
219 entry:
220 ret double 0x380B38FB80000000
221 }