builtins-ppc-elf2-abi.ll
8.94 KB
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
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
; RUN: llc -verify-machineinstrs -mtriple=powerpc64le-unknown-linux-gnu -mcpu=pwr8 < %s | FileCheck %s
; RUN: llc -verify-machineinstrs -mtriple=powerpc64-unknown-linux-gnu -mcpu=pwr8 < %s | FileCheck %s
@vda = common global <2 x double> zeroinitializer, align 16
@vdb = common global <2 x double> zeroinitializer, align 16
@vdr = common global <2 x double> zeroinitializer, align 16
@vfa = common global <4 x float> zeroinitializer, align 16
@vfb = common global <4 x float> zeroinitializer, align 16
@vfr = common global <4 x float> zeroinitializer, align 16
@vbllr = common global <2 x i64> zeroinitializer, align 16
@vbir = common global <4 x i32> zeroinitializer, align 16
@vblla = common global <2 x i64> zeroinitializer, align 16
@vbllb = common global <2 x i64> zeroinitializer, align 16
@vbia = common global <4 x i32> zeroinitializer, align 16
@vbib = common global <4 x i32> zeroinitializer, align 16
; Function Attrs: nounwind
define void @test1() {
entry:
%0 = load <2 x double>, <2 x double>* @vda, align 16
%1 = load <2 x double>, <2 x double>* @vdb, align 16
%2 = call <2 x double> @llvm.ppc.vsx.xvdivdp(<2 x double> %0, <2 x double> %1)
store <2 x double> %2, <2 x double>* @vdr, align 16
ret void
; CHECK-LABEL: @test1
; CHECK: xvdivdp {{[0-9]+}}, {{[0-9]+}}, {{[0-9]+}}
}
; Function Attrs: nounwind
define void @test2() {
entry:
%0 = load <4 x float>, <4 x float>* @vfa, align 16
%1 = load <4 x float>, <4 x float>* @vfb, align 16
%2 = call <4 x float> @llvm.ppc.vsx.xvdivsp(<4 x float> %0, <4 x float> %1)
store <4 x float> %2, <4 x float>* @vfr, align 16
ret void
; CHECK-LABEL: @test2
; CHECK: xvdivsp {{[0-9]+}}, {{[0-9]+}}, {{[0-9]+}}
}
; Function Attrs: nounwind
define void @test3() {
entry:
%0 = load <2 x double>, <2 x double>* @vda, align 16
%1 = load <2 x double>, <2 x double>* @vda, align 16
%2 = call <2 x double> @llvm.ceil.v2f64(<2 x double> %1)
store <2 x double> %2, <2 x double>* @vdr, align 16
ret void
; CHECK-LABEL: @test3
; CHECK: xvrdpip {{[0-9]+}}, {{[0-9]+}}
}
; Function Attrs: nounwind
define void @test4() {
entry:
%0 = load <4 x float>, <4 x float>* @vfa, align 16
%1 = load <4 x float>, <4 x float>* @vfa, align 16
%2 = call <4 x float> @llvm.ceil.v4f32(<4 x float> %1)
store <4 x float> %2, <4 x float>* @vfr, align 16
ret void
; CHECK-LABEL: @test4
; CHECK: xvrspip {{[0-9]+}}, {{[0-9]+}}
}
; Function Attrs: nounwind
define void @test5() {
entry:
%0 = load <2 x double>, <2 x double>* @vda, align 16
%1 = load <2 x double>, <2 x double>* @vdb, align 16
%2 = call <2 x i64> @llvm.ppc.vsx.xvcmpeqdp(<2 x double> %0, <2 x double> %1)
store <2 x i64> %2, <2 x i64>* @vbllr, align 16
ret void
; CHECK-LABEL: @test5
; CHECK: xvcmpeqdp {{[0-9]+}}, {{[0-9]+}}, {{[0-9]+}}
}
; Function Attrs: nounwind
define void @test6() {
entry:
%0 = load <4 x float>, <4 x float>* @vfa, align 16
%1 = load <4 x float>, <4 x float>* @vfb, align 16
%2 = call <4 x i32> @llvm.ppc.vsx.xvcmpeqsp(<4 x float> %0, <4 x float> %1)
store <4 x i32> %2, <4 x i32>* @vbir, align 16
ret void
; CHECK-LABEL: @test6
; CHECK: xvcmpeqsp {{[0-9]+}}, {{[0-9]+}}, {{[0-9]+}}
}
; Function Attrs: nounwind
define void @test7() {
entry:
%0 = load <2 x double>, <2 x double>* @vda, align 16
%1 = load <2 x double>, <2 x double>* @vdb, align 16
%2 = call <2 x i64> @llvm.ppc.vsx.xvcmpgedp(<2 x double> %0, <2 x double> %1)
store <2 x i64> %2, <2 x i64>* @vbllr, align 16
ret void
; CHECK-LABEL: @test7
; CHECK: xvcmpgedp {{[0-9]+}}, {{[0-9]+}}, {{[0-9]+}}
}
; Function Attrs: nounwind
define void @test8() {
entry:
%0 = load <4 x float>, <4 x float>* @vfa, align 16
%1 = load <4 x float>, <4 x float>* @vfb, align 16
%2 = call <4 x i32> @llvm.ppc.vsx.xvcmpgesp(<4 x float> %0, <4 x float> %1)
store <4 x i32> %2, <4 x i32>* @vbir, align 16
ret void
; CHECK-LABEL: @test8
; CHECK: xvcmpgesp {{[0-9]+}}, {{[0-9]+}}, {{[0-9]+}}
}
; Function Attrs: nounwind
define void @test9() {
entry:
%0 = load <2 x double>, <2 x double>* @vda, align 16
%1 = load <2 x double>, <2 x double>* @vdb, align 16
%2 = call <2 x i64> @llvm.ppc.vsx.xvcmpgtdp(<2 x double> %0, <2 x double> %1)
store <2 x i64> %2, <2 x i64>* @vbllr, align 16
ret void
; CHECK-LABEL: @test9
; CHECK: xvcmpgtdp {{[0-9]+}}, {{[0-9]+}}, {{[0-9]+}}
}
; Function Attrs: nounwind
define void @test10() {
entry:
%0 = load <4 x float>, <4 x float>* @vfa, align 16
%1 = load <4 x float>, <4 x float>* @vfb, align 16
%2 = call <4 x i32> @llvm.ppc.vsx.xvcmpgtsp(<4 x float> %0, <4 x float> %1)
store <4 x i32> %2, <4 x i32>* @vbir, align 16
ret void
; CHECK-LABEL: @test10
; CHECK: xvcmpgtsp {{[0-9]+}}, {{[0-9]+}}, {{[0-9]+}}
}
; Function Attrs: nounwind
define <4 x float> @emit_xvresp(<4 x float> %a) {
entry:
%a.addr = alloca <4 x float>, align 16
store <4 x float> %a, <4 x float>* %a.addr, align 16
%0 = load <4 x float>, <4 x float>* %a.addr, align 16
%1 = call <4 x float> @llvm.ppc.vsx.xvresp(<4 x float> %0)
ret <4 x float> %1
; CHECK-LABEL: @emit_xvresp
; CHECK: xvresp {{[0-9]+}}, {{[0-9]+}}
}
; Function Attrs: nounwind
define <2 x double> @emit_xvredp(<2 x double> %a) {
entry:
%a.addr = alloca <2 x double>, align 16
store <2 x double> %a, <2 x double>* %a.addr, align 16
%0 = load <2 x double>, <2 x double>* %a.addr, align 16
%1 = call <2 x double> @llvm.ppc.vsx.xvredp(<2 x double> %0)
ret <2 x double> %1
; CHECK-LABEL: @emit_xvredp
; CHECK: xvredp {{[0-9]+}}, {{[0-9]+}}
}
; Function Attrs: nounwind readnone
define <4 x i32> @emit_xvcvdpsxws(<2 x double> %a) {
entry:
%0 = tail call <4 x i32> @llvm.ppc.vsx.xvcvdpsxws(<2 x double> %a)
ret <4 x i32> %0
; CHECK-LABEL: @emit_xvcvdpsxws
; CHECK: xvcvdpsxws 34, 34
}
; Function Attrs: nounwind readnone
define <4 x i32> @emit_xvcvdpuxws(<2 x double> %a) {
entry:
%0 = tail call <4 x i32> @llvm.ppc.vsx.xvcvdpuxws(<2 x double> %a)
ret <4 x i32> %0
; CHECK-LABEL: @emit_xvcvdpuxws
; CHECK: xvcvdpuxws 34, 34
}
; Function Attrs: nounwind readnone
define <2 x double> @emit_xvcvsxwdp(<4 x i32> %a) {
entry:
%0 = tail call <2 x double> @llvm.ppc.vsx.xvcvsxwdp(<4 x i32> %a)
ret <2 x double> %0
; CHECK-LABEL: @emit_xvcvsxwdp
; CHECK: xvcvsxwdp 34, 34
}
; Function Attrs: nounwind readnone
define <2 x double> @emit_xvcvuxwdp(<4 x i32> %a) {
entry:
%0 = tail call <2 x double> @llvm.ppc.vsx.xvcvuxwdp(<4 x i32> %a)
ret <2 x double> %0
; CHECK-LABEL: @emit_xvcvuxwdp
; CHECK: xvcvuxwdp 34, 34
}
; Function Attrs: nounwind readnone
define <2 x double> @emit_xvcvspdp(<4 x float> %a) {
entry:
%0 = tail call <2 x double> @llvm.ppc.vsx.xvcvspdp(<4 x float> %a)
ret <2 x double> %0
; CHECK-LABEL: @emit_xvcvspdp
; CHECK: xvcvspdp 34, 34
}
; Function Attrs: nounwind readnone
define <4 x float> @emit_xvcvsxdsp(<2 x i64> %a) {
entry:
%0 = tail call <4 x float> @llvm.ppc.vsx.xvcvsxdsp(<2 x i64> %a)
ret <4 x float> %0
; CHECK-LABEL: @emit_xvcvsxdsp
; CHECK: xvcvsxdsp 34, 34
}
; Function Attrs: nounwind readnone
define <4 x float> @emit_xvcvuxdsp(<2 x i64> %a) {
entry:
%0 = tail call <4 x float> @llvm.ppc.vsx.xvcvuxdsp(<2 x i64> %a)
ret <4 x float> %0
; CHECK-LABEL: @emit_xvcvuxdsp
; CHECK: xvcvuxdsp 34, 34
}
; Function Attrs: nounwind readnone
define <4 x float> @emit_xvcvdpsp(<2 x double> %a) {
entry:
%0 = tail call <4 x float> @llvm.ppc.vsx.xvcvdpsp(<2 x double> %a)
ret <4 x float> %0
; CHECK-LABEL: @emit_xvcvdpsp
; CHECK: xvcvdpsp 34, 34
}
; Function Attrs: nounwind readnone
; Function Attrs: nounwind readnone
declare <4 x float> @llvm.ppc.vsx.xvresp(<4 x float>)
; Function Attrs: nounwind readnone
declare <2 x double> @llvm.ppc.vsx.xvredp(<2 x double>)
; Function Attrs: nounwind readnone
declare <2 x double> @llvm.ceil.v2f64(<2 x double>)
; Function Attrs: nounwind readnone
declare <4 x float> @llvm.ceil.v4f32(<4 x float>)
; Function Attrs: nounwind readnone
declare <2 x double> @llvm.ppc.vsx.xvdivdp(<2 x double>, <2 x double>)
; Function Attrs: nounwind readnone
declare <4 x float> @llvm.ppc.vsx.xvdivsp(<4 x float>, <4 x float>)
; Function Attrs: nounwind readnone
declare <2 x i64> @llvm.ppc.vsx.xvcmpeqdp(<2 x double>, <2 x double>)
; Function Attrs: nounwind readnone
declare <4 x i32> @llvm.ppc.vsx.xvcmpeqsp(<4 x float>, <4 x float>)
; Function Attrs: nounwind readnone
declare <2 x i64> @llvm.ppc.vsx.xvcmpgedp(<2 x double>, <2 x double>)
; Function Attrs: nounwind readnone
declare <4 x i32> @llvm.ppc.vsx.xvcmpgesp(<4 x float>, <4 x float>)
; Function Attrs: nounwind readnone
declare <2 x i64> @llvm.ppc.vsx.xvcmpgtdp(<2 x double>, <2 x double>)
; Function Attrs: nounwind readnone
declare <4 x i32> @llvm.ppc.vsx.xvcmpgtsp(<4 x float>, <4 x float>)
declare <4 x float> @llvm.ppc.vsx.xvcvdpsp(<2 x double>) #1
declare <4 x i32> @llvm.ppc.vsx.xvcvdpsxws(<2 x double>) #1
declare <4 x i32> @llvm.ppc.vsx.xvcvdpuxws(<2 x double>) #1
declare <2 x double> @llvm.ppc.vsx.xvcvsxwdp(<4 x i32>) #1
declare <2 x double> @llvm.ppc.vsx.xvcvuxwdp(<4 x i32>) #1
declare <2 x double> @llvm.ppc.vsx.xvcvspdp(<4 x float>) #1
declare <4 x float> @llvm.ppc.vsx.xvcvsxdsp(<2 x i64>) #1
declare <4 x float> @llvm.ppc.vsx.xvcvuxdsp(<2 x i64>) #1