Skip to content

Commit ecbd041

Browse files
committed
[KnownBits] KnownBits::computeForMul - avoid unnecessary APInt copies. NFCI.
Use const references instead.
1 parent 0b8711e commit ecbd041

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

llvm/lib/Support/KnownBits.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -280,8 +280,8 @@ KnownBits KnownBits::computeForMul(const KnownBits &LHS, const KnownBits &RHS) {
280280
// Where C5, C6 describe the known bits of %a, %b
281281
// C1, C2 describe the known bottom bits of %a, %b.
282282
// C7 describes the mask of the known bits of the result.
283-
APInt Bottom0 = LHS.One;
284-
APInt Bottom1 = RHS.One;
283+
const APInt &Bottom0 = LHS.One;
284+
const APInt &Bottom1 = RHS.One;
285285

286286
// How many times we'd be able to divide each argument by 2 (shr by 1).
287287
// This gives us the number of trailing zeros on the multiplication result.

0 commit comments

Comments
 (0)