diff options
author | Simon Pilgrim <llvm-dev@redking.me.uk> | 2021-12-31 23:15:53 +0000 |
---|---|---|
committer | Simon Pilgrim <llvm-dev@redking.me.uk> | 2022-01-04 13:48:36 +0000 |
commit | 882c083889e6d56231e0efc59080376b2c96698a (patch) | |
tree | 3647230bc7d8fada5a9f015f827fb84bd7642678 | |
parent | 82020de532108969294abd47991c8a08bbee1737 (diff) | |
download | llvm-882c083889e6d56231e0efc59080376b2c96698a.tar.gz |
[DAG] TargetLowering::SimplifySetCC - use APInt::getMinSignedBits() helper. NFC.
-rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp b/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp index 2781c760d297..9cca6c895196 100644 --- a/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp @@ -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 && |