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

Jay Foad via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 19 00:15:58 PST 2022


foad 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);
----------------
Why not just return false? Is failing to select not good enough?


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

https://reviews.llvm.org/D117620



More information about the llvm-commits mailing list