[PATCH] D142271: [ValueTracking] Add KnownBits patterns `xor(x, x - 1)` and `and(x, -x)` for knowing upper bits to be zero

Jay Foad via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 24 06:56:11 PST 2023


foad added a comment.

In D142271#4073849 <https://reviews.llvm.org/D142271#4073849>, @foad wrote:

> I suggest implementing this in new helper functions `KnownBits::blsi` and `KnownBits::blsmsk` (if we're happy with those names), plus comprehensive test coverage in `unittests/Support/KnownBitsTest.cpp`.

I was thinking of something like D142469 <https://reviews.llvm.org/D142469>. Is this any use to you?


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