aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorAldy Hernandez <aldyh@redhat.com>2001-03-12 04:30:56 +0000
committerAldy Hernandez <aldyh@gcc.gnu.org>2001-03-12 04:30:56 +0000
commitd5ae21aace3605eacb04951287177aa13bc12daf (patch)
treed3451d0ffd262621bd6accbec6a6cec51b2c50d5 /gcc
parent190c4cb48154ed57952a0ad043d39ee868cc3769 (diff)
downloadgcc-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')
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/reload1.c13
2 files changed, 14 insertions, 4 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index a0b21d9..7b1751d 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 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