[PATCH] D132658: [InstCombine] Distributive or+mul with const operand
chenglin.bi via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 25 08:10:22 PDT 2022
bcl5980 added a comment.
We may need a minimal test case.
================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineMulDivRem.cpp:232
+ if ((match(Op0, m_OneUse(m_Add(m_Value(X), m_Constant(C1))))) ||
+ (match(Op0, m_OneUse(m_Or(m_Value(X), m_Constant(C1)))) &&
+ match(C1, m_APInt(C1Val)) &&
----------------
Match 'or' then check haveNoCommonBitsSet should be better I think.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D132658/new/
https://reviews.llvm.org/D132658
More information about the llvm-commits
mailing list