diff options
author | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-12-16 21:44:02 +0000 |
---|---|---|
committer | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-12-16 21:44:02 +0000 |
commit | 7d9a35b875ca32c0e257fb8b7c2160fd64757a36 (patch) | |
tree | a6b941ced8b02130c5e8c8bcf0b55996d0d50ca7 /gcc/tree-ssa-ter.c | |
parent | d081c1c0db2962bea309cd31a62a83b5eaba213f (diff) | |
download | gcc-7d9a35b875ca32c0e257fb8b7c2160fd64757a36.tar.gz |
PR tree-optimization/43655
* tree-ssa-ter.c (is_replaceable_p): Don't use
gimple_references_memory_p for -O0, instead check for load
by looking at rhs.
* g++.dg/opt/pr43655.C: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@167955 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-ssa-ter.c')
-rw-r--r-- | gcc/tree-ssa-ter.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/tree-ssa-ter.c b/gcc/tree-ssa-ter.c index 7bd766954fa..47954cfa348 100644 --- a/gcc/tree-ssa-ter.c +++ b/gcc/tree-ssa-ter.c @@ -416,7 +416,9 @@ is_replaceable_p (gimple stmt) return false; /* Without alias info we can't move around loads. */ - if (gimple_references_memory_p (stmt) && !optimize) + if (!optimize + && gimple_assign_single_p (stmt) + && !is_gimple_val (gimple_assign_rhs1 (stmt))) return false; /* Float expressions must go through memory if float-store is on. */ |