Function return instruction lowering, currently uses the fixed register pair, s[30:31] for holding the return address.
It can be any SGPR pair other than the CSRs. Created an SGPR pair sub-register class exclusive of the CSRs, and used this register class while lowering the return instruction.
Details
Diff Detail
Event Timeline
Hi Matt,
The codegen is different now and the scheduler & RA introduce most changes in the test cases.
lib/Target/AMDGPU/SOPInstructions.td | ||
---|---|---|
133–137 | The name doesn't match what this is for. I would rather not introduce a separate instruction class for this. You can instead parameterize the existing class with the (ins) for the instruction, defaulting to (ins SReg_64:$src0) | |
test/CodeGen/AMDGPU/cross-block-use-is-not-abi-copy.ll | ||
32 | It looks like you manually added these checks instead of using update_llc_test_checks? | |
test/CodeGen/AMDGPU/nested-calls.ll | ||
33 | Are the results actually better looking? Can you add explicit checks for the register s_setpc_b64 is using? |
Parameterized the existing operand class 'SOP1_1' to accommodate different register classes.
Added explicit check for the register pair in return instruction, 's_setpc_b64' (for nested-calls.ll test)
reused the existing register class' parameters for the new class.
Also ran clang-format to fix the long lines.
This line looks too long? Run clang-format?