Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create a subregclass from SGPR for the call clobbered register pairs. #160

Draft
wants to merge 1 commit into
base: amd-common
Choose a base branch
from

Conversation

cdevadas
Copy link

Use this new register class in the return instruction for the operand that holds the return address.

Use this register class in the return instruction for the operand that holds the return address.
@@ -683,6 +683,12 @@ void SIFrameLowering::emitEpilogue(MachineFunction &MF,
LivePhysRegs LiveRegs(*ST.getRegisterInfo());
LiveRegs.addLiveIns(MBB);

// to avoid clobbering the registers used in the return instruction.
if (MBBI->getOpcode() == AMDGPU::S_SETPC_B64_return &&
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assume it is safe to check for the opcode first, and then get the registers.
Not sure whether I should check the operand is register.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant