Commit 1825a1f3 by Ira Rosen Committed by Ira Rosen

re PR tree-optimization/40542 (vectorizes access to volatile array)


	PR tree-optimization/40542
	* tree-vect-stmts.c (vect_analyze_stmt): Don't vectorize volatile 
	types.

From-SVN: r149090
parent 0dca2153
2009-06-30 Ira Rosen <irar@il.ibm.com>
PR tree-optimization/40542
* tree-vect-stmts.c (vect_analyze_stmt): Don't vectorize volatile
types.
2009-06-30 Martin Jambor <mjambor@suse.cz>
PR tree-optimization/40582
......
2009-06-30 Ira Rosen <irar@il.ibm.com>
PR tree-optimization/40542
* gcc.dg/vect/pr40542.c: New test.
2009-06-30 Martin Jambor <mjambor@suse.cz>
PR tree-optimization/40582
......
/* { dg-do compile } */
void
volarr_cpy(char *d, volatile char *s)
{
int i;
for (i = 0; i < 16; i++)
d[i] = s[i];
}
/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail *-*-* } } } */
/* { dg-final { cleanup-tree-dump "vect" } } */
......@@ -3910,6 +3910,14 @@ vect_analyze_stmt (gimple stmt, bool *need_to_vectorize, slp_tree node)
print_gimple_stmt (vect_dump, stmt, 0, TDF_SLIM);
}
if (gimple_has_volatile_ops (stmt))
{
if (vect_print_dump_info (REPORT_UNVECTORIZED_LOCATIONS))
fprintf (vect_dump, "not vectorized: stmt has volatile operands");
return false;
}
/* Skip stmts that do not need to be vectorized. In loops this is expected
to include:
- the COND_EXPR which is the loop exit condition
......
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