[llvm] [ValueTracking] Fix bug of using wrong condition for deducing KnownBits (PR #124481)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Sun Jan 26 13:08:24 PST 2025


================
@@ -1705,9 +1711,10 @@ static void computeKnownBitsFromOperator(const Operator *I,
                     m_Br(m_c_ICmp(Pred, m_Specific(IncValue), m_APInt(RHSC)),
----------------
nikic wrote:

Can we fix this by replacing RecQ.CxtI with `P->getIncomingBlock(u)->getTerminator()` instead? (In terms of minimally ugly correct implementation, not maximally theoretically powerful.)

https://github.com/llvm/llvm-project/pull/124481


More information about the llvm-commits mailing list