[llvm] [InstCombine] Added optimisation for trunc (Pow2 >> x) to i1 (PR #157030)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 10 08:24:50 PDT 2025
kper wrote:
> LGTM. Thanks.
>
> As a follow-up, are you interested in folding `trunc (shr C=0b11111...0000, %x) to i1 -> icmp ugt %x, cttz(C) - 1` as well? Not sure if it is profitable in real-world programs.
Yeah sure :)
I will make a new PR tomorrow and let's see whether it improves something
Can't hurt to try it, thanks for the suggestion
https://github.com/llvm/llvm-project/pull/157030
More information about the llvm-commits
mailing list