This is an archive of the discontinued LLVM Phabricator instance.

[GlobalISel] Use getPreferredShiftAmountTy in one more G_UBFX combine
ClosedPublic

Authored by foad on Jan 7 2022, 5:03 AM.

Details

Summary

Change CombinerHelper::matchBitfieldExtractFromShrAnd to use
getPreferredShiftAmountTy for the shift-amount-like operands of G_UBFX
just like all the other G_[SU]BFX combines do. This better matches the
AMDGPU legality rules for these instructions.

Diff Detail

Event Timeline

foad created this revision.Jan 7 2022, 5:03 AM
foad requested review of this revision.Jan 7 2022, 5:03 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 7 2022, 5:03 AM
bcahoon accepted this revision.Jan 7 2022, 12:30 PM

Looks good to me.

This revision is now accepted and ready to land.Jan 7 2022, 12:30 PM
This revision was landed with ongoing or failed builds.Jan 8 2022, 1:32 AM
This revision was automatically updated to reflect the committed changes.