diff options
author | dje <dje@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-03-18 20:09:04 +0000 |
---|---|---|
committer | dje <dje@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-03-18 20:09:04 +0000 |
commit | e941dfb28cebff6144129a120c921d19b8523af7 (patch) | |
tree | cd1cbc7d49c1a314f833bc45f4ecdaf346a9c0c3 /gcc/gcse.c | |
parent | 50f5ba09087b41de548ea15da1617bc730ca240d (diff) | |
download | gcc-e941dfb28cebff6144129a120c921d19b8523af7.tar.gz |
2004-03-18 Mostafa Hagog <mustafa@il.ibm.com>
* gcse.c (eliminate_partially_redundant_loads): Reject change if
dest is set between beginning and current insn.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@79636 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/gcse.c')
-rw-r--r-- | gcc/gcse.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/gcc/gcse.c b/gcc/gcse.c index ce4d201b698..d75d459f18b 100644 --- a/gcc/gcse.c +++ b/gcc/gcse.c @@ -8319,10 +8319,12 @@ eliminate_partially_redundant_loads (basic_block bb, rtx insn, pat = PATTERN (insn); dest = SET_DEST (pat); - /* Check if the loaded register is not used nor killed from the beginning - of the block. */ + /* Check that the loaded register is not used, set, or killed from the + beginning of the block. */ if (reg_used_between_after_reload_p (dest, - PREV_INSN (BB_HEAD (bb)), insn)) + PREV_INSN (BB_HEAD (bb)), insn) + || reg_set_between_after_reload_p (dest, + PREV_INSN (BB_HEAD (bb)), insn)) return; /* Check potential for replacing load with copy for predecessors. */ |