[PATCH] D142271: [ValueTracking] Add KnownBits patterns `xor(x, x - 1)` and `and(x, -x)` for knowing upper bits to be zero
Noah Goldstein via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 24 12:51:27 PST 2023
goldstein.w.n added a comment.
In D142271#4077990 <https://reviews.llvm.org/D142271#4077990>, @foad wrote:
> In D142271#4077955 <https://reviews.llvm.org/D142271#4077955>, @goldstein.w.n wrote:
>
>> I see, yeah that makes sense although I would design it as a static API b.c we can technically get more information from `-x` or `x - 1` than `x` itself if it happens to match some assume.
>
> Is that really going to happen in practice? To me it seems so unlikely as to be not worth worrying about, for the sake a a nice simple API.
Personally in favor of completeness.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D142271/new/
https://reviews.llvm.org/D142271
More information about the llvm-commits
mailing list