[AVX-512] Add support for creating SIGN_EXTEND_VECTOR_INREG and ZERO_EXTEND_VECTOR_IN...
authorCraig Topper <craig.topper@gmail.com>
Tue, 25 Oct 2016 04:00:29 +0000 (04:00 +0000)
committerCraig Topper <craig.topper@gmail.com>
Tue, 25 Oct 2016 04:00:29 +0000 (04:00 +0000)
commit01e4667e021a7d65ae9e9cbe53ef3699b65e6b9d
treeb18c5478ed692d96c771af46fb4ef284abf15045
parent4f3b2df9bb506c0a920207d06e57967a58f5425d
[AVX-512] Add support for creating SIGN_EXTEND_VECTOR_INREG and ZERO_EXTEND_VECTOR_INREG for 512-bit vectors to support vpmovzxbq and vpmovsxbq.

Summary: The one tricky thing about this is that the sign/zero_extend_inreg uses v64i8 as an input type which isn't legal without BWI support. Though the vpmovsxbq and vpmovzxbq instructions themselves don't require BWI. To support this we need to add custom lowering for ZERO_EXTEND_VECTOR_INREG with v64i8 input. This can mostly reuse the existing sign extend code with a couple checks for sign extend vs zero extend added.

Reviewers: delena, RKSimon

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D25594

llvm-svn: 285053
llvm/lib/Target/X86/X86ISelLowering.cpp
llvm/test/CodeGen/X86/avx512-pmovxrm.ll
llvm/test/CodeGen/X86/vector-sext.ll
llvm/test/CodeGen/X86/vector-zext.ll