[llvm] [AArch64][SDAG] Combine vecreduce.add(ZExt(predicate)) into cntp(predicate) (PR #176935)
Sander de Smalen via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 23 06:50:56 PST 2026
================
@@ -19423,20 +19409,45 @@ performActiveLaneMaskCombine(SDNode *N, TargetLowering::DAGCombinerInfo &DCI,
return DAG.getNode(ISD::CONCAT_VECTORS, DL, N->getValueType(0), Concats);
}
-// Turn a v8i8/v16i8 extended vecreduce into a udot/sdot and vecreduce
-// vecreduce.add(ext(A)) to vecreduce.add(DOT(zero, A, one))
-// vecreduce.add(mul(ext(A), ext(B))) to vecreduce.add(DOT(zero, A, B))
-// If we have vectors larger than v16i8 we extract v16i8 vectors,
-// Follow the same steps above to get DOT instructions concatenate them
-// and generate vecreduce.add(concat_vector(DOT, DOT2, ..)).
+// Turn vecreduce.add(ZExt(predicate)) into cntp(predicate).
----------------
sdesmalen-arm wrote:
You're right, the top bits are masked away when used. Ignore my comment :)
https://github.com/llvm/llvm-project/pull/176935
More information about the llvm-commits
mailing list