[PATCH] D117620: AMDGPU/GlobalISel: Fix assert on invalid cond code for llvm.amdgcn.icmp

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 19 05:25:17 PST 2022


arsenm added inline comments.


================
Comment at: llvm/lib/Target/AMDGPU/AMDGPUInstructionSelector.cpp:1108
+  if (!ICmpInst::isIntPredicate(static_cast<ICmpInst::Predicate>(Pred))) {
+    MachineInstr *ICmp =
+        BuildMI(*BB, &I, DL, TII.get(AMDGPU::IMPLICIT_DEF), Dst);
----------------
foad wrote:
> Why not just return false? Is failing to select not good enough?
This reproduces the current behavior. A few lit tests also happen to use this to sneak an undef past the IR passes 


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

https://reviews.llvm.org/D117620



More information about the llvm-commits mailing list