Commit 5e6667b2 by Richard Biener Committed by Richard Biener

re PR tree-optimization/59374 (-ftree-slp-vectorize breaks unique_ptr's move constructor)

2014-01-10  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/59374
	* tree-vect-slp.c (vect_slp_analyze_bb_1): Move dependence
	checking after SLP discovery.  Mark stmts not participating
	in any SLP instance properly.

	* gcc.dg/torture/pr59374-3.c: New testcase.

From-SVN: r206523
parent 5619162c
2014-01-10 Richard Biener <rguenther@suse.de>
PR tree-optimization/59374
* tree-vect-slp.c (vect_slp_analyze_bb_1): Move dependence
checking after SLP discovery. Mark stmts not participating
in any SLP instance properly.
2014-01-10 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
* config/arm/arm.c (arm_new_rtx_costs): Use destination mode
......
2014-01-10 Richard Biener <rguenther@suse.de>
PR tree-optimization/59374
* gcc.dg/torture/pr59374-3.c: New testcase.
2014-01-10 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
* lib/target-supports.exp
......
extern void abort (void);
static struct X { void *a; void *b; } a, b;
void __attribute__((noinline)) foo (void)
{
void *tem = a.b;
a.b = (void *)0;
b.b = tem;
b.a = a.a;
a.a = tem;
}
int main()
{
a.b = &a;
foo ();
if (b.b != &a)
abort ();
return 0;
}
......@@ -2110,17 +2110,6 @@ vect_slp_analyze_bb_1 (basic_block bb)
vect_pattern_recog (NULL, bb_vinfo);
if (!vect_slp_analyze_data_ref_dependences (bb_vinfo))
{
if (dump_enabled_p ())
dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location,
"not vectorized: unhandled data dependence "
"in basic block.\n");
destroy_bb_vec_info (bb_vinfo);
return NULL;
}
if (!vect_analyze_data_refs_alignment (NULL, bb_vinfo))
{
if (dump_enabled_p ())
......@@ -2155,6 +2144,29 @@ vect_slp_analyze_bb_1 (basic_block bb)
vect_mark_slp_stmts_relevant (SLP_INSTANCE_TREE (instance));
}
/* Mark all the statements that we do not want to vectorize. */
for (gimple_stmt_iterator gsi = gsi_start_bb (BB_VINFO_BB (bb_vinfo));
!gsi_end_p (gsi); gsi_next (&gsi))
{
stmt_vec_info vinfo = vinfo_for_stmt (gsi_stmt (gsi));
if (STMT_SLP_TYPE (vinfo) != pure_slp)
STMT_VINFO_VECTORIZABLE (vinfo) = false;
}
/* Analyze dependences. At this point all stmts not participating in
vectorization have to be marked. Dependence analysis assumes
that we either vectorize all SLP instances or none at all. */
if (!vect_slp_analyze_data_ref_dependences (bb_vinfo))
{
if (dump_enabled_p ())
dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location,
"not vectorized: unhandled data dependence "
"in basic block.\n");
destroy_bb_vec_info (bb_vinfo);
return NULL;
}
if (!vect_verify_datarefs_alignment (NULL, bb_vinfo))
{
if (dump_enabled_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