This is an archive of the discontinued LLVM Phabricator instance.

[AVX-512] Add support for creating SIGN_EXTEND_VECTOR_INREG and ZERO_EXTEND_VECTOR_INREG for 512-bit vectors to support vpmovzxbq and vpmovsxbq.
ClosedPublic

Authored by craig.topper on Oct 13 2016, 11:20 PM.

Details

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.

Diff Detail

Repository
rL LLVM

Event Timeline

craig.topper retitled this revision from to [AVX-512] Add support for creating SIGN_EXTEND_VECTOR_INREG and ZERO_EXTEND_VECTOR_INREG for 512-bit vectors to support vpmovzxbq and vpmovsxbq..
craig.topper updated this object.
craig.topper added reviewers: RKSimon, delena.
craig.topper added a subscriber: llvm-commits.
RKSimon added inline comments.Oct 16 2016, 4:47 AM
lib/Target/X86/X86ISelLowering.cpp
16404 ↗(On Diff #74620)

Add an assert to check that VZEXT is only used for v64i8 inputs?

Added assertion that zero_extend is only called for v64i8.

RKSimon accepted this revision.Oct 24 2016, 9:42 AM
RKSimon edited edge metadata.

LGTM.

This revision is now accepted and ready to land.Oct 24 2016, 9:42 AM
This revision was automatically updated to reflect the committed changes.