]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - opencl/llvm.git/blob - test/CodeGen/X86/commute-blend-sse41.ll
[X86][AVX] Simplified diff between AVX1 and SSE42 fp stack folding tests. NFC.
[opencl/llvm.git] / test / CodeGen / X86 / commute-blend-sse41.ll
1 ; RUN: llc -O3 -mtriple=x86_64-unknown -mcpu=corei7 < %s | FileCheck %s
3 define <8 x i16> @commute_fold_pblendw(<8 x i16> %a, <8 x i16>* %b) #0 {
4   %1 = load <8 x i16>* %b
5   %2 = call <8 x i16> @llvm.x86.sse41.pblendw(<8 x i16> %1, <8 x i16> %a, i8 17)
6   ret <8 x i16> %2
8   ;LABEL:      commute_fold_pblendw
9   ;CHECK:      pblendw {{.*#+}} xmm0 = xmm0[0],mem[1,2,3],xmm0[4],mem[5,6,7]
10   ;CHECK-NEXT: retq
11 }
12 declare <8 x i16> @llvm.x86.sse41.pblendw(<8 x i16>, <8 x i16>, i8) nounwind readnone
14 define <4 x float> @commute_fold_blendps(<4 x float> %a, <4 x float>* %b) #0 {
15   %1 = load <4 x float>* %b
16   %2 = call <4 x float> @llvm.x86.sse41.blendps(<4 x float> %1, <4 x float> %a, i8 3)
17   ret <4 x float> %2
19   ;LABEL:      commute_fold_blendps
20   ;CHECK:      blendps {{.*#+}} xmm0 = xmm0[0,1],mem[2,3]
21   ;CHECK-NEXT: retq
22 }
23 declare <4 x float> @llvm.x86.sse41.blendps(<4 x float>, <4 x float>, i8) nounwind readnone
25 define <2 x double> @commute_fold_blendpd(<2 x double> %a, <2 x double>* %b) #0 {
26   %1 = load <2 x double>* %b
27   %2 = call <2 x double> @llvm.x86.sse41.blendpd(<2 x double> %1, <2 x double> %a, i8 1)
28   ret <2 x double> %2
30   ;LABEL:      commute_fold_vblendpd
31   ;CHECK:      blendpd {{.*#+}} xmm0 = xmm0[0],mem[1]
32   ;CHECK-NEXT: retq
33 }
34 declare <2 x double> @llvm.x86.sse41.blendpd(<2 x double>, <2 x double>, i8) nounwind readnone