Commit f1e1ed33 by Richard Biener Committed by Richard Biener

re PR tree-optimization/92324 (ICE in expand_direct_optab_fn, at internal-fn.c:2890)

2019-11-08  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/92324
	* tree-vect-loop.c (vect_create_epilog_for_reduction): Use
	STMT_VINFO_REDUC_VECTYPE for all computations, inserting
	sign-conversions as necessary.
	(vectorizable_reduction): Reject conversions in the chain
	that are not sign-conversions, base analysis on a non-converting
	stmt and its operation sign.  Set STMT_VINFO_REDUC_VECTYPE.
	* tree-vect-stmts.c (vect_stmt_relevant_p): Don't dump anything
	for debug stmts.
	* tree-vectorizer.h (_stmt_vec_info::reduc_vectype): New.
	(STMT_VINFO_REDUC_VECTYPE): Likewise.

	* gcc.dg/vect/pr92205.c: XFAIL.
	* gcc.dg/vect/pr92324-1.c: New testcase.
	* gcc.dg/vect/pr92324-2.c: Likewise.

From-SVN: r277955
parent 8e02ca9f
2019-11-08 Richard Biener <rguenther@suse.de>
PR tree-optimization/92324
* tree-vect-loop.c (vect_create_epilog_for_reduction): Use
STMT_VINFO_REDUC_VECTYPE for all computations, inserting
sign-conversions as necessary.
(vectorizable_reduction): Reject conversions in the chain
that are not sign-conversions, base analysis on a non-converting
stmt and its operation sign. Set STMT_VINFO_REDUC_VECTYPE.
* tree-vect-stmts.c (vect_stmt_relevant_p): Don't dump anything
for debug stmts.
* tree-vectorizer.h (_stmt_vec_info::reduc_vectype): New.
(STMT_VINFO_REDUC_VECTYPE): Likewise.
2019-11-08 Georg-Johann Lay <avr@gjlay.de>
PR target/92055
2019-11-08 Richard Biener <rguenther@suse.de>
PR tree-optimization/92324
* gcc.dg/vect/pr92205.c: XFAIL.
* gcc.dg/vect/pr92324-1.c: New testcase.
* gcc.dg/vect/pr92324-2.c: Likewise.
2019-11-08 Richard Sandiford <richard.sandiford@arm.com>
* gcc.target/aarch64/sve/acle/general-c/gnu_vectors_1.c: New test.
......
......@@ -10,4 +10,4 @@ int b(int n, unsigned char *a)
return d;
}
/* { dg-final { scan-tree-dump "vectorized 1 loops" "vect" { target { vect_unpack && { ! vect_no_bitwise } } } } } */
/* { dg-final { scan-tree-dump "vectorized 1 loops" "vect" { xfail *-*-* } } } */
......@@ -330,13 +330,13 @@ vect_stmt_relevant_p (stmt_vec_info stmt_info, loop_vec_info loop_vinfo,
basic_block bb = gimple_bb (USE_STMT (use_p));
if (!flow_bb_inside_loop_p (loop, bb))
{
if (is_gimple_debug (USE_STMT (use_p)))
continue;
if (dump_enabled_p ())
dump_printf_loc (MSG_NOTE, vect_location,
"vec_stmt_relevant_p: used out of loop.\n");
if (is_gimple_debug (USE_STMT (use_p)))
continue;
/* We expect all such uses to be in the loop exit phis
(because of loop closed form) */
gcc_assert (gimple_code (USE_STMT (use_p)) == GIMPLE_PHI);
......
......@@ -1050,6 +1050,9 @@ public:
/* The vector input type relevant for reduction vectorization. */
tree reduc_vectype_in;
/* The vector type for performing the actual reduction. */
tree reduc_vectype;
/* Whether we force a single cycle PHI during reduction vectorization. */
bool force_single_cycle;
......@@ -1175,6 +1178,7 @@ STMT_VINFO_BB_VINFO (stmt_vec_info stmt_vinfo)
#define STMT_VINFO_REDUC_CODE(S) (S)->reduc_code
#define STMT_VINFO_REDUC_FN(S) (S)->reduc_fn
#define STMT_VINFO_REDUC_DEF(S) (S)->reduc_def
#define STMT_VINFO_REDUC_VECTYPE(S) (S)->reduc_vectype
#define STMT_VINFO_REDUC_VECTYPE_IN(S) (S)->reduc_vectype_in
#define STMT_VINFO_SLP_VECT_ONLY(S) (S)->slp_vect_only_p
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment