[X86][SSE] Reapplied: Simplify vector LOAD + EXTEND on pre-SSE41 hardware
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Tue, 22 Mar 2016 16:22:08 +0000 (16:22 +0000)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Tue, 22 Mar 2016 16:22:08 +0000 (16:22 +0000)
commit25fb4177fb80631abe0dcecb6c6e14de4ebc695a
tree537ad54b785bf362ce23ed2b4f7a6a7747c29f03
parentd83633f55213898cc719b1e9b9f65f7f422e30bb
[X86][SSE] Reapplied: Simplify vector LOAD + EXTEND on pre-SSE41 hardware

Improve vector extension of vectors on hardware without dedicated VSEXT/VZEXT instructions.

We already convert these to SIGN_EXTEND_VECTOR_INREG/ZERO_EXTEND_VECTOR_INREG but can further improve this by using the legalizer instead of prematurely splitting into legal vectors in the combine as this only properly helps for lowering to VSEXT/VZEXT.

Removes a lot of unnecessary any_extend + mask pattern - (Fix for PR25718).

Reapplied with a fix for PR26953 (missing vector widening legalization).

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

llvm-svn: 264062
llvm/lib/CodeGen/SelectionDAG/LegalizeTypes.h
llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp
llvm/lib/Target/X86/X86ISelLowering.cpp
llvm/test/CodeGen/X86/vector-zext.ll
llvm/test/CodeGen/X86/widen_conv-3.ll
llvm/test/CodeGen/X86/widen_conv-4.ll