diff options
author | Nadav Rotem <nadav.rotem@intel.com> | 2011-08-24 20:18:38 +0000 |
---|---|---|
committer | Nadav Rotem <nadav.rotem@intel.com> | 2011-08-24 20:18:38 +0000 |
commit | 4c7c0f23533565c7e2ddf71e01bf50f2aede5f1b (patch) | |
tree | 7712e1fd7075695dceadf424ad4a982f5e194b1e /include | |
parent | df9ce6bbc5b66c3c4d30c2f32b6f17c690cfa004 (diff) | |
download | llvm-4c7c0f23533565c7e2ddf71e01bf50f2aede5f1b.tar.gz llvm-4c7c0f23533565c7e2ddf71e01bf50f2aede5f1b.tar.bz2 llvm-4c7c0f23533565c7e2ddf71e01bf50f2aede5f1b.tar.xz |
Implement Constant::isAllOnesValue(). Fix ConstantFolding to use the new api.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138469 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r-- | include/llvm/Constant.h | 4 | ||||
-rw-r--r-- | include/llvm/Constants.h | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/include/llvm/Constant.h b/include/llvm/Constant.h index 601b37bb64..ecc1fe70cc 100644 --- a/include/llvm/Constant.h +++ b/include/llvm/Constant.h @@ -52,6 +52,10 @@ public: /// getNullValue. bool isNullValue() const; + /// isAllOnesValue - Return true if this is the value that would be returned by + /// getAllOnesValue. + bool isAllOnesValue() const; + /// isNegativeZeroValue - Return true if the value is what would be returned /// by getZeroValueForNegation. bool isNegativeZeroValue() const; diff --git a/include/llvm/Constants.h b/include/llvm/Constants.h index 5785b8187d..e168979bea 100644 --- a/include/llvm/Constants.h +++ b/include/llvm/Constants.h @@ -170,7 +170,7 @@ public: /// to true. /// @returns true iff this constant's bits are all set to true. /// @brief Determine if the value is all ones. - bool isAllOnesValue() const { + bool isMinusOne() const { return Val.isAllOnesValue(); } |