Skip to content

Commit ae59b59

Browse files
committed
[ValueTracking] Address review comments. NFC.
1 parent a02eade commit ae59b59

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/lib/Analysis/ValueTracking.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -776,7 +776,7 @@ static void computeKnownBitsFromICmpCond(const Value *V, ICmpInst *Cmp,
776776
if (match(LHS, m_Trunc(m_Specific(V)))) {
777777
KnownBits DstKnown(LHS->getType()->getScalarSizeInBits());
778778
computeKnownBitsFromCmp(LHS, Pred, LHS, RHS, DstKnown, SQ);
779-
if (match(LHS, m_NUWTrunc(m_Value())))
779+
if (cast<TruncInst>(LHS)->hasNoUnsignedWrap())
780780
Known = Known.unionWith(DstKnown.zext(Known.getBitWidth()));
781781
else
782782
Known = Known.unionWith(DstKnown.anyext(Known.getBitWidth()));

0 commit comments

Comments
 (0)