[PATCH] D128315: AMDGPU: Don't fold cndmask into compare in different block

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 21 17:41:47 PDT 2022


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

We were hitting a liveness error if the register use moved into the
compare's block if the register needs to be live out. Handling the
liveness update across blocks is much more complicated and probably
 not worth it. I doubt this pattern appears in real code across blocks.
I'm also not completely sure if this was correct in the presence of
loops anyway.


https://reviews.llvm.org/D128315

Files:
  llvm/lib/Target/AMDGPU/SIOptimizeExecMaskingPreRA.cpp
  llvm/test/CodeGen/AMDGPU/opt-exec-masking-pre-ra-update-liveness.mir
  llvm/test/CodeGen/AMDGPU/optimize-negated-cond-exec-masking.mir

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D128315.438880.patch
Type: text/x-patch
Size: 6559 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220622/49268782/attachment.bin>


More information about the llvm-commits mailing list