mirror of
https://github.com/RPCS3/llvm.git
synced 2025-01-10 06:03:52 +00:00
[APInt] Use ugt(uint64_t) for the compare in getLimitedValue(uint64_t) since the code is identical to it. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@300796 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
ae23971d1e
commit
29c6d769ca
@ -426,8 +426,7 @@ public:
|
||||
/// If this value is smaller than the specified limit, return it, otherwise
|
||||
/// return the limit value. This causes the value to saturate to the limit.
|
||||
uint64_t getLimitedValue(uint64_t Limit = UINT64_MAX) const {
|
||||
return (getActiveBits() > 64 || getZExtValue() > Limit) ? Limit
|
||||
: getZExtValue();
|
||||
return ugt(Limit) ? Limit : getZExtValue();
|
||||
}
|
||||
|
||||
/// \brief Check if the APInt consists of a repeated bit pattern.
|
||||
|
Loading…
Reference in New Issue
Block a user