[PATCH] D151797: [AMDGPU] WQM: Allow insertion of exact mode transition as terminator

Carl Ritson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 1 00:52:26 PDT 2023


critson added a comment.

In D151797#4383969 <https://reviews.llvm.org/D151797#4383969>, @arsenm wrote:

> Missing test updates?

There are no test updates as code gen is the same.  Observationally this is NFCI.



================
Comment at: llvm/lib/Target/AMDGPU/SIWholeQuadMode.cpp:1223
   if (SaveWQM) {
-    MI = BuildMI(MBB, Before, DebugLoc(), TII->get(AndSaveExecOpc), SaveWQM)
+    unsigned Opcode = IsTerminator ? AndSaveExecTermOpc : AndSaveExecOpc;
+    MI = BuildMI(MBB, Before, DebugLoc(), TII->get(Opcode), SaveWQM)
----------------
arsenm wrote:
> Wouldn’t this need a block split and always use the terminator?
We don't currently block split exec mask changes in WQM pass except for kill/demote.
I will look at adding splits on all exec changes (as a follow up patch), in which case it will always be a terminator.

I need to carefully evaluate the impact on codegen of all the additional blocks generated in splitting.
Since this is working for us right now I am not keen to rush to change it.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D151797



More information about the llvm-commits mailing list