re PR tree-optimization/40542 (vectorizes access to volatile array)
PR tree-optimization/40542 * tree-vect-analyze.c (vect_determine_vectorization_factor): Don't vectorize volatile types. From-SVN: r149092
This commit is contained in:
parent
f3bb6a6b4a
commit
57809812cf
|
@ -1,3 +1,9 @@
|
|||
2009-06-30 Ira Rosen <irar@il.ibm.com>
|
||||
|
||||
PR tree-optimization/40542
|
||||
* tree-vect-analyze.c (vect_determine_vectorization_factor): Don't
|
||||
vectorize volatile types.
|
||||
|
||||
2009-06-29 Janis Johnson <janis187@us.ibm.com>
|
||||
|
||||
PR c/39902
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
2009-06-30 Ira Rosen <irar@il.ibm.com>
|
||||
|
||||
PR tree-optimization/40542
|
||||
* gcc.dg/vect/pr40542.c: New test.
|
||||
|
||||
2009-06-29 Janis Johnson <janis187@us.ibm.com>
|
||||
|
||||
PR c/39902
|
||||
|
|
|
@ -0,0 +1,14 @@
|
|||
/* { 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" } } */
|
||||
|
|
@ -199,6 +199,15 @@ vect_determine_vectorization_factor (loop_vec_info loop_vinfo)
|
|||
print_gimple_stmt (vect_dump, stmt, 0, TDF_SLIM);
|
||||
}
|
||||
|
||||
if (gimple_has_volatile_ops (stmt))
|
||||
{
|
||||
if (vect_print_dump_info (REPORT_UNVECTORIZED_LOOPS))
|
||||
fprintf (vect_dump, "not vectorized: stmt has volatile"
|
||||
" operands");
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
gcc_assert (stmt_info);
|
||||
|
||||
/* skip stmts which do not need to be vectorized. */
|
||||
|
|
Loading…
Reference in New Issue