[PATCH] D67498: [InstSimplify] simplifyUnsignedRangeCheck(): handle few tautological cases (PR43251)

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 12 12:22:53 PDT 2019


spatel added inline comments.


================
Comment at: llvm/lib/Analysis/InstructionSimplify.cpp:1388-1389
+  if (match(Y, m_Sub(m_Value(A), m_Value(B)))) {
+    // A >= B || (A - B) != 0  <-->  true
+    // A <  B && (A - B) == 0  <-->  false
+    if (match(UnsignedICmp,
----------------
This doesn't seem general enough - we can handle more predicates at least:
https://rise4fun.com/Alive/4lV


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D67498





More information about the llvm-commits mailing list