[PATCH] D71941: AMDGPU: Fix SI_IF lowering when the save exec reg has terminator uses

Alexander via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 30 05:08:28 PST 2020


alex-t added a comment.

As far as I remember the origin of this hack:

PHI elimination pass queries isTerminator() to determine the COPY insertion point.
For some reason SI_IF is terminator but produces the value that in order may be input to the PHI node.
The hackery mentioned above was added to cheat verifier that complained about the non term instruction after the terminator.
The getSaveExec redirects the caller from SI_IF operand 0 to S_MOV_* destination operand.
That relies on the fact that the only reason for such a S_MOV_* to exist after SI_IF is the use of the SI_IF result in the successor block.

As for the current change: if everything works w/o the hack - then it's great to delete it.


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

https://reviews.llvm.org/D71941





More information about the llvm-commits mailing list