summaryrefslogtreecommitdiffstats
path: root/llvm
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2007-04-04 06:18:21 +0000
committerChris Lattner <sabre@nondot.org>2007-04-04 06:18:21 +0000
commite7cc7c825b50bc03b89de3704b9a6789fdb0024c (patch)
tree65884846b9848c488b110f94973a87ec62df3154 /llvm
parent91fd109d6ba231667e3cdc549288a36ab4f474c4 (diff)
downloadbcm5719-llvm-e7cc7c825b50bc03b89de3704b9a6789fdb0024c.tar.gz
bcm5719-llvm-e7cc7c825b50bc03b89de3704b9a6789fdb0024c.zip
trivial optimization
llvm-svn: 35648
Diffstat (limited to 'llvm')
-rw-r--r--llvm/include/llvm/ADT/APInt.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/include/llvm/ADT/APInt.h b/llvm/include/llvm/ADT/APInt.h
index df90753f636..d80c601d274 100644
--- a/llvm/include/llvm/ADT/APInt.h
+++ b/llvm/include/llvm/ADT/APInt.h
@@ -278,7 +278,7 @@ public:
/// This converts the APInt to a boolean value as a test against zero.
/// @brief Boolean conversion function.
inline bool getBoolValue() const {
- return countLeadingZeros() != BitWidth;
+ return *this != 0;
}
/// @}
OpenPOWER on IntegriCloud