[Bug tree-optimization/116142] vec_widen_smult_{odd,even}_M ineffective for a simple widening dot product (vect_used_by_reduction is not set?)
xry111 at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Jul 31 15:34:33 GMT 2024
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116142
--- Comment #7 from Xi Ruoyao <xry111 at gcc dot gnu.org> ---
(In reply to Richard Biener from comment #6)
> Can you check if the following makes things work for you?
>
> diff --git a/gcc/tree-vect-stmts.cc b/gcc/tree-vect-stmts.cc
> index 67f6e5df255..7496e31164c 100644
> --- a/gcc/tree-vect-stmts.cc
> +++ b/gcc/tree-vect-stmts.cc
> @@ -14200,7 +14200,6 @@ supportable_widening_operation (vec_info *vinfo,
> are properly set up for the caller. If we fail, we'll continue with
> a VEC_WIDEN_MULT_LO/HI_EXPR check. */
> if (vect_loop
> - && STMT_VINFO_RELEVANT (stmt_info) == vect_used_by_reduction
> && !nested_in_vect_loop_p (vect_loop, stmt_info)
> && supportable_widening_operation (vinfo, VEC_WIDEN_MULT_EVEN_EXPR,
> stmt_info, vectype_out,
Still not. I get something like
t1.c:5:20: note: ==> examining pattern statement: patt_24 = _1 w* _3;
t1.c:5:20: note: vect_is_simple_use: operand x[i_15], type of def: internal
t1.c:5:20: note: vect_is_simple_use: vectype vector(8) short int
t1.c:5:20: note: vect_is_simple_use: operand y[i_15], type of def: internal
t1.c:5:20: note: vect_is_simple_use: vectype vector(8) short int
t1.c:5:20: missed: conversion not supported by target.
t1.c:5:20: note: vect_is_simple_use: operand x[i_15], type of def: internal
t1.c:5:20: note: vect_is_simple_use: vectype vector(8) short int
t1.c:3:5: missed: not vectorized: relevant stmt not supported: patt_24 = _1
w* _3;
t1.c:5:20: missed: bad operation or unsupported loop bound.
t1.c:5:20: note: ***** Analysis failed with vector mode V8HI
As an experiment I renamed the {even,odd} expanders to {lo,hi} (doing so is
definitely wrong in reality) and I got the "expected" result.
More information about the Gcc-bugs
mailing list