[PATCH] D69918: [CR][WIP] Add `subWithNoWrap()` method

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 6 13:15:54 PST 2019


nikic added a comment.

In D69918#1736118 <https://reviews.llvm.org/D69918#1736118>, @lebedev.ri wrote:

> > If that's the case, I'm not sure whether or not we should rely on that, it seems rather subtle.
>
> Now that i've added `EXPECT_EQ(CR.isEmptySet(), AllOverflow);` test,
>  that seems like a safe assumption to me? Seems like a net win to me.


I guess it's okay, please add a comment to the implementation that we're relying on this lucky accident though. You might also want to piggy-back on the existing `CR.uadd_sat` and `CR.sadd_sat` implementations, now that the code is essentially the same.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D69918





More information about the llvm-commits mailing list