Call reload_cse_simplify_set before reload_cse_noop_set_p

From-SVN: r40394
This commit is contained in:
Aldy Hernandez 2001-03-12 04:30:56 +00:00 committed by Aldy Hernandez
parent 190c4cb481
commit d5ae21aace
2 changed files with 14 additions and 4 deletions

View File

@ -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

View File

@ -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