This is an archive of the discontinued LLVM Phabricator instance.

[AMDGPU] Fix Livereg computation during epilogue insertion
ClosedPublic

Authored by cdevadas on Jun 25 2019, 6:26 AM.

Details

Reviewers
arsenm
Summary

The LivePhysRegs calculated in order to find a scratch register in the epilogue code wrongly uses 'LiveIns'. Instead, it should use the 'Liveout' sets.
For the liveness, also considering the operands of the terminator (return) instruction which is the insertion point for the scratch-exec-copy instruction.

Diff Detail

Event Timeline

cdevadas created this revision.Jun 25 2019, 6:26 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 25 2019, 6:27 AM
arsenm accepted this revision.Jun 25 2019, 10:16 AM

LGTM

test/CodeGen/AMDGPU/callee-special-input-sgprs.ll
488

Why did this change?

This revision is now accepted and ready to land.Jun 25 2019, 10:16 AM
arsenm closed this revision.Jun 26 2019, 1:35 PM

r364470

test/CodeGen/AMDGPU/callee-special-input-sgprs.ll
488

I fixed this to add the new scratch use and keep the -NOT