[PATCH] D137021: [ValueTracking] haveNoCommonBitsSet - add assumption cache handling (PR58624)
chenglin.bi via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Oct 29 18:05:11 PDT 2022
bcl5980 added inline comments.
================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp:3800
+ if (llvm::haveNoCommonBitsSet(Op0, Op1, DL, &AC, &I, &DT))
+ return BinaryOperator::CreateOr(Op0, Op1);
+
----------------
nikic wrote:
> Is this useful independently of the assume case?
I guess the answer is no.
The code in llvm::haveNoCommonBitsSet check already exist at:
line 3776: if (SimplifyDemandedInstructionBits(I))
line 3791: if (match(&I, m_c_Xor(m_c_And(m_Not(m_Value(M)), m_Value())
If we add `llvm::haveNoCommonBitsSet` maybe we can move the code before line 3776 and remove line 3791.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D137021/new/
https://reviews.llvm.org/D137021
More information about the llvm-commits
mailing list