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

Pierre van Houtryve via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 25 01:25:36 PDT 2022


Pierre-vh 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;
   }
----------------
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?


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