aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-data-ref.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2012-01-25 16:38:51 +0100
committerJakub Jelinek <jakub@gcc.gnu.org>2012-01-25 16:38:51 +0100
commit06e1d03dc90b2daf18c06346ff5cabe266f0b6f3 (patch)
treeda4aee72f971bac439fb906dc91d3892031fd544 /gcc/tree-data-ref.c
parent8bf43909f8707a06d2ead116bc81f10e5690121e (diff)
downloadgcc-06e1d03dc90b2daf18c06346ff5cabe266f0b6f3.zip
gcc-06e1d03dc90b2daf18c06346ff5cabe266f0b6f3.tar.gz
gcc-06e1d03dc90b2daf18c06346ff5cabe266f0b6f3.tar.bz2
re PR tree-optimization/51987 (Predictive commoning wrong-code with non-volatile asm)
PR tree-optimization/51987 * tree-data-ref.c (get_references_in_stmt): Handle references in non-volatile GIMPLE_ASM. * gcc.target/i386/pr51987.c: New test. From-SVN: r183524
Diffstat (limited to 'gcc/tree-data-ref.c')
-rw-r--r--gcc/tree-data-ref.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/tree-data-ref.c b/gcc/tree-data-ref.c
index a0d86ec..09929c7 100644
--- a/gcc/tree-data-ref.c
+++ b/gcc/tree-data-ref.c
@@ -1,5 +1,5 @@
/* Data references and dependences detectors.
- Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011
+ Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
Free Software Foundation, Inc.
Contributed by Sebastian Pop <pop@cri.ensmp.fr>
@@ -4185,7 +4185,7 @@ get_references_in_stmt (gimple stmt, VEC (data_ref_loc, heap) **references)
if ((stmt_code == GIMPLE_CALL
&& !(gimple_call_flags (stmt) & (ECF_CONST | ECF_PURE)))
|| (stmt_code == GIMPLE_ASM
- && gimple_asm_volatile_p (stmt)))
+ && (gimple_asm_volatile_p (stmt) || gimple_vuse (stmt))))
clobbers_memory = true;
if (!gimple_vuse (stmt))