[PATCH] D124981: [AMDGPU] Enable WQM if demotes and softwqm are combined

Nicolai Hähnle via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon May 9 10:09:36 PDT 2022


nhaehnle added a comment.

softwqm is used by our implementation of subgroup operations: **if** helper invocations are there, **then** subgroup operations must interact with them.

Helper invocations exist in one of two cases:

1. There are "hardwqm" instructions (e.g. sampler).
2. Invocations are explicitly demoted.

In the latter case, we need to make sure that the demoted invocations are still live for the purpose of feeding their values into those subgroup operations. Simply pretending that hardwqm instructions exists seems like a correct way to ensure that. Perhaps you have an alternative in mind @ruiling?



================
Comment at: llvm/test/CodeGen/AMDGPU/llvm.amdgcn.softwqm.ll:203-220
+; Check that WQM is triggered for softwqm with demote.
+;
+;CHECK-LABEL: {{^}}test_demote_1:
+;CHECK: s_wqm_b64 exec, exec
+;CHECK: buffer_load_dword
+;CHECK: buffer_load_dword
+;CHECK: v_add_f32_e32
----------------
Can you pre-submit this test with the incorrect code sequence (ideally, update_llc_test_checks?) and then update this review so that the diff is more clearly visible?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D124981



More information about the llvm-commits mailing list