summaryrefslogtreecommitdiffstats
path: root/llvm
diff options
context:
space:
mode:
authorCraig Topper <craig.topper@gmail.com>2017-04-19 23:52:59 +0000
committerCraig Topper <craig.topper@gmail.com>2017-04-19 23:52:59 +0000
commit9700a60a6157bf1ebfcf3f685b01b9ef607356a1 (patch)
tree4d84a714c83b4f03a35d87ffa11ec9c5fcda4e67 /llvm
parentf1de9e83c26eec07f9bea393b604cb6d6d1dffb0 (diff)
downloadbcm5719-llvm-9700a60a6157bf1ebfcf3f685b01b9ef607356a1.tar.gz
bcm5719-llvm-9700a60a6157bf1ebfcf3f685b01b9ef607356a1.zip
[APInt] Use ugt(uint64_t) for the compare in getLimitedValue(uint64_t) since the code is identical to it. NFC
llvm-svn: 300796
Diffstat (limited to 'llvm')
-rw-r--r--llvm/include/llvm/ADT/APInt.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/llvm/include/llvm/ADT/APInt.h b/llvm/include/llvm/ADT/APInt.h
index cdcb178c97f..e517a13af1e 100644
--- a/llvm/include/llvm/ADT/APInt.h
+++ b/llvm/include/llvm/ADT/APInt.h
@@ -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.
OpenPOWER on IntegriCloud