Skip to content

Commit 71ac47f

Browse files
committed
[KnownBits] Make use of KnownBits.isUnknown. NFC.
1 parent f52b638 commit 71ac47f

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

llvm/lib/Analysis/ValueTracking.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1621,7 +1621,7 @@ static void computeKnownBitsFromOperator(const Operator *I,
16211621

16221622
// Otherwise take the unions of the known bit sets of the operands,
16231623
// taking conservative care to avoid excessive recursion.
1624-
if (Depth < MaxAnalysisRecursionDepth - 1 && !Known.Zero && !Known.One) {
1624+
if (Depth < MaxAnalysisRecursionDepth - 1 && Known.isUnknown()) {
16251625
// Skip if every incoming value references to ourself.
16261626
if (isa_and_nonnull<UndefValue>(P->hasConstantValue()))
16271627
break;

llvm/lib/CodeGen/GlobalISel/GISelKnownBits.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ void GISelKnownBits::computeKnownBitsImpl(Register R, KnownBits &Known,
238238
Known = KnownBits::commonBits(Known, Known2);
239239
// If we reach a point where we don't know anything
240240
// just stop looking through the operands.
241-
if (Known.One == 0 && Known.Zero == 0)
241+
if (Known.isUnknown())
242242
break;
243243
} else {
244244
// We know nothing.

0 commit comments

Comments
 (0)