[PATCH] D124450: [AMDGPU] Remove hasOneUse check from scalar select pattern

Jay Foad via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 12 01:30:04 PDT 2022


foad added a comment.
Herald added a subscriber: kosarev.

Ping for the new version, which only allows multiple uses if they are all selects. I realise this is not ideal but it is strictly more permissive than the current code, which only allows a single use (which must be a select).



================
Comment at: llvm/lib/Target/AMDGPU/SOPInstructions.td:515
+     for (auto I = SetCC->use_begin(), E = SetCC->use_end(); I != E; ++I) {
+       if (I->getOpcode() == ISD::CopyToReg)
+         continue;
----------------
This is to cope with other uses that have already been selected to CopyToReg, S_CSELECT_B32. I don't know if there's a better way to handle this.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D124450



More information about the llvm-commits mailing list