From: Chris Lattner Date: Wed, 4 Apr 2007 06:18:21 +0000 (+0000) Subject: trivial optimization X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=6401260af24812454817891ca60b2126a14d5b6f;p=oota-llvm.git trivial optimization git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35648 91177308-0d34-0410-b5e6-96231b3b80d8 --- 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; } /// @}