summaryrefslogtreecommitdiff
path: root/gcc/dse.c
diff options
context:
space:
mode:
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2011-03-17 12:35:04 +0000
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2011-03-17 12:35:04 +0000
commitc75be2fe9633253367cbc9d1ae26776b5b7e175a (patch)
treef38d80304975154c0fc076b80fccc2023ac48021 /gcc/dse.c
parent7c51b530f32f5b5cfa1a10a6f6c30dc1c6df6240 (diff)
downloadgcc-c75be2fe9633253367cbc9d1ae26776b5b7e175a.tar.gz
PR rtl-optimization/48141
* dse.c (record_store): If no positions are needed in an insn that cannot be deleted, at least unchain it from active_local_stores. * gcc.dg/pr48141.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@171089 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/dse.c')
-rw-r--r--gcc/dse.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/gcc/dse.c b/gcc/dse.c
index 8e9b6454e39..e43ab72d742 100644
--- a/gcc/dse.c
+++ b/gcc/dse.c
@@ -1,5 +1,5 @@
/* RTL dead store elimination.
- Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010
+ Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011
Free Software Foundation, Inc.
Contributed by Richard Sandiford <rsandifor@codesourcery.com>
@@ -1530,8 +1530,7 @@ record_store (rtx body, bb_info_t bb_info)
/* An insn can be deleted if every position of every one of
its s_infos is zero. */
- if (any_positions_needed_p (s_info)
- || ptr->cannot_delete)
+ if (any_positions_needed_p (s_info))
del = false;
if (del)
@@ -1543,7 +1542,8 @@ record_store (rtx body, bb_info_t bb_info)
else
active_local_stores = ptr->next_local_store;
- delete_dead_store_insn (insn_to_delete);
+ if (!insn_to_delete->cannot_delete)
+ delete_dead_store_insn (insn_to_delete);
}
else
last = ptr;