[llvm] [DAG] Add generic i8 CTPOP lowering using i32 MUL (PR #79989)
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 1 03:28:20 PST 2024
================
@@ -8639,6 +8639,24 @@ SDValue TargetLowering::expandCTPOP(SDNode *Node, SelectionDAG &DAG) const {
if (VT.isVector() && !canExpandVectorCTPOP(*this, VT))
return SDValue();
+ // i8 CTPOP - with efficient i32 MUL, then attempt multiply-mask-multiply.
+ if (VT == MVT::i8 && shouldAllowMultiplyInBitCounts(MVT::i8, MVT::i32) &&
----------------
RKSimon wrote:
So far only x86 (and maybe arm) have benefited from this
https://github.com/llvm/llvm-project/pull/79989
More information about the llvm-commits
mailing list