This is an archive of the discontinued LLVM Phabricator instance.

[LegalizeTypes] Don't assume fshl/fshr shift amount type matches the other operands.
ClosedPublic

Authored by craig.topper on May 6 2022, 10:35 AM.

Details

Summary

Like other shifts, the type isn't required to match. We shouldn't
assume we can call ZExtPromotedInteger.

I tested the PromoteIntOp_FunnelShift locally by removing the promotion
of the shift amount from PromoteIntRes_FunnelShift. But with the final
version of this patch it is never executed on any tests.

Diff Detail

Event Timeline

craig.topper created this revision.May 6 2022, 10:35 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 6 2022, 10:35 AM
craig.topper requested review of this revision.May 6 2022, 10:35 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 6 2022, 10:35 AM
spatel accepted this revision.May 6 2022, 1:31 PM

LGTM

This revision is now accepted and ready to land.May 6 2022, 1:31 PM
This revision was landed with ongoing or failed builds.May 7 2022, 11:52 AM
This revision was automatically updated to reflect the committed changes.