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
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
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
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
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
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
49 ret <2 x double> <double 3.423300e+02, double 3.423300e+02>
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
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
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
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
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
84 ret <2 x double> <double 0x380B38FB80000000, double 0x380B38FB80000000>
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
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
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
106 ; CHECK-NOPREFIX-LABEL: testDoubleToDoubleNaNFail:
107 ; CHECK-NOPREFIX: # %bb.0: # %entry
108 ; CHECK-NOPREFIX-NEXT: addis r3, r2, .LCPI2_0@toc@ha
109 ; CHECK-NOPREFIX-NEXT: addi r3, r3, .LCPI2_0@toc@l
110 ; CHECK-NOPREFIX-NEXT: lxv vs34, 0(r3)
111 ; CHECK-NOPREFIX-NEXT: blr
113 ; CHECK-BE-LABEL: testDoubleToDoubleNaNFail:
114 ; CHECK-BE: # %bb.0: # %entry
115 ; CHECK-BE-NEXT: xxsplti32dx vs34, 0, -1
116 ; CHECK-BE-NEXT: xxsplti32dx vs34, 1, -16
119 ret <2 x double> <double 0xFFFFFFFFFFFFFFF0, double 0xFFFFFFFFFFFFFFF0>
122 define dso_local double @testDoubleNonRepresentableScalar() local_unnamed_addr {
123 ; CHECK-LE-LABEL: testDoubleNonRepresentableScalar:
124 ; CHECK-LE: # %bb.0: # %entry
125 ; CHECK-LE-NEXT: xxsplti32dx vs1, 0, 1081435463
126 ; CHECK-LE-NEXT: xxsplti32dx vs1, 1, -1374389535
127 ; CHECK-LE-NEXT: # kill: def $f1 killed $f1 killed $vsl1
130 ; CHECK-NOPCREL-BE-LABEL: testDoubleNonRepresentableScalar:
131 ; CHECK-NOPCREL-BE: # %bb.0: # %entry
132 ; CHECK-NOPCREL-BE-NEXT: xxsplti32dx vs1, 0, 1081435463
133 ; CHECK-NOPCREL-BE-NEXT: xxsplti32dx vs1, 1, -1374389535
134 ; CHECK-NOPCREL-BE-NEXT: # kill: def $f1 killed $f1 killed $vsl1
135 ; CHECK-NOPCREL-BE-NEXT: blr
137 ; CHECK-NOPCREL-LE-LABEL: testDoubleNonRepresentableScalar:
138 ; CHECK-NOPCREL-LE: # %bb.0: # %entry
139 ; CHECK-NOPCREL-LE-NEXT: xxsplti32dx vs1, 0, 1081435463
140 ; CHECK-NOPCREL-LE-NEXT: xxsplti32dx vs1, 1, -1374389535
141 ; CHECK-NOPCREL-LE-NEXT: # kill: def $f1 killed $f1 killed $vsl1
142 ; CHECK-NOPCREL-LE-NEXT: blr
144 ; CHECK-NOPREFIX-LABEL: testDoubleNonRepresentableScalar:
145 ; CHECK-NOPREFIX: # %bb.0: # %entry
146 ; CHECK-NOPREFIX-NEXT: addis r3, r2, .LCPI3_0@toc@ha
147 ; CHECK-NOPREFIX-NEXT: lfd f1, .LCPI3_0@toc@l(r3)
148 ; CHECK-NOPREFIX-NEXT: blr
150 ; CHECK-BE-LABEL: testDoubleNonRepresentableScalar:
151 ; CHECK-BE: # %bb.0: # %entry
152 ; CHECK-BE-NEXT: xxsplti32dx vs1, 0, 1081435463
153 ; CHECK-BE-NEXT: xxsplti32dx vs1, 1, -1374389535
154 ; CHECK-BE-NEXT: # kill: def $f1 killed $f1 killed $vsl1
157 ret double 3.423300e+02
160 define dso_local float @testFloatDenormScalar() local_unnamed_addr {
161 ; CHECK-LE-LABEL: testFloatDenormScalar:
162 ; CHECK-LE: # %bb.0: # %entry
163 ; CHECK-LE-NEXT: xxsplti32dx vs1, 0, 940259579
164 ; CHECK-LE-NEXT: xxsplti32dx vs1, 1, -2147483648
165 ; CHECK-LE-NEXT: # kill: def $f1 killed $f1 killed $vsl1
168 ; CHECK-NOPCREL-BE-LABEL: testFloatDenormScalar:
169 ; CHECK-NOPCREL-BE: # %bb.0: # %entry
170 ; CHECK-NOPCREL-BE-NEXT: xxsplti32dx vs1, 0, 940259579
171 ; CHECK-NOPCREL-BE-NEXT: xxsplti32dx vs1, 1, -2147483648
172 ; CHECK-NOPCREL-BE-NEXT: # kill: def $f1 killed $f1 killed $vsl1
173 ; CHECK-NOPCREL-BE-NEXT: blr
175 ; CHECK-NOPCREL-LE-LABEL: testFloatDenormScalar:
176 ; CHECK-NOPCREL-LE: # %bb.0: # %entry
177 ; CHECK-NOPCREL-LE-NEXT: xxsplti32dx vs1, 0, 940259579
178 ; CHECK-NOPCREL-LE-NEXT: xxsplti32dx vs1, 1, -2147483648
179 ; CHECK-NOPCREL-LE-NEXT: # kill: def $f1 killed $f1 killed $vsl1
180 ; CHECK-NOPCREL-LE-NEXT: blr
182 ; CHECK-NOPREFIX-LABEL: testFloatDenormScalar:
183 ; CHECK-NOPREFIX: # %bb.0: # %entry
184 ; CHECK-NOPREFIX-NEXT: addis r3, r2, .LCPI4_0@toc@ha
185 ; CHECK-NOPREFIX-NEXT: lfs f1, .LCPI4_0@toc@l(r3)
186 ; CHECK-NOPREFIX-NEXT: blr
188 ; CHECK-BE-LABEL: testFloatDenormScalar:
189 ; CHECK-BE: # %bb.0: # %entry
190 ; CHECK-BE-NEXT: xxsplti32dx vs1, 0, 940259579
191 ; CHECK-BE-NEXT: xxsplti32dx vs1, 1, -2147483648
192 ; CHECK-BE-NEXT: # kill: def $f1 killed $f1 killed $vsl1
195 ret float 0x380B38FB80000000
198 define dso_local double @testFloatDenormToDoubleScalar() local_unnamed_addr {
199 ; CHECK-LE-LABEL: testFloatDenormToDoubleScalar:
200 ; CHECK-LE: # %bb.0: # %entry
201 ; CHECK-LE-NEXT: xxsplti32dx vs1, 0, 940259579
202 ; CHECK-LE-NEXT: xxsplti32dx vs1, 1, -2147483648
203 ; CHECK-LE-NEXT: # kill: def $f1 killed $f1 killed $vsl1
206 ; CHECK-NOPCREL-BE-LABEL: testFloatDenormToDoubleScalar:
207 ; CHECK-NOPCREL-BE: # %bb.0: # %entry
208 ; CHECK-NOPCREL-BE-NEXT: xxsplti32dx vs1, 0, 940259579
209 ; CHECK-NOPCREL-BE-NEXT: xxsplti32dx vs1, 1, -2147483648
210 ; CHECK-NOPCREL-BE-NEXT: # kill: def $f1 killed $f1 killed $vsl1
211 ; CHECK-NOPCREL-BE-NEXT: blr
213 ; CHECK-NOPCREL-LE-LABEL: testFloatDenormToDoubleScalar:
214 ; CHECK-NOPCREL-LE: # %bb.0: # %entry
215 ; CHECK-NOPCREL-LE-NEXT: xxsplti32dx vs1, 0, 940259579
216 ; CHECK-NOPCREL-LE-NEXT: xxsplti32dx vs1, 1, -2147483648
217 ; CHECK-NOPCREL-LE-NEXT: # kill: def $f1 killed $f1 killed $vsl1
218 ; CHECK-NOPCREL-LE-NEXT: blr
220 ; CHECK-NOPREFIX-LABEL: testFloatDenormToDoubleScalar:
221 ; CHECK-NOPREFIX: # %bb.0: # %entry
222 ; CHECK-NOPREFIX-NEXT: addis r3, r2, .LCPI5_0@toc@ha
223 ; CHECK-NOPREFIX-NEXT: lfs f1, .LCPI5_0@toc@l(r3)
224 ; CHECK-NOPREFIX-NEXT: blr
226 ; CHECK-BE-LABEL: testFloatDenormToDoubleScalar:
227 ; CHECK-BE: # %bb.0: # %entry
228 ; CHECK-BE-NEXT: xxsplti32dx vs1, 0, 940259579
229 ; CHECK-BE-NEXT: xxsplti32dx vs1, 1, -2147483648
230 ; CHECK-BE-NEXT: # kill: def $f1 killed $f1 killed $vsl1
233 ret double 0x380B38FB80000000