From 6401260af24812454817891ca60b2126a14d5b6f Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Wed, 4 Apr 2007 06:18:21 +0000 Subject: [PATCH] trivial optimization git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35648 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/ADT/APInt.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/llvm/ADT/APInt.h b/include/llvm/ADT/APInt.h index df90753f636..d80c601d274 100644 --- a/include/llvm/ADT/APInt.h +++ b/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; } /// @}