[PATCH] D115755: [InstSimplify] Fold logic And to Zero
Stanislav Mekhanoshin via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 21 14:37:21 PST 2021
rampitec added inline comments.
================
Comment at: llvm/lib/Analysis/InstructionSimplify.cpp:2179
+ BinaryOperator *Or;
+ if (match(Op0, m_c_Xor(m_Value(X),
+ m_CombineAnd(m_BinOp(Or),
----------------
It may probably fail to match if X is an 'or' itself. Just an independent 'or'. If I am not mistaken in this case it will not be important what to record as X and what as Y for LHS. Looks like yet another limitation. But I guess we have a lot of such cases anyway, so LGTM.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D115755/new/
https://reviews.llvm.org/D115755
More information about the llvm-commits
mailing list