summaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-dse.c
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2017-04-12 13:47:26 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2017-04-12 13:47:26 +0000
commit940c9a7c2cf3bbbf43b0602c9283bf7579cf05ec (patch)
tree3e96366740f1544c7be9d1ba28787488e0e7ef08 /gcc/tree-ssa-dse.c
parent7f7e9dae36c8dd57ab89dae47a87903bbfefb530 (diff)
re PR tree-optimization/80359 (DSE causes error: invalid reference prefix)
2017-04-12 Richard Biener <rguenther@suse.de> Jeff Law <law@redhat.com> PR tree-optimization/80359 * tree-ssa-dse.c (maybe_trim_partially_dead_store): Do not trim stores to TARGET_MEM_REFs. * gcc.dg/torture/pr80359.c: New testcase. Co-Authored-By: Jeff Law <law@redhat.com> From-SVN: r246875
Diffstat (limited to 'gcc/tree-ssa-dse.c')
-rw-r--r--gcc/tree-ssa-dse.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/tree-ssa-dse.c b/gcc/tree-ssa-dse.c
index 53feaf3f4f7..90230abe822 100644
--- a/gcc/tree-ssa-dse.c
+++ b/gcc/tree-ssa-dse.c
@@ -451,7 +451,8 @@ maybe_trim_memstar_call (ao_ref *ref, sbitmap live, gimple *stmt)
static void
maybe_trim_partially_dead_store (ao_ref *ref, sbitmap live, gimple *stmt)
{
- if (is_gimple_assign (stmt))
+ if (is_gimple_assign (stmt)
+ && TREE_CODE (gimple_assign_lhs (stmt)) != TARGET_MEM_REF)
{
switch (gimple_assign_rhs_code (stmt))
{