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