[PATCH] D144329: [InstCombine] canonicalize "extract lowest set bit" away from cttz intrinsic

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Feb 18 06:23:44 PST 2023


nikic accepted this revision.
nikic added a comment.
This revision is now accepted and ready to land.

LGTM. I think this is a reasonable canonical form, especially as @goldstein.w.n added KnownBits support for these patterns recently.

Worth noting that for pow2 detection we canonicalize in the reverse direction (towards ctpop and icmp), and I don't quite remember why we ended up going with that somewhat unusual choice.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D144329/new/

https://reviews.llvm.org/D144329



More information about the llvm-commits mailing list