[llvm] [ValueTracking] Recognize `LShr(UINT_MAX, Y) + 1` as a power-of-two (PR #91171)

Yingwei Zheng via llvm-commits llvm-commits at lists.llvm.org
Mon May 6 05:23:00 PDT 2024


https://github.com/dtcxzyw approved this pull request.

LGTM. Nice catch!

BTW, can you please have a look at https://github.com/dtcxzyw/llvm-opt-benchmark/blob/03a9d18338e0213e304f67ea9cb18e4ae95f5d26/bench/regex-rs/optimized/11vfjke4utuj478u.ll#L7147-L7152? I guess we can handle this pattern in `foldCttzCtlz` as well :)

Proof: https://alive2.llvm.org/ce/z/2aHfYa

https://github.com/llvm/llvm-project/pull/91171


More information about the llvm-commits mailing list