[PATCH] D84464: AMDGPU: Skip other terminators before inserting s_cbranch_exec[n]z

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 23 14:07:37 PDT 2020


arsenm created this revision.
arsenm added reviewers: nhaehnle, sameerds, rampitec, alex-t.
Herald added subscribers: kerbowa, hiraditya, t-tye, tpr, dstuttard, yaxunl, wdng, jvesely, kzhuravl.
Herald added a project: LLVM.

PHIElimination/createPHISourceCopy inserts non-branch terminators
after the control flow pseudo if a successor phi reads a register
defined by the control flow pseudo. If this happens, we need to split
the expansion of the control flow pseudo to ensure all the branches
are after all of the other mask management instructions.

      

GlobalISel hit this in testscases that happened to be tail
duplicated. The original testcase still does not work, since the same
problem appears to be present in a later pass.


https://reviews.llvm.org/D84464

Files:
  llvm/lib/Target/AMDGPU/SILowerControlFlow.cpp
  llvm/test/CodeGen/AMDGPU/lower-control-flow-other-terminators.mir

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D84464.280250.patch
Type: text/x-patch
Size: 9298 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200723/ead4f32b/attachment.bin>


More information about the llvm-commits mailing list