Skip to content

Commit fe3b0d4

Browse files
author
Macsen Casaus
committed
replace TZ with TrailZero0
1 parent 116f88a commit fe3b0d4

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

llvm/lib/Support/KnownBits.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -898,14 +898,13 @@ KnownBits KnownBits::mul(const KnownBits &LHS, const KnownBits &RHS,
898898
}
899899

900900
// If X has TZ trailing zeroes, then bit (2 * TZ + 1) must be zero.
901-
unsigned TZ = (~LHS.Zero).countr_zero();
902-
unsigned TwoTZP1 = 2 * TZ + 1;
901+
unsigned TwoTZP1 = 2 * TrailZero0 + 1;
903902
if (TwoTZP1 < BitWidth)
904903
Res.Zero.setBit(TwoTZP1);
905904

906905
// If X has exactly TZ trailing zeros, then bit (2 * TZ + 2) must also be
907906
// zero.
908-
if (TZ < BitWidth && LHS.One[TZ]) {
907+
if (TrailZero0 < BitWidth && LHS.One[TrailZero0]) {
909908
unsigned TwoTZP2 = TwoTZP1 + 1;
910909
if (TwoTZP2 < BitWidth)
911910
Res.Zero.setBit(TwoTZP2);

0 commit comments

Comments
 (0)