[PATCH] D97922: [AMDGPU] Keep skip branch for ds instructions

Sebastian Neubauer via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 4 01:45:53 PST 2021


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

Same as other memory instructions, ds instructions add latency even if
exec is zero. Jumping over them if exec=0 is cheaper than executing
them.
With this change, the branch instruction that skips over a basic block
if exec=0 is not removed when the block contains a ds instruction.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D97922

Files:
  llvm/lib/Target/AMDGPU/SIRemoveShortExecBranches.cpp
  llvm/test/CodeGen/AMDGPU/branch-condition-and.ll
  llvm/test/CodeGen/AMDGPU/insert-skips-flat-vmem-ds.mir
  llvm/test/CodeGen/AMDGPU/insert-skips-flat-vmem.mir
  llvm/test/CodeGen/AMDGPU/ret_jump.ll
  llvm/test/CodeGen/AMDGPU/si-lower-control-flow-unreachable-block.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D97922.328071.patch
Type: text/x-patch
Size: 3956 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210304/bfa5bfdc/attachment.bin>


More information about the llvm-commits mailing list