diff options
author | Aldy Hernandez <aldyh@redhat.com> | 2001-03-12 04:30:56 +0000 |
---|---|---|
committer | Aldy Hernandez <aldyh@gcc.gnu.org> | 2001-03-12 04:30:56 +0000 |
commit | d5ae21aace3605eacb04951287177aa13bc12daf (patch) | |
tree | d3451d0ffd262621bd6accbec6a6cec51b2c50d5 /gcc/reload1.c | |
parent | 190c4cb48154ed57952a0ad043d39ee868cc3769 (diff) | |
download | gcc-d5ae21aace3605eacb04951287177aa13bc12daf.zip gcc-d5ae21aace3605eacb04951287177aa13bc12daf.tar.gz gcc-d5ae21aace3605eacb04951287177aa13bc12daf.tar.bz2 |
Call reload_cse_simplify_set before reload_cse_noop_set_p
From-SVN: r40394
Diffstat (limited to 'gcc/reload1.c')
-rw-r--r-- | gcc/reload1.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/gcc/reload1.c b/gcc/reload1.c index 077c410..2f64c2d 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 |