[X86] Update test/CodeGen/X86/avg.ll with the help of update_llc_test_checks.py....
[oota-llvm.git] / test / CodeGen / X86 / combine-sse41-intrinsics.ll
1 ; RUN: llc < %s -mtriple=x86_64-unknown -mcpu=corei7 | FileCheck %s
2
3
4 define <2 x double> @test_x86_sse41_blend_pd(<2 x double> %a0, <2 x double> %a1) {
5   %1 = call <2 x double> @llvm.x86.sse41.blendpd(<2 x double> %a0, <2 x double> %a1, i32 0)
6   ret <2 x double> %1
7 }
8 ; CHECK-LABEL: test_x86_sse41_blend_pd
9 ; CHECK-NOT: blendpd
10 ; CHECK: ret
11
12
13 define <4 x float> @test_x86_sse41_blend_ps(<4 x float> %a0, <4 x float> %a1) {
14   %1 = call <4 x float> @llvm.x86.sse41.blendps(<4 x float> %a0, <4 x float> %a1, i32 0)
15   ret <4 x float> %1
16 }
17 ; CHECK-LABEL: test_x86_sse41_blend_ps
18 ; CHECK-NOT: blendps
19 ; CHECK: ret
20
21
22 define <8 x i16> @test_x86_sse41_pblend_w(<8 x i16> %a0, <8 x i16> %a1) {
23   %1 = call <8 x i16> @llvm.x86.sse41.pblendw(<8 x i16> %a0, <8 x i16> %a1, i32 0)
24   ret <8 x i16> %1
25 }
26 ; CHECK-LABEL: test_x86_sse41_pblend_w
27 ; CHECK-NOT: pblendw
28 ; CHECK: ret
29
30
31 define <2 x double> @test2_x86_sse41_blend_pd(<2 x double> %a0, <2 x double> %a1) {
32   %1 = call <2 x double> @llvm.x86.sse41.blendpd(<2 x double> %a0, <2 x double> %a1, i32 -1)
33   ret <2 x double> %1
34 }
35 ; CHECK-LABEL: test2_x86_sse41_blend_pd
36 ; CHECK-NOT: blendpd
37 ; CHECK: movaps %xmm1, %xmm0
38 ; CHECK-NEXT: ret
39
40
41 define <4 x float> @test2_x86_sse41_blend_ps(<4 x float> %a0, <4 x float> %a1) {
42   %1 = call <4 x float> @llvm.x86.sse41.blendps(<4 x float> %a0, <4 x float> %a1, i32 -1)
43   ret <4 x float> %1
44 }
45 ; CHECK-LABEL: test2_x86_sse41_blend_ps
46 ; CHECK-NOT: blendps
47 ; CHECK: movaps %xmm1, %xmm0
48 ; CHECK-NEXT: ret
49
50
51 define <8 x i16> @test2_x86_sse41_pblend_w(<8 x i16> %a0, <8 x i16> %a1) {
52   %1 = call <8 x i16> @llvm.x86.sse41.pblendw(<8 x i16> %a0, <8 x i16> %a1, i32 -1)
53   ret <8 x i16> %1
54 }
55 ; CHECK-LABEL: test2_x86_sse41_pblend_w
56 ; CHECK-NOT: pblendw
57 ; CHECK: movaps %xmm1, %xmm0
58 ; CHECK-NEXT: ret
59
60
61 define <2 x double> @test3_x86_sse41_blend_pd(<2 x double> %a0) {
62   %1 = call <2 x double> @llvm.x86.sse41.blendpd(<2 x double> %a0, <2 x double> %a0, i32 7)
63   ret <2 x double> %1
64 }
65 ; CHECK-LABEL: test3_x86_sse41_blend_pd
66 ; CHECK-NOT: blendpd
67 ; CHECK: ret
68
69
70 define <4 x float> @test3_x86_sse41_blend_ps(<4 x float> %a0) {
71   %1 = call <4 x float> @llvm.x86.sse41.blendps(<4 x float> %a0, <4 x float> %a0, i32 7)
72   ret <4 x float> %1
73 }
74 ; CHECK-LABEL: test3_x86_sse41_blend_ps
75 ; CHECK-NOT: blendps
76 ; CHECK: ret
77
78
79 define <8 x i16> @test3_x86_sse41_pblend_w(<8 x i16> %a0) {
80   %1 = call <8 x i16> @llvm.x86.sse41.pblendw(<8 x i16> %a0, <8 x i16> %a0, i32 7)
81   ret <8 x i16> %1
82 }
83 ; CHECK-LABEL: test3_x86_sse41_pblend_w
84 ; CHECK-NOT: pblendw
85 ; CHECK: ret
86
87
88 declare <2 x double> @llvm.x86.sse41.blendpd(<2 x double>, <2 x double>, i32)
89 declare <4 x float> @llvm.x86.sse41.blendps(<4 x float>, <4 x float>, i32)
90 declare <8 x i16> @llvm.x86.sse41.pblendw(<8 x i16>, <8 x i16>, i32)
91