This is an archive of the discontinued LLVM Phabricator instance.

Tail calls: look through AssertZExt to find register copy.
ClosedPublic

Authored by t.p.northover on Mar 3 2022, 5:27 AM.

Details

Reviewers
t.p.northover
Summary

arm64_32 guarantees the high 32 bits of pointer parameters are passed as 0, and this is modelled in the IR by inserting an AssertZExt after the copyFromReg. The function deciding whether registers that need to be preserved actually are wasn't expecting this so it banned perfectly legitimate tail calls.

Diff Detail

Event Timeline

t.p.northover created this revision.Mar 3 2022, 5:27 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 3 2022, 5:27 AM
t.p.northover requested review of this revision.Mar 3 2022, 5:27 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 3 2022, 5:27 AM
Gerolf added a subscriber: Gerolf.Jan 6 2023, 11:15 AM

This is a straightforward fix. LGTM.

t.p.northover accepted this revision.Jan 9 2023, 2:04 AM

Thanks. Looks like I pushed it a while back (6c85668d28), which is weird.

This revision is now accepted and ready to land.Jan 9 2023, 2:04 AM
t.p.northover closed this revision.Jan 9 2023, 2:05 AM