[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)
commit7e671e06a2340c3dc6085a523ac26afc0d9b8234
tree009390764867cd995cbc633b16d297d1fdd75c05
parent3725978b1028c0405c8454233e165a2462fa5220
[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

llvm-svn: 260210
llvm/lib/Target/X86/X86ISelLowering.cpp
llvm/test/CodeGen/X86/vec_int_to_fp.ll
llvm/test/CodeGen/X86/vector-sext.ll