diff options
author | Martin Jambor <mjambor@suse.cz> | 2011-06-24 15:27:44 +0200 |
---|---|---|
committer | Martin Jambor <jamborm@gcc.gnu.org> | 2011-06-24 15:27:44 +0200 |
commit | b807e627309cb88537a127946c22abf31d358c51 (patch) | |
tree | 7d48077753de000e288a642bfe486a7fc7894a5a /gcc/tree-sra.c | |
parent | 9a1ea4b90728c19a0141fd9b6ab44a3c5ded5a7c (diff) | |
download | gcc-b807e627309cb88537a127946c22abf31d358c51.zip gcc-b807e627309cb88537a127946c22abf31d358c51.tar.gz gcc-b807e627309cb88537a127946c22abf31d358c51.tar.bz2 |
re PR tree-optimization/49516 (SRA generates memory references into its replacements)
2011-06-24 Martin Jambor <mjambor@suse.cz>
PR tree-optimizations/49516
* tree-sra.c (sra_modify_assign): Choose the safe path for
aggregate copies if we also did scalar replacements.
* testsuite/g++.dg/tree-ssa/pr49516.C: New test.
From-SVN: r175376
Diffstat (limited to 'gcc/tree-sra.c')
-rw-r--r-- | gcc/tree-sra.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/tree-sra.c b/gcc/tree-sra.c index df19dd1..45ebd93 100644 --- a/gcc/tree-sra.c +++ b/gcc/tree-sra.c @@ -2876,7 +2876,8 @@ sra_modify_assign (gimple *stmt, gimple_stmt_iterator *gsi) there to do the copying and then load the scalar replacements of the LHS. This is what the first branch does. */ - if (gimple_has_volatile_ops (*stmt) + if (modify_this_stmt + || gimple_has_volatile_ops (*stmt) || contains_vce_or_bfcref_p (rhs) || contains_vce_or_bfcref_p (lhs)) { |