1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
2 ; RUN: opt < %s -passes=instcombine -mtriple=x86_64-unknown-unknown -S | FileCheck %s
3 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
5 define double @test_sqrt_sd_0(double %a) {
6 ; CHECK-LABEL: @test_sqrt_sd_0(
7 ; CHECK-NEXT: [[TMP1:%.*]] = call double @llvm.sqrt.f64(double [[A:%.*]])
8 ; CHECK-NEXT: ret double [[TMP1]]
10 %1 = insertelement <2 x double> undef, double %a, i32 0
11 %2 = insertelement <2 x double> %1, double 1.000000e+00, i32 1
12 %3 = tail call <2 x double> @llvm.x86.sse2.sqrt.sd(<2 x double> %2)
13 %4 = extractelement <2 x double> %3, i32 0
17 define double @test_sqrt_sd_1(double %a) {
18 ; CHECK-LABEL: @test_sqrt_sd_1(
19 ; CHECK-NEXT: ret double 1.000000e+00
21 %1 = insertelement <2 x double> undef, double %a, i32 0
22 %2 = insertelement <2 x double> %1, double 1.000000e+00, i32 1
23 %3 = tail call <2 x double> @llvm.x86.sse2.sqrt.sd(<2 x double> %2)
24 %4 = extractelement <2 x double> %3, i32 1
28 define double @test_add_sd_0(double %a, double %b) {
29 ; CHECK-LABEL: @test_add_sd_0(
30 ; CHECK-NEXT: [[TMP1:%.*]] = fadd double [[A:%.*]], [[B:%.*]]
31 ; CHECK-NEXT: ret double [[TMP1]]
33 %1 = insertelement <2 x double> undef, double %a, i32 0
34 %2 = insertelement <2 x double> %1, double 1.000000e+00, i32 1
35 %3 = insertelement <2 x double> undef, double %b, i32 0
36 %4 = insertelement <2 x double> %3, double 2.000000e+00, i32 1
37 %5 = tail call <2 x double> @llvm.x86.sse2.add.sd(<2 x double> %2, <2 x double> %4)
38 %6 = extractelement <2 x double> %5, i32 0
42 define double @test_add_sd_1(double %a, double %b) {
43 ; CHECK-LABEL: @test_add_sd_1(
44 ; CHECK-NEXT: ret double 1.000000e+00
46 %1 = insertelement <2 x double> undef, double %a, i32 0
47 %2 = insertelement <2 x double> %1, double 1.000000e+00, i32 1
48 %3 = insertelement <2 x double> undef, double %b, i32 0
49 %4 = insertelement <2 x double> %3, double 2.000000e+00, i32 1
50 %5 = tail call <2 x double> @llvm.x86.sse2.add.sd(<2 x double> %2, <2 x double> %4)
51 %6 = extractelement <2 x double> %5, i32 1
55 define double @test_add_sd_2(double %a) {
56 ; CHECK-LABEL: @test_add_sd_2(
57 ; CHECK-NEXT: [[TMP1:%.*]] = fadd double [[A:%.*]], [[A]]
58 ; CHECK-NEXT: ret double [[TMP1]]
60 %1 = insertelement <2 x double> zeroinitializer, double %a, i32 0
61 %2 = tail call <2 x double> @llvm.x86.sse2.add.sd(<2 x double> %1, <2 x double> %1)
62 %3 = extractelement <2 x double> %2, i32 0
66 define double @test_sub_sd_0(double %a, double %b) {
67 ; CHECK-LABEL: @test_sub_sd_0(
68 ; CHECK-NEXT: [[TMP1:%.*]] = fsub double [[A:%.*]], [[B:%.*]]
69 ; CHECK-NEXT: ret double [[TMP1]]
71 %1 = insertelement <2 x double> undef, double %a, i32 0
72 %2 = insertelement <2 x double> %1, double 1.000000e+00, i32 1
73 %3 = insertelement <2 x double> undef, double %b, i32 0
74 %4 = insertelement <2 x double> %3, double 2.000000e+00, i32 1
75 %5 = tail call <2 x double> @llvm.x86.sse2.sub.sd(<2 x double> %2, <2 x double> %4)
76 %6 = extractelement <2 x double> %5, i32 0
80 define double @test_sub_sd_1(double %a, double %b) {
81 ; CHECK-LABEL: @test_sub_sd_1(
82 ; CHECK-NEXT: ret double 1.000000e+00
84 %1 = insertelement <2 x double> undef, double %a, i32 0
85 %2 = insertelement <2 x double> %1, double 1.000000e+00, i32 1
86 %3 = insertelement <2 x double> undef, double %b, i32 0
87 %4 = insertelement <2 x double> %3, double 2.000000e+00, i32 1
88 %5 = tail call <2 x double> @llvm.x86.sse2.sub.sd(<2 x double> %2, <2 x double> %4)
89 %6 = extractelement <2 x double> %5, i32 1
93 define double @test_sub_sd_2(double %a) {
94 ; CHECK-LABEL: @test_sub_sd_2(
95 ; CHECK-NEXT: [[TMP1:%.*]] = fsub double [[A:%.*]], [[A]]
96 ; CHECK-NEXT: ret double [[TMP1]]
98 %1 = insertelement <2 x double> zeroinitializer, double %a, i32 0
99 %2 = tail call <2 x double> @llvm.x86.sse2.sub.sd(<2 x double> %1, <2 x double> %1)
100 %3 = extractelement <2 x double> %2, i32 0
104 define double @test_mul_sd_0(double %a, double %b) {
105 ; CHECK-LABEL: @test_mul_sd_0(
106 ; CHECK-NEXT: [[TMP1:%.*]] = fmul double [[A:%.*]], [[B:%.*]]
107 ; CHECK-NEXT: ret double [[TMP1]]
109 %1 = insertelement <2 x double> undef, double %a, i32 0
110 %2 = insertelement <2 x double> %1, double 1.000000e+00, i32 1
111 %3 = insertelement <2 x double> undef, double %b, i32 0
112 %4 = insertelement <2 x double> %3, double 2.000000e+00, i32 1
113 %5 = tail call <2 x double> @llvm.x86.sse2.mul.sd(<2 x double> %2, <2 x double> %4)
114 %6 = extractelement <2 x double> %5, i32 0
118 define double @test_mul_sd_1(double %a, double %b) {
119 ; CHECK-LABEL: @test_mul_sd_1(
120 ; CHECK-NEXT: ret double 1.000000e+00
122 %1 = insertelement <2 x double> undef, double %a, i32 0
123 %2 = insertelement <2 x double> %1, double 1.000000e+00, i32 1
124 %3 = insertelement <2 x double> undef, double %b, i32 0
125 %4 = insertelement <2 x double> %3, double 2.000000e+00, i32 1
126 %5 = tail call <2 x double> @llvm.x86.sse2.mul.sd(<2 x double> %2, <2 x double> %4)
127 %6 = extractelement <2 x double> %5, i32 1
131 define double @test_mul_sd_2(double %a) {
132 ; CHECK-LABEL: @test_mul_sd_2(
133 ; CHECK-NEXT: [[TMP1:%.*]] = fmul double [[A:%.*]], [[A]]
134 ; CHECK-NEXT: ret double [[TMP1]]
136 %1 = insertelement <2 x double> zeroinitializer, double %a, i32 0
137 %2 = tail call <2 x double> @llvm.x86.sse2.mul.sd(<2 x double> %1, <2 x double> %1)
138 %3 = extractelement <2 x double> %2, i32 0
142 define double @test_div_sd_0(double %a, double %b) {
143 ; CHECK-LABEL: @test_div_sd_0(
144 ; CHECK-NEXT: [[TMP1:%.*]] = fdiv double [[A:%.*]], [[B:%.*]]
145 ; CHECK-NEXT: ret double [[TMP1]]
147 %1 = insertelement <2 x double> undef, double %a, i32 0
148 %2 = insertelement <2 x double> %1, double 1.000000e+00, i32 1
149 %3 = insertelement <2 x double> undef, double %b, i32 0
150 %4 = insertelement <2 x double> %3, double 2.000000e+00, i32 1
151 %5 = tail call <2 x double> @llvm.x86.sse2.div.sd(<2 x double> %2, <2 x double> %4)
152 %6 = extractelement <2 x double> %5, i32 0
156 define double @test_div_sd_1(double %a, double %b) {
157 ; CHECK-LABEL: @test_div_sd_1(
158 ; CHECK-NEXT: ret double 1.000000e+00
160 %1 = insertelement <2 x double> undef, double %a, i32 0
161 %2 = insertelement <2 x double> %1, double 1.000000e+00, i32 1
162 %3 = insertelement <2 x double> undef, double %b, i32 0
163 %4 = insertelement <2 x double> %3, double 2.000000e+00, i32 1
164 %5 = tail call <2 x double> @llvm.x86.sse2.div.sd(<2 x double> %2, <2 x double> %4)
165 %6 = extractelement <2 x double> %5, i32 1
169 define double @test_div_sd_2(double %a) {
170 ; CHECK-LABEL: @test_div_sd_2(
171 ; CHECK-NEXT: [[TMP1:%.*]] = fdiv double [[A:%.*]], [[A]]
172 ; CHECK-NEXT: ret double [[TMP1]]
174 %1 = insertelement <2 x double> zeroinitializer, double %a, i32 0
175 %2 = tail call <2 x double> @llvm.x86.sse2.div.sd(<2 x double> %1, <2 x double> %1)
176 %3 = extractelement <2 x double> %2, i32 0
180 define <2 x double> @test_min_sd(<2 x double> %a, <2 x double> %b) {
181 ; CHECK-LABEL: @test_min_sd(
182 ; CHECK-NEXT: [[TMP1:%.*]] = tail call <2 x double> @llvm.x86.sse2.min.sd(<2 x double> [[A:%.*]], <2 x double> [[B:%.*]])
183 ; CHECK-NEXT: ret <2 x double> [[TMP1]]
185 %1 = insertelement <2 x double> %b, double 2.000000e+00, i32 1
186 %2 = tail call <2 x double> @llvm.x86.sse2.min.sd(<2 x double> %a, <2 x double> %1)
190 define double @test_min_sd_0(double %a, double %b) {
191 ; CHECK-LABEL: @test_min_sd_0(
192 ; CHECK-NEXT: [[TMP1:%.*]] = insertelement <2 x double> poison, double [[A:%.*]], i64 0
193 ; CHECK-NEXT: [[TMP2:%.*]] = insertelement <2 x double> poison, double [[B:%.*]], i64 0
194 ; CHECK-NEXT: [[TMP3:%.*]] = tail call <2 x double> @llvm.x86.sse2.min.sd(<2 x double> [[TMP1]], <2 x double> [[TMP2]])
195 ; CHECK-NEXT: [[TMP4:%.*]] = extractelement <2 x double> [[TMP3]], i64 0
196 ; CHECK-NEXT: ret double [[TMP4]]
198 %1 = insertelement <2 x double> undef, double %a, i32 0
199 %2 = insertelement <2 x double> %1, double 1.000000e+00, i32 1
200 %3 = insertelement <2 x double> undef, double %b, i32 0
201 %4 = insertelement <2 x double> %3, double 2.000000e+00, i32 1
202 %5 = tail call <2 x double> @llvm.x86.sse2.min.sd(<2 x double> %2, <2 x double> %4)
203 %6 = extractelement <2 x double> %5, i32 0
207 define double @test_min_sd_1(double %a, double %b) {
208 ; CHECK-LABEL: @test_min_sd_1(
209 ; CHECK-NEXT: ret double 1.000000e+00
211 %1 = insertelement <2 x double> undef, double %a, i32 0
212 %2 = insertelement <2 x double> %1, double 1.000000e+00, i32 1
213 %3 = insertelement <2 x double> undef, double %b, i32 0
214 %4 = insertelement <2 x double> %3, double 2.000000e+00, i32 1
215 %5 = tail call <2 x double> @llvm.x86.sse2.min.sd(<2 x double> %2, <2 x double> %4)
216 %6 = extractelement <2 x double> %5, i32 1
220 define double @test_min_sd_2(double %a) {
221 ; CHECK-LABEL: @test_min_sd_2(
222 ; CHECK-NEXT: [[TMP1:%.*]] = insertelement <2 x double> <double poison, double 0.000000e+00>, double [[A:%.*]], i64 0
223 ; CHECK-NEXT: [[TMP2:%.*]] = tail call <2 x double> @llvm.x86.sse2.min.sd(<2 x double> [[TMP1]], <2 x double> [[TMP1]])
224 ; CHECK-NEXT: [[TMP3:%.*]] = extractelement <2 x double> [[TMP2]], i64 0
225 ; CHECK-NEXT: ret double [[TMP3]]
227 %1 = insertelement <2 x double> zeroinitializer, double %a, i32 0
228 %2 = tail call <2 x double> @llvm.x86.sse2.min.sd(<2 x double> %1, <2 x double> %1)
229 %3 = extractelement <2 x double> %2, i32 0
233 define <2 x double> @test_max_sd(<2 x double> %a, <2 x double> %b) {
234 ; CHECK-LABEL: @test_max_sd(
235 ; CHECK-NEXT: [[TMP1:%.*]] = tail call <2 x double> @llvm.x86.sse2.max.sd(<2 x double> [[A:%.*]], <2 x double> [[B:%.*]])
236 ; CHECK-NEXT: ret <2 x double> [[TMP1]]
238 %1 = insertelement <2 x double> %b, double 2.000000e+00, i32 1
239 %2 = tail call <2 x double> @llvm.x86.sse2.max.sd(<2 x double> %a, <2 x double> %1)
243 define double @test_max_sd_0(double %a, double %b) {
244 ; CHECK-LABEL: @test_max_sd_0(
245 ; CHECK-NEXT: [[TMP1:%.*]] = insertelement <2 x double> poison, double [[A:%.*]], i64 0
246 ; CHECK-NEXT: [[TMP2:%.*]] = insertelement <2 x double> poison, double [[B:%.*]], i64 0
247 ; CHECK-NEXT: [[TMP3:%.*]] = tail call <2 x double> @llvm.x86.sse2.max.sd(<2 x double> [[TMP1]], <2 x double> [[TMP2]])
248 ; CHECK-NEXT: [[TMP4:%.*]] = extractelement <2 x double> [[TMP3]], i64 0
249 ; CHECK-NEXT: ret double [[TMP4]]
251 %1 = insertelement <2 x double> undef, double %a, i32 0
252 %2 = insertelement <2 x double> %1, double 1.000000e+00, i32 1
253 %3 = insertelement <2 x double> undef, double %b, i32 0
254 %4 = insertelement <2 x double> %3, double 2.000000e+00, i32 1
255 %5 = tail call <2 x double> @llvm.x86.sse2.max.sd(<2 x double> %2, <2 x double> %4)
256 %6 = extractelement <2 x double> %5, i32 0
260 define double @test_max_sd_1(double %a, double %b) {
261 ; CHECK-LABEL: @test_max_sd_1(
262 ; CHECK-NEXT: ret double 1.000000e+00
264 %1 = insertelement <2 x double> undef, double %a, i32 0
265 %2 = insertelement <2 x double> %1, double 1.000000e+00, i32 1
266 %3 = insertelement <2 x double> undef, double %b, i32 0
267 %4 = insertelement <2 x double> %3, double 2.000000e+00, i32 1
268 %5 = tail call <2 x double> @llvm.x86.sse2.max.sd(<2 x double> %2, <2 x double> %4)
269 %6 = extractelement <2 x double> %5, i32 1
273 define double @test_max_sd_2(double %a) {
274 ; CHECK-LABEL: @test_max_sd_2(
275 ; CHECK-NEXT: [[TMP1:%.*]] = insertelement <2 x double> <double poison, double 0.000000e+00>, double [[A:%.*]], i64 0
276 ; CHECK-NEXT: [[TMP2:%.*]] = tail call <2 x double> @llvm.x86.sse2.max.sd(<2 x double> [[TMP1]], <2 x double> [[TMP1]])
277 ; CHECK-NEXT: [[TMP3:%.*]] = extractelement <2 x double> [[TMP2]], i64 0
278 ; CHECK-NEXT: ret double [[TMP3]]
280 %1 = insertelement <2 x double> zeroinitializer, double %a, i32 0
281 %2 = tail call <2 x double> @llvm.x86.sse2.max.sd(<2 x double> %1, <2 x double> %1)
282 %3 = extractelement <2 x double> %2, i32 0
286 define <2 x double> @test_cmp_sd(<2 x double> %a, <2 x double> %b) {
287 ; CHECK-LABEL: @test_cmp_sd(
288 ; CHECK-NEXT: [[TMP1:%.*]] = tail call <2 x double> @llvm.x86.sse2.cmp.sd(<2 x double> [[A:%.*]], <2 x double> [[B:%.*]], i8 0)
289 ; CHECK-NEXT: ret <2 x double> [[TMP1]]
291 %1 = insertelement <2 x double> %b, double 2.000000e+00, i32 1
292 %2 = tail call <2 x double> @llvm.x86.sse2.cmp.sd(<2 x double> %a, <2 x double> %1, i8 0)
296 define double @test_cmp_sd_0(double %a, double %b) {
297 ; CHECK-LABEL: @test_cmp_sd_0(
298 ; CHECK-NEXT: [[TMP1:%.*]] = insertelement <2 x double> poison, double [[A:%.*]], i64 0
299 ; CHECK-NEXT: [[TMP2:%.*]] = insertelement <2 x double> poison, double [[B:%.*]], i64 0
300 ; CHECK-NEXT: [[TMP3:%.*]] = tail call <2 x double> @llvm.x86.sse2.cmp.sd(<2 x double> [[TMP1]], <2 x double> [[TMP2]], i8 0)
301 ; CHECK-NEXT: [[TMP4:%.*]] = extractelement <2 x double> [[TMP3]], i64 0
302 ; CHECK-NEXT: ret double [[TMP4]]
304 %1 = insertelement <2 x double> undef, double %a, i32 0
305 %2 = insertelement <2 x double> %1, double 1.000000e+00, i32 1
306 %3 = insertelement <2 x double> undef, double %b, i32 0
307 %4 = insertelement <2 x double> %3, double 2.000000e+00, i32 1
308 %5 = tail call <2 x double> @llvm.x86.sse2.cmp.sd(<2 x double> %2, <2 x double> %4, i8 0)
309 %6 = extractelement <2 x double> %5, i32 0
313 define double @test_cmp_sd_1(double %a, double %b) {
314 ; CHECK-LABEL: @test_cmp_sd_1(
315 ; CHECK-NEXT: ret double 1.000000e+00
317 %1 = insertelement <2 x double> undef, double %a, i32 0
318 %2 = insertelement <2 x double> %1, double 1.000000e+00, i32 1
319 %3 = insertelement <2 x double> undef, double %b, i32 0
320 %4 = insertelement <2 x double> %3, double 2.000000e+00, i32 1
321 %5 = tail call <2 x double> @llvm.x86.sse2.cmp.sd(<2 x double> %2, <2 x double> %4, i8 0)
322 %6 = extractelement <2 x double> %5, i32 1
326 define double @test_cmp_sd_2(double %a) {
327 ; CHECK-LABEL: @test_cmp_sd_2(
328 ; CHECK-NEXT: [[TMP1:%.*]] = insertelement <2 x double> <double poison, double 0.000000e+00>, double [[A:%.*]], i64 0
329 ; CHECK-NEXT: [[TMP2:%.*]] = tail call <2 x double> @llvm.x86.sse2.cmp.sd(<2 x double> [[TMP1]], <2 x double> [[TMP1]], i8 3)
330 ; CHECK-NEXT: [[TMP3:%.*]] = extractelement <2 x double> [[TMP2]], i64 0
331 ; CHECK-NEXT: ret double [[TMP3]]
333 %1 = insertelement <2 x double> zeroinitializer, double %a, i32 0
334 %2 = tail call <2 x double> @llvm.x86.sse2.cmp.sd(<2 x double> %1, <2 x double> %1, i8 3)
335 %3 = extractelement <2 x double> %2, i32 0
339 define i32 @test_comieq_sd_0(double %a, double %b) {
340 ; CHECK-LABEL: @test_comieq_sd_0(
341 ; CHECK-NEXT: [[TMP1:%.*]] = insertelement <2 x double> poison, double [[A:%.*]], i64 0
342 ; CHECK-NEXT: [[TMP2:%.*]] = insertelement <2 x double> poison, double [[B:%.*]], i64 0
343 ; CHECK-NEXT: [[TMP3:%.*]] = tail call i32 @llvm.x86.sse2.comieq.sd(<2 x double> [[TMP1]], <2 x double> [[TMP2]])
344 ; CHECK-NEXT: ret i32 [[TMP3]]
346 %1 = insertelement <2 x double> undef, double %a, i32 0
347 %2 = insertelement <2 x double> %1, double 1.000000e+00, i32 1
348 %3 = insertelement <2 x double> undef, double %b, i32 0
349 %4 = insertelement <2 x double> %3, double 2.000000e+00, i32 1
350 %5 = tail call i32 @llvm.x86.sse2.comieq.sd(<2 x double> %2, <2 x double> %4)
354 define i32 @test_comige_sd_0(double %a, double %b) {
355 ; CHECK-LABEL: @test_comige_sd_0(
356 ; CHECK-NEXT: [[TMP1:%.*]] = insertelement <2 x double> poison, double [[A:%.*]], i64 0
357 ; CHECK-NEXT: [[TMP2:%.*]] = insertelement <2 x double> poison, double [[B:%.*]], i64 0
358 ; CHECK-NEXT: [[TMP3:%.*]] = tail call i32 @llvm.x86.sse2.comige.sd(<2 x double> [[TMP1]], <2 x double> [[TMP2]])
359 ; CHECK-NEXT: ret i32 [[TMP3]]
361 %1 = insertelement <2 x double> undef, double %a, i32 0
362 %2 = insertelement <2 x double> %1, double 1.000000e+00, i32 1
363 %3 = insertelement <2 x double> undef, double %b, i32 0
364 %4 = insertelement <2 x double> %3, double 2.000000e+00, i32 1
365 %5 = tail call i32 @llvm.x86.sse2.comige.sd(<2 x double> %2, <2 x double> %4)
369 define i32 @test_comigt_sd_0(double %a, double %b) {
370 ; CHECK-LABEL: @test_comigt_sd_0(
371 ; CHECK-NEXT: [[TMP1:%.*]] = insertelement <2 x double> poison, double [[A:%.*]], i64 0
372 ; CHECK-NEXT: [[TMP2:%.*]] = insertelement <2 x double> poison, double [[B:%.*]], i64 0
373 ; CHECK-NEXT: [[TMP3:%.*]] = tail call i32 @llvm.x86.sse2.comigt.sd(<2 x double> [[TMP1]], <2 x double> [[TMP2]])
374 ; CHECK-NEXT: ret i32 [[TMP3]]
376 %1 = insertelement <2 x double> undef, double %a, i32 0
377 %2 = insertelement <2 x double> %1, double 1.000000e+00, i32 1
378 %3 = insertelement <2 x double> undef, double %b, i32 0
379 %4 = insertelement <2 x double> %3, double 2.000000e+00, i32 1
380 %5 = tail call i32 @llvm.x86.sse2.comigt.sd(<2 x double> %2, <2 x double> %4)
384 define i32 @test_comile_sd_0(double %a, double %b) {
385 ; CHECK-LABEL: @test_comile_sd_0(
386 ; CHECK-NEXT: [[TMP1:%.*]] = insertelement <2 x double> poison, double [[A:%.*]], i64 0
387 ; CHECK-NEXT: [[TMP2:%.*]] = insertelement <2 x double> poison, double [[B:%.*]], i64 0
388 ; CHECK-NEXT: [[TMP3:%.*]] = tail call i32 @llvm.x86.sse2.comile.sd(<2 x double> [[TMP1]], <2 x double> [[TMP2]])
389 ; CHECK-NEXT: ret i32 [[TMP3]]
391 %1 = insertelement <2 x double> undef, double %a, i32 0
392 %2 = insertelement <2 x double> %1, double 1.000000e+00, i32 1
393 %3 = insertelement <2 x double> undef, double %b, i32 0
394 %4 = insertelement <2 x double> %3, double 2.000000e+00, i32 1
395 %5 = tail call i32 @llvm.x86.sse2.comile.sd(<2 x double> %2, <2 x double> %4)
399 define i32 @test_comilt_sd_0(double %a, double %b) {
400 ; CHECK-LABEL: @test_comilt_sd_0(
401 ; CHECK-NEXT: [[TMP1:%.*]] = insertelement <2 x double> poison, double [[A:%.*]], i64 0
402 ; CHECK-NEXT: [[TMP2:%.*]] = insertelement <2 x double> poison, double [[B:%.*]], i64 0
403 ; CHECK-NEXT: [[TMP3:%.*]] = tail call i32 @llvm.x86.sse2.comilt.sd(<2 x double> [[TMP1]], <2 x double> [[TMP2]])
404 ; CHECK-NEXT: ret i32 [[TMP3]]
406 %1 = insertelement <2 x double> undef, double %a, i32 0
407 %2 = insertelement <2 x double> %1, double 1.000000e+00, i32 1
408 %3 = insertelement <2 x double> undef, double %b, i32 0
409 %4 = insertelement <2 x double> %3, double 2.000000e+00, i32 1
410 %5 = tail call i32 @llvm.x86.sse2.comilt.sd(<2 x double> %2, <2 x double> %4)
414 define i32 @test_comineq_sd_0(double %a, double %b) {
415 ; CHECK-LABEL: @test_comineq_sd_0(
416 ; CHECK-NEXT: [[TMP1:%.*]] = insertelement <2 x double> poison, double [[A:%.*]], i64 0
417 ; CHECK-NEXT: [[TMP2:%.*]] = insertelement <2 x double> poison, double [[B:%.*]], i64 0
418 ; CHECK-NEXT: [[TMP3:%.*]] = tail call i32 @llvm.x86.sse2.comineq.sd(<2 x double> [[TMP1]], <2 x double> [[TMP2]])
419 ; CHECK-NEXT: ret i32 [[TMP3]]
421 %1 = insertelement <2 x double> undef, double %a, i32 0
422 %2 = insertelement <2 x double> %1, double 1.000000e+00, i32 1
423 %3 = insertelement <2 x double> undef, double %b, i32 0
424 %4 = insertelement <2 x double> %3, double 2.000000e+00, i32 1
425 %5 = tail call i32 @llvm.x86.sse2.comineq.sd(<2 x double> %2, <2 x double> %4)
429 define i32 @test_ucomieq_sd_0(double %a, double %b) {
430 ; CHECK-LABEL: @test_ucomieq_sd_0(
431 ; CHECK-NEXT: [[TMP1:%.*]] = insertelement <2 x double> poison, double [[A:%.*]], i64 0
432 ; CHECK-NEXT: [[TMP2:%.*]] = insertelement <2 x double> poison, double [[B:%.*]], i64 0
433 ; CHECK-NEXT: [[TMP3:%.*]] = tail call i32 @llvm.x86.sse2.ucomieq.sd(<2 x double> [[TMP1]], <2 x double> [[TMP2]])
434 ; CHECK-NEXT: ret i32 [[TMP3]]
436 %1 = insertelement <2 x double> undef, double %a, i32 0
437 %2 = insertelement <2 x double> %1, double 1.000000e+00, i32 1
438 %3 = insertelement <2 x double> undef, double %b, i32 0
439 %4 = insertelement <2 x double> %3, double 2.000000e+00, i32 1
440 %5 = tail call i32 @llvm.x86.sse2.ucomieq.sd(<2 x double> %2, <2 x double> %4)
444 define i32 @test_ucomige_sd_0(double %a, double %b) {
445 ; CHECK-LABEL: @test_ucomige_sd_0(
446 ; CHECK-NEXT: [[TMP1:%.*]] = insertelement <2 x double> poison, double [[A:%.*]], i64 0
447 ; CHECK-NEXT: [[TMP2:%.*]] = insertelement <2 x double> poison, double [[B:%.*]], i64 0
448 ; CHECK-NEXT: [[TMP3:%.*]] = tail call i32 @llvm.x86.sse2.ucomige.sd(<2 x double> [[TMP1]], <2 x double> [[TMP2]])
449 ; CHECK-NEXT: ret i32 [[TMP3]]
451 %1 = insertelement <2 x double> undef, double %a, i32 0
452 %2 = insertelement <2 x double> %1, double 1.000000e+00, i32 1
453 %3 = insertelement <2 x double> undef, double %b, i32 0
454 %4 = insertelement <2 x double> %3, double 2.000000e+00, i32 1
455 %5 = tail call i32 @llvm.x86.sse2.ucomige.sd(<2 x double> %2, <2 x double> %4)
459 define i32 @test_ucomigt_sd_0(double %a, double %b) {
460 ; CHECK-LABEL: @test_ucomigt_sd_0(
461 ; CHECK-NEXT: [[TMP1:%.*]] = insertelement <2 x double> poison, double [[A:%.*]], i64 0
462 ; CHECK-NEXT: [[TMP2:%.*]] = insertelement <2 x double> poison, double [[B:%.*]], i64 0
463 ; CHECK-NEXT: [[TMP3:%.*]] = tail call i32 @llvm.x86.sse2.ucomigt.sd(<2 x double> [[TMP1]], <2 x double> [[TMP2]])
464 ; CHECK-NEXT: ret i32 [[TMP3]]
466 %1 = insertelement <2 x double> undef, double %a, i32 0
467 %2 = insertelement <2 x double> %1, double 1.000000e+00, i32 1
468 %3 = insertelement <2 x double> undef, double %b, i32 0
469 %4 = insertelement <2 x double> %3, double 2.000000e+00, i32 1
470 %5 = tail call i32 @llvm.x86.sse2.ucomigt.sd(<2 x double> %2, <2 x double> %4)
474 define i32 @test_ucomile_sd_0(double %a, double %b) {
475 ; CHECK-LABEL: @test_ucomile_sd_0(
476 ; CHECK-NEXT: [[TMP1:%.*]] = insertelement <2 x double> poison, double [[A:%.*]], i64 0
477 ; CHECK-NEXT: [[TMP2:%.*]] = insertelement <2 x double> poison, double [[B:%.*]], i64 0
478 ; CHECK-NEXT: [[TMP3:%.*]] = tail call i32 @llvm.x86.sse2.ucomile.sd(<2 x double> [[TMP1]], <2 x double> [[TMP2]])
479 ; CHECK-NEXT: ret i32 [[TMP3]]
481 %1 = insertelement <2 x double> undef, double %a, i32 0
482 %2 = insertelement <2 x double> %1, double 1.000000e+00, i32 1
483 %3 = insertelement <2 x double> undef, double %b, i32 0
484 %4 = insertelement <2 x double> %3, double 2.000000e+00, i32 1
485 %5 = tail call i32 @llvm.x86.sse2.ucomile.sd(<2 x double> %2, <2 x double> %4)
489 define i32 @test_ucomilt_sd_0(double %a, double %b) {
490 ; CHECK-LABEL: @test_ucomilt_sd_0(
491 ; CHECK-NEXT: [[TMP1:%.*]] = insertelement <2 x double> poison, double [[A:%.*]], i64 0
492 ; CHECK-NEXT: [[TMP2:%.*]] = insertelement <2 x double> poison, double [[B:%.*]], i64 0
493 ; CHECK-NEXT: [[TMP3:%.*]] = tail call i32 @llvm.x86.sse2.ucomilt.sd(<2 x double> [[TMP1]], <2 x double> [[TMP2]])
494 ; CHECK-NEXT: ret i32 [[TMP3]]
496 %1 = insertelement <2 x double> undef, double %a, i32 0
497 %2 = insertelement <2 x double> %1, double 1.000000e+00, i32 1
498 %3 = insertelement <2 x double> undef, double %b, i32 0
499 %4 = insertelement <2 x double> %3, double 2.000000e+00, i32 1
500 %5 = tail call i32 @llvm.x86.sse2.ucomilt.sd(<2 x double> %2, <2 x double> %4)
504 define i32 @test_ucomineq_sd_0(double %a, double %b) {
505 ; CHECK-LABEL: @test_ucomineq_sd_0(
506 ; CHECK-NEXT: [[TMP1:%.*]] = insertelement <2 x double> poison, double [[A:%.*]], i64 0
507 ; CHECK-NEXT: [[TMP2:%.*]] = insertelement <2 x double> poison, double [[B:%.*]], i64 0
508 ; CHECK-NEXT: [[TMP3:%.*]] = tail call i32 @llvm.x86.sse2.ucomineq.sd(<2 x double> [[TMP1]], <2 x double> [[TMP2]])
509 ; CHECK-NEXT: ret i32 [[TMP3]]
511 %1 = insertelement <2 x double> undef, double %a, i32 0
512 %2 = insertelement <2 x double> %1, double 1.000000e+00, i32 1
513 %3 = insertelement <2 x double> undef, double %b, i32 0
514 %4 = insertelement <2 x double> %3, double 2.000000e+00, i32 1
515 %5 = tail call i32 @llvm.x86.sse2.ucomineq.sd(<2 x double> %2, <2 x double> %4)
519 declare <2 x double> @llvm.x86.sse2.sqrt.sd(<2 x double>) nounwind readnone
521 declare <2 x double> @llvm.x86.sse2.add.sd(<2 x double>, <2 x double>)
522 declare <2 x double> @llvm.x86.sse2.sub.sd(<2 x double>, <2 x double>)
523 declare <2 x double> @llvm.x86.sse2.mul.sd(<2 x double>, <2 x double>)
524 declare <2 x double> @llvm.x86.sse2.div.sd(<2 x double>, <2 x double>)
525 declare <2 x double> @llvm.x86.sse2.min.sd(<2 x double>, <2 x double>)
526 declare <2 x double> @llvm.x86.sse2.max.sd(<2 x double>, <2 x double>)
527 declare <2 x double> @llvm.x86.sse2.cmp.sd(<2 x double>, <2 x double>, i8)
529 declare i32 @llvm.x86.sse2.comieq.sd(<2 x double>, <2 x double>)
530 declare i32 @llvm.x86.sse2.comige.sd(<2 x double>, <2 x double>)
531 declare i32 @llvm.x86.sse2.comigt.sd(<2 x double>, <2 x double>)
532 declare i32 @llvm.x86.sse2.comile.sd(<2 x double>, <2 x double>)
533 declare i32 @llvm.x86.sse2.comilt.sd(<2 x double>, <2 x double>)
534 declare i32 @llvm.x86.sse2.comineq.sd(<2 x double>, <2 x double>)
536 declare i32 @llvm.x86.sse2.ucomieq.sd(<2 x double>, <2 x double>)
537 declare i32 @llvm.x86.sse2.ucomige.sd(<2 x double>, <2 x double>)
538 declare i32 @llvm.x86.sse2.ucomigt.sd(<2 x double>, <2 x double>)
539 declare i32 @llvm.x86.sse2.ucomile.sd(<2 x double>, <2 x double>)
540 declare i32 @llvm.x86.sse2.ucomilt.sd(<2 x double>, <2 x double>)
541 declare i32 @llvm.x86.sse2.ucomineq.sd(<2 x double>, <2 x double>)