[X86][SSE1] Add MOVLHPS/MOVHLPS lowering and memory folding support
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Mon, 8 Feb 2016 23:03:46 +0000 (23:03 +0000)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Mon, 8 Feb 2016 23:03:46 +0000 (23:03 +0000)
commita207436b01b198c1fad9888d4b7953ccdb1ee830
tree306c99fb2f10f05723c04f123b19ed34246674f7
parent0d7839d0d3db6731acbda960af6a3f61145e8f00
[X86][SSE1] Add MOVLHPS/MOVHLPS lowering and memory folding support

As discussed on PR26491, this patch adds support for lowering v4f32 shuffles to the MOVLHPS/MOVHLPS instructions. It also adds support for memory folding with their MOVLPS/MOVHPS load equivalents.

This first patch only really helps SSE1 targets as SSE2+ targets will widen the shuffle mask and use v2f64 equivalents (although they still combine to MOVLHPS/MOVHLPS for v2f64 splats). This will have to be addressed in a future patch, most likely when we add support for binary target shuffle combines.

Differential Revision: http://reviews.llvm.org/D16956

llvm-svn: 260168
llvm/lib/Target/X86/X86ISelLowering.cpp
llvm/lib/Target/X86/X86InstrInfo.cpp
llvm/test/CodeGen/X86/vector-shuffle-sse1.ll