[PATCH] D136592: [AMDGPU][GISel] Select llvm.amdgcn.fcmp intrinsics

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 25 14:28:11 PDT 2022


arsenm added inline comments.


================
Comment at: llvm/lib/Target/AMDGPU/AMDGPUInstructionSelector.cpp:1167
+                  AMDGPU::V_CMP_NEQ_F32_e64, AMDGPU::V_CMP_NEQ_F64_e64);
+    return -1;
   }
----------------
Pierre-vh wrote:
> arsenm wrote:
> > I think the TRUE/FALSE cases should trivially select through, no fold to constant. Although these intrinsics are deprecated
> I can add logic to select them if needed, but it's never going to be hit unless I write a MIR test. I initially did that but it also had a lot of copy/pasted code from selectG_CONSTANT.
> Another idea would be to fold them to a constant using a RegBankSelect combine.
> What do you prefer? Adding selection logic + mir test?
Yes, MIR test. You don't need to fold to a constant here, I expect these to literally pass through as all the other instructions here. The instructions do exist 


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D136592



More information about the llvm-commits mailing list