This is an archive of the discontinued LLVM Phabricator instance.

[SelectionDAGBuilder] Simplify visitShift. NFC
ClosedPublic

Authored by craig.topper on Feb 18 2022, 2:40 PM.

Details

Summary

This code was detecting whether the value returned by getShiftAmountTy
can represent all shift amounts. If not, it would use MVT::i32 as a
placeholder. getShiftAmountTy was updated last year to return i32
if the type returned by the target couldn't represent all values.

This means the MVT::i32 case here is dead and can the logic can
be simplified.

Diff Detail

Event Timeline

craig.topper created this revision.Feb 18 2022, 2:40 PM
craig.topper requested review of this revision.Feb 18 2022, 2:40 PM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 18 2022, 2:40 PM
RKSimon accepted this revision.Feb 19 2022, 2:49 AM

LGTM

This revision is now accepted and ready to land.Feb 19 2022, 2:49 AM
This revision was landed with ongoing or failed builds.Feb 19 2022, 12:41 PM
This revision was automatically updated to reflect the committed changes.