[X86][SSE] Enable commutation from MOVSD/MOVSS to BLENDPD/BLENDPS on SSE41+ targets
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Sat, 1 Oct 2016 14:26:11 +0000 (14:26 +0000)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Sat, 1 Oct 2016 14:26:11 +0000 (14:26 +0000)
commitccdd1ff49b2cebd46eb3b3972680cc07abff8a5e
treeb0e80cb74d6896c857bf9e910957c0ddaa2080d4
parent45535cb1861266ad40e536dbdefd8984e186bc5f
[X86][SSE] Enable commutation from MOVSD/MOVSS to BLENDPD/BLENDPS on SSE41+ targets

Instead of selecting between MOVSD/MOVSS and BLENDPD/BLENDPS at shuffle lowering by subtarget this will help us select the instruction based on actual commutation requirements.

We could possibly add BLENDPD/BLENDPS -> MOVSD/MOVSS commutation and MOVSD/MOVSS memory folding using a similar approach if it proves useful

I avoided adding AVX512 handling as I'm not sure when we should be making use of VBLENDPD/VBLENDPS on EVEX targets

llvm-svn: 283037
llvm/lib/Target/X86/X86InstrInfo.cpp
llvm/lib/Target/X86/X86InstrSSE.td
llvm/test/CodeGen/X86/f16c-intrinsics-fast-isel.ll
llvm/test/CodeGen/X86/sse-scalar-fp-arith.ll
llvm/test/CodeGen/X86/vec_ss_load_fold.ll
llvm/test/CodeGen/X86/vector-shuffle-128-v2.ll
llvm/test/CodeGen/X86/vector-shuffle-128-v4.ll