[llvm] [ValueTracking] Handle `icmp pred (trunc X), C` in `computeKnownBitsFromCmp` (PR #82803)
via llvm-commits
llvm-commits at lists.llvm.org
Fri Feb 23 13:45:02 PST 2024
================
@@ -27,7 +27,8 @@ static void findAffectedValues(Value *Cond,
// Peek through unary operators to find the source of the condition.
Value *Op;
- if (match(I, m_PtrToInt(m_Value(Op)))) {
+ if (match(I,
+ m_CombineOr(m_PtrToInt(m_Value(Op)), m_Trunc(m_Value(Op))))) {
----------------
goldsteinn wrote:
I'm working on a patch to unify the two findAffectedValues implementations.
https://github.com/llvm/llvm-project/pull/82803
More information about the llvm-commits
mailing list