aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-loop-distribution.c
diff options
context:
space:
mode:
authorRichard Guenther <rguenther@suse.de>2012-05-21 10:46:19 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2012-05-21 10:46:19 +0000
commit8450aa972070a05e257ac8845b99481d5fa61090 (patch)
treea77de3b81e20c024d21b4b08032b956431e6ca31 /gcc/tree-loop-distribution.c
parent6be4d3acd04120f034d168352fea8910508a6b75 (diff)
downloadgcc-8450aa972070a05e257ac8845b99481d5fa61090.zip
gcc-8450aa972070a05e257ac8845b99481d5fa61090.tar.gz
gcc-8450aa972070a05e257ac8845b99481d5fa61090.tar.bz2
tree-loop-distribution.c (can_generate_builtin): Reject volatile stmts.
2012-05-21 Richard Guenther <rguenther@suse.de> * tree-loop-distribution.c (can_generate_builtin): Reject volatile stmts. * gcc.dg/torture/ldist-1.c: New testcase. From-SVN: r187707
Diffstat (limited to 'gcc/tree-loop-distribution.c')
-rw-r--r--gcc/tree-loop-distribution.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/tree-loop-distribution.c b/gcc/tree-loop-distribution.c
index d7506e6..f4b03bd 100644
--- a/gcc/tree-loop-distribution.c
+++ b/gcc/tree-loop-distribution.c
@@ -822,8 +822,10 @@ can_generate_builtin (struct graph *rdg, bitmap partition)
nb_reads++;
else if (RDG_MEM_WRITE_STMT (rdg, i))
{
+ gimple stmt = RDG_STMT (rdg, i);
nb_writes++;
- if (stmt_with_adjacent_zero_store_dr_p (RDG_STMT (rdg, i)))
+ if (!gimple_has_volatile_ops (stmt)
+ && stmt_with_adjacent_zero_store_dr_p (stmt))
stores_zero++;
}