[PATCH] D116270: [AMDGPU] Enable divergence-driven XNOR selection

Alexander via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 25 14:33:59 PST 2022


alex-t added inline comments.


================
Comment at: llvm/lib/Target/AMDGPU/SIISelLowering.cpp:12485
+  for (; I != E; ++I) {
+    if (isa<MemSDNode>(*I))
+      return true;
----------------
foad wrote:
> Would be better to check that the use is the memory address, not (e.g.) the value being stored by a store instruction. But I don't know if there's a simple way to check that.
That is a good idea but I cannot use the any_of then. The any_of uses the operator * type that is SDNode but I need the SDUse instead. So the check is going to remain a separate function.  Also, despite this making the check more precise, it uncovers the permute regression that becomes explicit now.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D116270



More information about the llvm-commits mailing list