This is an archive of the discontinued LLVM Phabricator instance.

[AMDGPU] lowerEXTRACT_VECTOR_ELT - fold from a SCALAR_TO_VECTOR source
ClosedPublic

Authored by RKSimon on May 7 2022, 10:19 AM.

Details

Summary

As suggested by @foad on D124839

If we're extracting a vector element that originally came from a scalar_to_vector, then avoid the bitcasting of a vector type and perform the shift masking on the (any-extended) scalar source directly, making use of the fact that the upper elements of a scalar_to_vector are all undef.

Diff Detail

Event Timeline

RKSimon created this revision.May 7 2022, 10:19 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 7 2022, 10:19 AM
RKSimon requested review of this revision.May 7 2022, 10:19 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 7 2022, 10:19 AM
Herald added a subscriber: wdng. · View Herald Transcript
arsenm accepted this revision.May 7 2022, 10:39 AM
This revision is now accepted and ready to land.May 7 2022, 10:39 AM
This revision was landed with ongoing or failed builds.May 7 2022, 12:24 PM
This revision was automatically updated to reflect the committed changes.