Skip to content

Commit 57ec61d

Browse files
committed
fixup! [ValueTracking] Handle signbit idiom in computeKnownFPClassFromCond
1 parent e4e88ce commit 57ec61d

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

llvm/lib/Analysis/DomConditionCache.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,10 @@ static void findAffectedValues(Value *Cond,
6666
// A > C3 && A < C4.
6767
if (match(A, m_Add(m_Value(X), m_ConstantInt())))
6868
AddAffected(X);
69-
// Handle icmp slt/sgt (bitcast X to int), 0/-1
70-
if (match(A, m_ElementWiseBitCast(m_Value(X))) &&
71-
(Pred == ICmpInst::ICMP_SLT || Pred == ICmpInst::ICMP_SGT))
69+
// Handle icmp slt/sgt (bitcast X to int), 0/-1, which is supported by
70+
// computeKnownFPClass().
71+
if ((Pred == ICmpInst::ICMP_SLT || Pred == ICmpInst::ICMP_SGT) &&
72+
match(A, m_ElementWiseBitCast(m_Value(X))))
7273
Affected.push_back(X);
7374
}
7475
} else if (match(Cond, m_CombineOr(m_FCmp(Pred, m_Value(A), m_Constant()),

0 commit comments

Comments
 (0)