[PATCH] D105709: [AMDGPU][GlobalISel] Insert an and with exec before s_cbranch_vccnz if necessary

Jay Foad via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 12 07:42:21 PDT 2021


foad added inline comments.


================
Comment at: llvm/lib/Target/AMDGPU/AMDGPUInstructionSelector.cpp:2496
+    const unsigned CondDefOpc = MRI->getUniqueVRegDef(CondReg)->getOpcode();
+    if (CondDefOpc != AMDGPU::G_ICMP && CondDefOpc != AMDGPU::G_FCMP) {
+      const bool Is64 = STI.isWave64();
----------------
arsenm wrote:
> This isn't the precise condition. It should also cover class intrinsics and maybe a few other cases. I thought we had an is known vector bool helper somewhere?
> 
For SelectionDAG we have isBoolSGPR. I don't know of anything similar for GlobalISel.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D105709



More information about the llvm-commits mailing list