This is an archive of the discontinued LLVM Phabricator instance.

[SystemZ] Don't use libcall for 128 bit shifts
ClosedPublic

Authored by jonpa on May 6 2021, 6:31 AM.

Details

Summary

Expand 128 bit shifts instead of using a libcall.

This patch removes the 128 bit shiftlibcalls and thereby causes ExpandShiftWithUnknownAmountBit() to be called.

Some other targets choose to set ISD::SHL_PARTS to 'custom' and then do this expansion in lowerOperation(). That is probably the alternative if the code output needs to be improved (I see 3 LOCs where GCC use 2 in c-code example...).

Diff Detail

Event Timeline

jonpa created this revision.May 6 2021, 6:31 AM
jonpa requested review of this revision.May 6 2021, 6:31 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 6 2021, 6:31 AM
uweigand accepted this revision.May 6 2021, 6:55 AM

Thanks, this LGTM. We can always add further improvements later if necessary.

This revision is now accepted and ready to land.May 6 2021, 6:55 AM
This revision was automatically updated to reflect the committed changes.