OSDN Git Service

[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)
commit67edb4c4ef697d73ca79d27379d7852979b61898
tree806bbdef35f02a93128508f53510f1f61b86dc89
parenta9e82b41a3b79868b6afca83c0b6b2896a0a7159
[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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264062 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/SelectionDAG/LegalizeTypes.h
lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp
lib/Target/X86/X86ISelLowering.cpp
test/CodeGen/X86/vector-zext.ll
test/CodeGen/X86/widen_conv-3.ll
test/CodeGen/X86/widen_conv-4.ll