This is an archive of the discontinued LLVM Phabricator instance.

[GlobalISel] Limit shift_of_shifted_logic_chain to non-zero folds
ClosedPublic

Authored by dmgreen on Aug 23 2023, 4:55 AM.

Details

Summary

After D157690 we are seeing some crashes from Global ISel, which seem to be related to the shift_of_shifted_logic_chain combine that can remove too many instructions if the shift amount is zero. See https://godbolt.org/z/8Y4vd81TT.

This limits the fold to non-zero shifts, under the assumption that it is better then to fold the shift to a COPY.

Diff Detail

Event Timeline

dmgreen created this revision.Aug 23 2023, 4:55 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 23 2023, 4:55 AM
dmgreen requested review of this revision.Aug 23 2023, 4:55 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 23 2023, 4:55 AM
Herald added a subscriber: wdng. · View Herald Transcript
Pierre-vh accepted this revision.Aug 23 2023, 5:02 AM
This revision is now accepted and ready to land.Aug 23 2023, 5:02 AM