[PATCH] D32665: [InstCombine] don't use DeMorgan's Law on integer constants
Eli Friedman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 28 22:10:11 PDT 2017
efriedma added a comment.
Your reasoning makes sense.
================
Comment at: lib/Transforms/InstCombine/InstCombineAndOrXor.cpp:2441
+ // ~(Y & ~X) --> (X | ~Y)
+ if (match(&I, m_Not(m_c_And(m_Not(m_Value(X)), m_Value(Y))))) {
+ Value *NotY = Builder->CreateNot(Y, Y->getName() + ".not");
----------------
Do we need to check the number of uses for the inner operations?
https://reviews.llvm.org/D32665
More information about the llvm-commits
mailing list