On Sat, Jul 13, 2024 at 5:48 PM Feng Xue OS wrote:
>
> For lane-reducing operation(dot-prod/widen-sum/sad) in loop reduction, current
> vectorizer could only handle the pattern if the reduction chain does not
> contain other operation, no matter the other is normal or lane-reducing.
>
> This patch
_reduction (as_a (vinfo), stmt_info,
node, node_instance, cost_vec)
|| vectorizable_induction (as_a (vinfo), stmt_info,
diff --git a/gcc/tree-vectorizer.h b/gcc/tree-vectorizer.h
index 09923b9b440..62121f63f18 100644
--- a/gcc/tree-vectorizer
)
|| vectorizable_store (vinfo, stmt_info, NULL, NULL, node, cost_vec)
+ || vectorizable_lane_reducing (as_a (vinfo),
+stmt_info, node, cost_vec)
|| vectorizable_reduction (as_a (vinfo), stmt_info,
node, node_