This is an archive of the discontinued LLVM Phabricator instance.

[AMDGPU] Fix amdgpu_gfx tail-call test
ClosedPublic

Authored by sebastian-ne on Apr 12 2023, 5:00 AM.

Details

Summary

The inreg argument prevented the tail call optimization to kick in.
Remove the inreg, so this test actually uses a tail call.

Note that it now uses s[4:5] for the return address, which is invalid,
because these registers are supposed to be callee-save.
D147096 tried to fix that problem for the C calling convention.

Diff Detail

Event Timeline

sebastian-ne created this revision.Apr 12 2023, 5:00 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 12 2023, 5:00 AM
sebastian-ne requested review of this revision.Apr 12 2023, 5:00 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 12 2023, 5:00 AM
foad added a comment.Apr 12 2023, 5:05 AM

Note that it now uses s[4:5] for the return address, which is invalid

Maybe add that as a FIXME comment in the test?

Add FIXME comment

foad accepted this revision.Apr 12 2023, 5:15 AM
This revision is now accepted and ready to land.Apr 12 2023, 5:15 AM
This revision was automatically updated to reflect the committed changes.