Depends on D131863.
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
llvm/test/CodeGen/AMDGPU/branch-relax-spill.ll | ||
---|---|---|
2036 | I have no knowledge of AMDGPU and don't know how to construct some branches that can share or can't share a same restore block, so please kindly let me know how to construct the test properly. This is the first added function. I copied @spill() in this file and simply added another branch after the previous one. The two restore blocks .LBB2_5 and .LBB2_7 are identical. | |
3004 | This is the second added function. I copied @spill_func() in this file and simply added another branch after the previous one. It seems the two branches don't share a same destination. | |
3413–3422 | and I don't know why this sequence is forming. Is this intended? |
llvm/test/CodeGen/AMDGPU/branch-relax-spill.ll | ||
---|---|---|
2 | Why do you need to increase this? This just forces you to make the test functions bigger? If it's just for the new test, I'd rather split that into a separate file | |
3413–3422 | Do you mean the copies to shift down by one? I'd guess this is somehow related to the asm sequence trying to use a bunch of reserved registers as if they were all allocatable, and with such high register usage you hit some poor allocation decision |
At minimum I think the test needs to be split if you want to use a different number of branch bits
Move new tests requiring larger -amdgpu-s-branch-bits value to new file branch-relax-spill-deduplication.ll.
Rebase and add CHECK-RV64 checks for relax_jal_spill_32_deduplicate_restore_block, as https://reviews.llvm.org/D130560#3746417 mentioned.
Add --disable-block-placement for LoongArch tests so that all far branches will not be optimized out.
Could you add tests for AArch64? Since unconditional branches are relaxed when Machine Function Splitting is enabled, restore block deduplication should be validated on AArch64.
I'd be happy to advise if you're unfamiliar with the architecture.
Why do you need to increase this? This just forces you to make the test functions bigger? If it's just for the new test, I'd rather split that into a separate file