OSDN Git Service

[X86][AVX2] Fix SIGN_EXTEND vector handling on AVX2 targets.
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Tue, 9 Feb 2016 08:19:19 +0000 (08:19 +0000)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Tue, 9 Feb 2016 08:19:19 +0000 (08:19 +0000)
commit6a78b654c39161ef6ef2498435332ec6a1161fbd
treeb2b0f73ed519df873449a73fba26697e05295211
parenta55dfdc22ce0b26f55f458d0ff8f7ec7d8e9f289
[X86][AVX2] Fix SIGN_EXTEND vector handling on AVX2 targets.

On AVX2 target we are poorly legalizing SIGN_EXTEND ops for which the input's legalized type doesn't have the same number of elements as the destination, resulting in an ANY_EXTEND followed by a SIGN_EXTEND_INREG.

This patch uses the existing SIGN_EXTEND -> SIGN_EXTEND_VECTOR_INREG combine to extend the input to the size of the result and using SIGN_EXTEND_VECTOR_INREG instead.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260210 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/X86/X86ISelLowering.cpp
test/CodeGen/X86/vec_int_to_fp.ll
test/CodeGen/X86/vector-sext.ll