[PATCH] D47922: unsigned foo(unsigned x, unsigned y) { return x > y && x != 0; } should fold to x > y

Roman Lebedev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 8 01:36:28 PDT 2018


lebedev.ri added inline comments.


================
Comment at: lib/Analysis/InstructionSimplify.cpp:1312
   else if (match(UnsignedICmp,
-                 m_ICmp(UnsignedPred, m_Value(Y), m_Specific(X))) &&
            ICmpInst::isUnsigned(UnsignedPred))
----------------
So was the old one a harmless typo that rendered that `if` useless, was that a miscompile (needs test then),
or is the RHS of the diff is a new case (so the old one is a standalone case, too, and needs a test)?


Repository:
  rL LLVM

https://reviews.llvm.org/D47922





More information about the llvm-commits mailing list