Commit 90eb75f2 by Richard Biener Committed by Richard Biener

re PR tree-optimization/56778 (ICE on several benchmarks after r196775.)

2013-04-02  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/56778
	* tree-vect-data-refs.c (vect_analyze_data_ref_dependence):
	Runtime alias tests are not supported for gather loads.
	* tree-vect-loop-manip.c (vect_loop_versioning): Insert
	stmts referenced from SSA operands before updating SSA form.

	* gcc.dg/torture/pr56778.c: New testcase.

From-SVN: r197355
parent 8034bcbe
2013-04-02 Richard Biener <rguenther@suse.de>
PR tree-optimization/56778
* tree-vect-data-refs.c (vect_analyze_data_ref_dependence):
Runtime alias tests are not supported for gather loads.
* tree-vect-loop-manip.c (vect_loop_versioning): Insert
stmts referenced from SSA operands before updating SSA form.
2013-04-02 Ian Caulfield <ian.caulfield@arm.com>
Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
......
2013-04-02 Richard Biener <rguenther@suse.de>
PR tree-optimization/56778
* gcc.dg/torture/pr56778.c: New testcase.
2013-04-02 Richard Biener <rguenther@suse.de>
PR middle-end/56768
* g++.dg/torture/pr56768.C: New testcase.
......
/* { dg-do compile } */
/* { dg-options "-march=core-avx2" { target x86_64-*-* } } */
typedef struct {
float a,b,c;
} S;
S * arr[100];
void bar (float *in[], int n)
{
int i;
for (i=0; i<n; i++)
(*in)[i] = -arr[i]->b;
}
......@@ -280,6 +280,23 @@ vect_analyze_data_ref_dependence (struct data_dependence_relation *ddr,
/* Unknown data dependence. */
if (DDR_ARE_DEPENDENT (ddr) == chrec_dont_know)
{
if (STMT_VINFO_GATHER_P (stmtinfo_a)
|| STMT_VINFO_GATHER_P (stmtinfo_b))
{
if (dump_enabled_p ())
{
dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location,
"versioning for alias not supported for: "
"can't determine dependence between ");
dump_generic_expr (MSG_MISSED_OPTIMIZATION, TDF_SLIM,
DR_REF (dra));
dump_printf (MSG_MISSED_OPTIMIZATION, " and ");
dump_generic_expr (MSG_MISSED_OPTIMIZATION, TDF_SLIM,
DR_REF (drb));
}
return false;
}
if (dump_enabled_p ())
{
dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location,
......@@ -299,6 +316,23 @@ vect_analyze_data_ref_dependence (struct data_dependence_relation *ddr,
/* Known data dependence. */
if (DDR_NUM_DIST_VECTS (ddr) == 0)
{
if (STMT_VINFO_GATHER_P (stmtinfo_a)
|| STMT_VINFO_GATHER_P (stmtinfo_b))
{
if (dump_enabled_p ())
{
dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location,
"versioning for alias not supported for: "
"bad dist vector for ");
dump_generic_expr (MSG_MISSED_OPTIMIZATION, TDF_SLIM,
DR_REF (dra));
dump_printf (MSG_MISSED_OPTIMIZATION, " and ");
dump_generic_expr (MSG_MISSED_OPTIMIZATION, TDF_SLIM,
DR_REF (drb));
}
return false;
}
if (dump_enabled_p ())
{
dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location,
......
......@@ -2476,11 +2476,11 @@ vect_loop_versioning (loop_vec_info loop_vinfo,
/* End loop-exit-fixes after versioning. */
update_ssa (TODO_update_ssa);
if (cond_expr_stmt_list)
{
cond_exp_gsi = gsi_last_bb (condition_bb);
gsi_insert_seq_before (&cond_exp_gsi, cond_expr_stmt_list,
GSI_SAME_STMT);
}
update_ssa (TODO_update_ssa);
}
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