[PATCH] D157312: [InstCombine] Add transforms for `(or/and (icmp eq/ne X,0),(icmp eq/ne X,Pow2OrZero))`

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 29 03:46:16 PDT 2023


nikic accepted this revision.
nikic added a comment.
This revision is now accepted and ready to land.

LGTM



================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp:751
+  CmpInst::Predicate Pred = IsAnd ? CmpInst::ICMP_NE : CmpInst::ICMP_EQ;
+  // Make sure we have right compares for out op.
+  if (LHS->getPredicate() != Pred || RHS->getPredicate() != Pred)
----------------
out op?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D157312



More information about the llvm-commits mailing list