[DAGCombiner] Eliminate dead stores to stack.
[llvm-complete.git] / test / CodeGen / X86 / commute-blend-sse41.ll
blob2b74304fdfd138c680aa2b0ffa69c0b87b39f0fa
1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc < %s -mtriple=x86_64-unknown -mattr=+sse4.1 | FileCheck %s
4 define <8 x i16> @commute_fold_pblendw(<8 x i16> %a, <8 x i16>* %b) #0 {
5 ; CHECK-LABEL: commute_fold_pblendw:
6 ; CHECK:       # %bb.0:
7 ; CHECK-NEXT:    pblendw {{.*#+}} xmm0 = xmm0[0],mem[1,2,3],xmm0[4],mem[5,6,7]
8 ; CHECK-NEXT:    retq
9   %1 = load <8 x i16>, <8 x i16>* %b
10   %2 = call <8 x i16> @llvm.x86.sse41.pblendw(<8 x i16> %1, <8 x i16> %a, i8 17)
11   ret <8 x i16> %2
13 declare <8 x i16> @llvm.x86.sse41.pblendw(<8 x i16>, <8 x i16>, i8) nounwind readnone
15 define <4 x float> @commute_fold_blendps(<4 x float> %a, <4 x float>* %b) #0 {
16 ; CHECK-LABEL: commute_fold_blendps:
17 ; CHECK:       # %bb.0:
18 ; CHECK-NEXT:    blendps {{.*#+}} xmm0 = xmm0[0],mem[1],xmm0[2],mem[3]
19 ; CHECK-NEXT:    retq
20   %1 = load <4 x float>, <4 x float>* %b
21   %2 = call <4 x float> @llvm.x86.sse41.blendps(<4 x float> %1, <4 x float> %a, i8 5)
22   ret <4 x float> %2
24 declare <4 x float> @llvm.x86.sse41.blendps(<4 x float>, <4 x float>, i8) nounwind readnone
26 define <2 x double> @commute_fold_blendpd(<2 x double> %a, <2 x double>* %b) #0 {
27 ; CHECK-LABEL: commute_fold_blendpd:
28 ; CHECK:       # %bb.0:
29 ; CHECK-NEXT:    blendps {{.*#+}} xmm0 = xmm0[0,1],mem[2,3]
30 ; CHECK-NEXT:    retq
31   %1 = load <2 x double>, <2 x double>* %b
32   %2 = call <2 x double> @llvm.x86.sse41.blendpd(<2 x double> %1, <2 x double> %a, i8 1)
33   ret <2 x double> %2
35 declare <2 x double> @llvm.x86.sse41.blendpd(<2 x double>, <2 x double>, i8) nounwind readnone