[PATCH] D148986: [InstSimplify] with logical ops: (X | Y) ? 0 : X --> 0

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Apr 22 03:02:02 PDT 2023


RKSimon added inline comments.


================
Comment at: llvm/lib/Analysis/InstructionSimplify.cpp:4733
+      match(TrueVal, m_ZeroInt()) && Pred == ICmpInst::ICMP_NE)
+    return TrueVal;
+
----------------
Also - is this safe when matching zero vectors with undef elements?


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

https://reviews.llvm.org/D148986



More information about the llvm-commits mailing list