Reserve appropriate number of sgprs for flat scratch init.
Details
Details
Diff Detail
Diff Detail
Event Timeline
lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp | ||
---|---|---|
417–418 | Might as well fix this for VI too. This if above can stay the same but the if below should be incremented by 4 on VI and 2 on CI. | |
test/CodeGen/AMDGPU/ci-reserve-sgpr-for-flat-scratch-init.ll | ||
1 ↗ | (On Diff #43047) | This test will become obsolete once we stop initializing the flat_scratch registers when we have no scratch usage. Also, I don' t think there is really a good way to test this with normal IR, since the test is dependent on the register allocator always allocating the same number of registers. I think it may be possible to test this with inline assembly. For now just drop the test, and I will try to add an inline assembly based test before I commit. |
Comment Actions
update based on Tom's comments:
- also fix the sgpr reservation for VI+;
- drop the LIT test for now.
Might as well fix this for VI too.
This if above can stay the same but the if below should be incremented by 4 on VI and 2 on CI.