Skip to content

Commit

Permalink
[DAG] TargetLowering::SimplifySetCC - use APInt::getMinSignedBits() h…
Browse files Browse the repository at this point in the history
…elper. NFC.
  • Loading branch information
RKSimon committed Jan 4, 2022
1 parent 82020de commit 882c083
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
Expand Up @@ -3678,9 +3678,7 @@ SDValue TargetLowering::SimplifySetCC(EVT VT, SDValue N0, SDValue N1,
}

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

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

0 comments on commit 882c083

Please sign in to comment.