Skip to content

Commit 882c083

Browse files
committed
[DAG] TargetLowering::SimplifySetCC - use APInt::getMinSignedBits() helper. NFC.
1 parent 82020de commit 882c083

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3678,9 +3678,7 @@ SDValue TargetLowering::SimplifySetCC(EVT VT, SDValue N0, SDValue N1,
36783678
}
36793679

36803680
// Figure out how many bits we need to preserve this constant.
3681-
unsigned ReqdBits = Signed ?
3682-
C1.getBitWidth() - C1.getNumSignBits() + 1 :
3683-
C1.getActiveBits();
3681+
unsigned ReqdBits = Signed ? C1.getMinSignedBits() : C1.getActiveBits();
36843682

36853683
// Make sure we're not losing bits from the constant.
36863684
if (MinBits > 0 &&

0 commit comments

Comments
 (0)