diff options
author | rearnsha <rearnsha@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-09-21 17:08:16 +0000 |
---|---|---|
committer | rearnsha <rearnsha@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-09-21 17:08:16 +0000 |
commit | e211881db90fc5826298d56103f397d868ca14a4 (patch) | |
tree | 891cf134c164afc9be9b97068a7f86309bac2b16 /gcc/cse.c | |
parent | 058a3669f736c75049dac76f650a29b9fff236bb (diff) | |
download | gcc-e211881db90fc5826298d56103f397d868ca14a4.tar.gz |
* cse.c (fold_rtx): Calculate the old cost before we fold each
operand.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@57394 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cse.c')
-rw-r--r-- | gcc/cse.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/cse.c b/gcc/cse.c index 3571cc7c730..e1b2ea1fbfe 100644 --- a/gcc/cse.c +++ b/gcc/cse.c @@ -3732,6 +3732,7 @@ fold_rtx (x, insn) rtx cheap_arg, expensive_arg; rtx replacements[2]; int j; + int old_cost = COST_IN (XEXP (x, i), code); /* Most arguments are cheap, so handle them specially. */ switch (GET_CODE (arg)) @@ -3822,7 +3823,6 @@ fold_rtx (x, insn) for (j = 0; j < 2 && replacements[j]; j++) { - int old_cost = COST_IN (XEXP (x, i), code); int new_cost = COST_IN (replacements[j], code); /* Stop if what existed before was cheaper. Prefer constants |