[PATCH] D150102: [KnownBits] Add implementations for saturating add/sub functions
Simon Pilgrim via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat May 13 04:26:42 PDT 2023
RKSimon accepted this revision.
RKSimon added a comment.
This revision is now accepted and ready to land.
LGTM
================
Comment at: llvm/lib/Support/KnownBits.cpp:443
+ return K.Zero[BitWidth - 1] || K.One[BitWidth - 1];
+ };
+ std::optional<bool> Overflow;
----------------
goldstein.w.n wrote:
> 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?
I thought I'd had to use a similar pattern in the past, but can't find anything - no worries
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