[PATCH] D99908: [GlobalISel] Simplify G_ICMP against true/false when boolean contents are 0/1

Amara Emerson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 6 12:20:09 PDT 2021


aemerson added inline comments.


================
Comment at: llvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp:3908
+  assert(MI.getOpcode() == TargetOpcode::G_ICMP);
+  if (!KB)
+    return false;
----------------
paquette wrote:
> arsenm wrote:
> > Is this actually optional?
> AArch64PostLegalizerLowering doesn't have it, but maybe it should?
> 
> Or maybe I should make this an assert.
I don't see why it should be mandatory. Combines should just skip if it isn't available.


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

https://reviews.llvm.org/D99908



More information about the llvm-commits mailing list