[PATCH] D97427: [AMDGPU] Do not annotate an else branch if there is a kill

Carl Ritson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 2 19:11:28 PST 2021


critson added a comment.

> ! In D97427#2587524 <https://reviews.llvm.org/D97427#2587524>, @arsenm wrote:
>
>> ! In D97427#2587522 <https://reviews.llvm.org/D97427#2587522>, @critson wrote:
>>  Or are you suggesting that we should split the block at the kill in the IR level very early in the backend?
>
> My initial thought is splitting blocks in the IR wouldn't be helpful. IR transforms are more likely to glue these blocks right back together again. Overall I'm more interested in moving towards the wave transform control flow lowering rather than thinking about how to improve the current IR pass flow

I agree that focusing our energy on wave transform control flow is the way to go.
However, this is a legitimate bug causing Piglet test failures for Mesa so it would be good to fix it.

Returning to your question about "transitive successors".
I do not think this is an issue -- the problem is with else being put in the same block as a kill causing that kill to executed as if it was part of the preceding if-branch.
If we place an else in a transitive successor then that implies the kill was genuinely part of the if-branch, which is fine.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D97427/new/

https://reviews.llvm.org/D97427



More information about the llvm-commits mailing list