[llvm] [KnownBits] Add `force{Non}Negative` API (PR #110389)
via llvm-commits
llvm-commits at lists.llvm.org
Sun Sep 29 07:08:25 PDT 2024
goldsteinn wrote:
> Historically, we've mostly used the clear + set pattern to avoid conflict assertions. These assertions no longer exists -- arguably, it is a good outcome if we get a conflict, because we could (but currently don't) fold to poison.
>
> The API may still be useful in cases where you're not combining two unrelated facts but rather fixing up an incorrect value. But I don't think that's the usage you have in mind?
>
> Overall, I think we should be changing these uses to plain makeNegative/makeNonNegative, if possible.
Since we can handle conflicts there are definetly some places where `make` can but it previously couldn't work, but there are still uses for `force`. The case in `computeForSat...` still would need force and both intended cases in https://github.com/llvm/llvm-project/pull/110329 need `force`. But either way, if people don't think this will be useful its not important to get in.
https://github.com/llvm/llvm-project/pull/110389
More information about the llvm-commits
mailing list