[PATCH] D117909: [AMDGPU] Remove cndmask from readsExecAsData

Ruiling, Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 24 00:16:22 PST 2022


ruiling added subscribers: sebastian-ne, ruiling.
ruiling added inline comments.


================
Comment at: llvm/lib/Target/AMDGPU/SIInstrInfo.cpp:133
 
 static bool readsExecAsData(const MachineInstr &MI) {
   if (MI.isCompare())
----------------
The function name is confusing, all these instructions access EXEC just as normal vector instructions. One cause of the failure @sebastian-ne showed in D116053 is we are dropping convergent attribute when lowering amdgcn.icmp into V_CMP. I am not sure if there is any other reason.  I think may be a right fix for the issue is define convergent version of V_CMP, I am not sure whether it sounds reasonable? Please also add some comments this is just workaround for the issue that we are lowering convergent icmp into normal V_CMP. We should fix it some other way.


================
Comment at: llvm/lib/Target/AMDGPU/SIInstrInfo.cpp:140
     break;
   case AMDGPU::V_READFIRSTLANE_B32:
-  case AMDGPU::V_CNDMASK_B64_PSEUDO:
----------------
Did you see a failure caused by v_readfirstlane? if not, please also remove it.


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

https://reviews.llvm.org/D117909



More information about the llvm-commits mailing list