[llvm] [KnownBits] Make nuw and nsw support in computeForAddSub optimal (PR #83382)
via llvm-commits
llvm-commits at lists.llvm.org
Sat Mar 2 10:22:49 PST 2024
================
@@ -62,6 +62,11 @@ struct KnownBits {
/// Returns true if we don't know any bits.
bool isUnknown() const { return Zero.isZero() && One.isZero(); }
+ /// Returns true if we don't know the sign bit.
+ bool isSignUnknown() const {
+ return !Zero.isSignBitSet() && !One.isSignBitSet();
+ }
----------------
goldsteinn wrote:
Done
https://github.com/llvm/llvm-project/pull/83382
More information about the llvm-commits
mailing list