[PATCH] D87542: AMDGPU: Don't sometimes allow instructions before lowered si_end_cf

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 11 12:33:56 PDT 2020


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

Since 6524a7a2b9ca072bd7f7b4355d1230e70c679d2f, this would sometimes
not emit the or to exec at the beginning of the block, where it really
has to be. If there is an instruction that defines one of the source
operands, split the block and turn the si_end_cf into a terminator.

      

This avoids regressions when regalloc fast is switched to inserting
reloads at the beginning of the block, instead of spills at the end of
the block.

      

In a future change, this should always split the block.


https://reviews.llvm.org/D87542

Files:
  llvm/lib/Target/AMDGPU/SIInstrInfo.cpp
  llvm/lib/Target/AMDGPU/SIInstructions.td
  llvm/lib/Target/AMDGPU/SILowerControlFlow.cpp
  llvm/lib/Target/AMDGPU/SIOptimizeExecMasking.cpp
  llvm/test/CodeGen/AMDGPU/lower-control-flow-other-terminators.mir
  llvm/test/CodeGen/AMDGPU/si-lower-control-flow.mir

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D87542.291311.patch
Type: text/x-patch
Size: 24747 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200911/f0258d02/attachment.bin>


More information about the llvm-commits mailing list