Skip to content

Commit 48324f0

Browse files
authored
[ValueTracking] Combine variable declaration with its only assignment. NFC (llvm#89526)
1 parent d674f45 commit 48324f0

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

llvm/lib/Analysis/ValueTracking.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2682,7 +2682,6 @@ static bool isKnownNonZeroFromOperator(const Operator *I,
26822682
if (cast<PossiblyExactOperator>(I)->isExact())
26832683
return isKnownNonZero(I->getOperand(0), DemandedElts, Q, Depth);
26842684

2685-
std::optional<bool> XUgeY;
26862685
KnownBits XKnown =
26872686
computeKnownBits(I->getOperand(0), DemandedElts, Depth, Q);
26882687
// If X is fully unknown we won't be able to figure anything out so don't
@@ -2698,7 +2697,7 @@ static bool isKnownNonZeroFromOperator(const Operator *I,
26982697
YKnown = YKnown.abs(/*IntMinIsPoison*/ false);
26992698
}
27002699
// If X u>= Y then div is non zero (0/0 is UB).
2701-
XUgeY = KnownBits::uge(XKnown, YKnown);
2700+
std::optional<bool> XUgeY = KnownBits::uge(XKnown, YKnown);
27022701
// If X is total unknown or X u< Y we won't be able to prove non-zero
27032702
// with compute known bits so just return early.
27042703
return XUgeY && *XUgeY;

0 commit comments

Comments
 (0)