[PATCH] D140649: [AArch64][SelectionDAG] Eliminates redundant zero-extension for 32-bit popcount

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Dec 24 12:56:05 PST 2022


efriedma added a comment.

I don't think this is right.  The high bits do in fact have to be zero; otherwise they affect the result of the uaddlv.

If you add a pattern to optimize "insertelement <2 x i32> zeroinitializer, i32 %x, i32 0", you should be able to leverage that for ctpop lowering.


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

https://reviews.llvm.org/D140649



More information about the llvm-commits mailing list