re PR tree-optimization/51485 (ICE in vectorizable_assignment)

PR tree-optimization/51485
	* tree-vect-data-refs.c (vect_analyze_data_refs): Give up on
	DRs in call stmts.

	* g++.dg/vect/pr51485.cc: New test.

From-SVN: r182212
This commit is contained in:
Jakub Jelinek 2011-12-11 22:01:00 +01:00 committed by Jakub Jelinek
parent fba5ace06b
commit 9c2390853e
4 changed files with 45 additions and 0 deletions

View File

@ -1,3 +1,9 @@
2011-12-11 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/51485
* tree-vect-data-refs.c (vect_analyze_data_refs): Give up on
DRs in call stmts.
2011-12-11 Patrick Marlier <patrick.marlier@gmail.com>
* trans-mem.c (ipa_tm_transform_calls_redirect): Do not remove

View File

@ -1,3 +1,8 @@
2011-12-11 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/51485
* g++.dg/vect/pr51485.cc: New test.
2011-12-11 Tobias Burnus <burnus@net-b.de>
PR fortran/50923

View File

@ -0,0 +1,14 @@
/* { dg-do compile } */
struct A { A (); unsigned int a; };
double bar (A a) throw () __attribute__((pure));
void
foo (unsigned int x, double *y, A *z)
{
unsigned int i;
for (i = 0; i < x; i++)
y[i] = bar (z[i]);
}
/* { dg-final { cleanup-tree-dump "vect" } } */

View File

@ -2896,6 +2896,26 @@ vect_analyze_data_refs (loop_vec_info loop_vinfo,
return false;
}
if (is_gimple_call (stmt))
{
if (vect_print_dump_info (REPORT_UNVECTORIZED_LOCATIONS))
{
fprintf (vect_dump, "not vectorized: dr in a call ");
print_gimple_stmt (vect_dump, stmt, 0, TDF_SLIM);
}
if (bb_vinfo)
{
STMT_VINFO_VECTORIZABLE (stmt_info) = false;
stop_bb_analysis = true;
continue;
}
if (gather)
free_data_ref (dr);
return false;
}
/* Update DR field in stmt_vec_info struct. */
/* If the dataref is in an inner-loop of the loop that is considered for