[PATCH] D150102: [KnownBits] Add implementations for saturating add/sub functions

Noah Goldstein via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon May 8 18:52:51 PDT 2023


goldstein.w.n added inline comments.


================
Comment at: llvm/lib/Support/KnownBits.cpp:443
+    return K.Zero[BitWidth - 1] || K.One[BitWidth - 1];
+  };
+  std::optional<bool> Overflow;
----------------
RKSimon wrote:
> This might be worth changing into a KnownBits::isSignBitKnown() helper method?
> This might be worth changing into a KnownBits::isSignBitKnown() helper method?

Is this used/desired elsewhere?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D150102/new/

https://reviews.llvm.org/D150102



More information about the llvm-commits mailing list