diff options
Diffstat (limited to 'include/llvm/Support/KnownBits.h')
| -rw-r--r-- | include/llvm/Support/KnownBits.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/include/llvm/Support/KnownBits.h b/include/llvm/Support/KnownBits.h index 2c77d40559b9..7a4de3e5ff12 100644 --- a/include/llvm/Support/KnownBits.h +++ b/include/llvm/Support/KnownBits.h @@ -25,7 +25,7 @@ struct KnownBits { APInt One; private: - // Internal constructor for creating a ConstantRange from two APInts. + // Internal constructor for creating a KnownBits from two APInts. KnownBits(APInt Zero, APInt One) : Zero(std::move(Zero)), One(std::move(One)) {} @@ -193,6 +193,10 @@ public: unsigned countMaxPopulation() const { return getBitWidth() - Zero.countPopulation(); } + + /// Compute known bits resulting from adding LHS and RHS. + static KnownBits computeForAddSub(bool Add, bool NSW, const KnownBits &LHS, + KnownBits RHS); }; } // end namespace llvm |
