diff options
author | aldyh <aldyh@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-03-12 04:30:56 +0000 |
---|---|---|
committer | aldyh <aldyh@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-03-12 04:30:56 +0000 |
commit | 0e4ca78062914700730787b2e97b3fd6a8fe1ec6 (patch) | |
tree | d3451d0ffd262621bd6accbec6a6cec51b2c50d5 | |
parent | fa2266f502da9fdc580a7c227291e83ea9bcec99 (diff) | |
download | gcc-0e4ca78062914700730787b2e97b3fd6a8fe1ec6.tar.gz |
Call reload_cse_simplify_set before reload_cse_noop_set_p
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@40394 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/reload1.c | 13 |
2 files changed, 14 insertions, 4 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index a0b21d9a4b5..7b1751dc892 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2001-03-12 Aldy Hernandez <aldyh@redhat.com> + + * reload1.c (reload_cse_simplify): Call reload_cse_simplify_set + before reload_cse_noop_set_p. + 2001-03-11 Zack Weinberg <zackw@stanford.edu> * config.gcc: Where xm-host.h used to include another diff --git a/gcc/reload1.c b/gcc/reload1.c index 077c410d825..2f64c2d7d4a 100644 --- a/gcc/reload1.c +++ b/gcc/reload1.c @@ -8041,7 +8041,15 @@ reload_cse_simplify (insn) if (GET_CODE (body) == SET) { int count = 0; - if (reload_cse_noop_set_p (body)) + + /* Simplify even if we may think it is a no-op. + We may think a memory load of a value smaller than WORD_SIZE + is redundant because we haven't taken into account possible + implicit extension. reload_cse_simplify_set() will bring + this out, so it's safer to simplify before we delete. */ + count += reload_cse_simplify_set (body, insn); + + if (!count && reload_cse_noop_set_p (body)) { rtx value = SET_DEST (body); if (! REG_FUNCTION_VALUE_P (SET_DEST (body))) @@ -8050,9 +8058,6 @@ reload_cse_simplify (insn) return; } - /* It's not a no-op, but we can try to simplify it. */ - count += reload_cse_simplify_set (body, insn); - if (count > 0) apply_change_group (); else |