diff options
author | Richard Henderson <rth@redhat.com> | 2003-06-04 14:05:20 -0700 |
---|---|---|
committer | Richard Henderson <rth@gcc.gnu.org> | 2003-06-04 14:05:20 -0700 |
commit | 7b9c108f639ad6d2488912704c893c8b4040e26c (patch) | |
tree | 84df6ba11a343ea0ae8143ec285636dabd10ff24 | |
parent | c48ec59087baf66f52f672a7ba8ed99e7b08bf0f (diff) | |
download | gcc-7b9c108f639ad6d2488912704c893c8b4040e26c.zip gcc-7b9c108f639ad6d2488912704c893c8b4040e26c.tar.gz gcc-7b9c108f639ad6d2488912704c893c8b4040e26c.tar.bz2 |
cse.c (find_best_addr): Consider binary operators even if second argument is not CONST_INT.
* cse.c (find_best_addr): Consider binary operators even if second
argument is not CONST_INT.
From-SVN: r67463
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/cse.c | 7 |
2 files changed, 8 insertions, 4 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 7e21d4d..0ff9fe8 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2003-06-04 Richard Henderson <rth@redhat.com> + + * cse.c (find_best_addr): Consider binary operators even if second + argument is not CONST_INT. + 2003-06-04 Zdenek Dvorak <rakdver@atrey.karlin.mff.cuni.cz> * doc/invoke.texi (max-cse-path-length): Document. @@ -3009,10 +3009,9 @@ find_best_addr (insn, loc, mode) if (flag_expensive_optimizations && (GET_RTX_CLASS (GET_CODE (*loc)) == '2' || GET_RTX_CLASS (GET_CODE (*loc)) == 'c') - && GET_CODE (XEXP (*loc, 0)) == REG - && GET_CODE (XEXP (*loc, 1)) == CONST_INT) + && GET_CODE (XEXP (*loc, 0)) == REG) { - rtx c = XEXP (*loc, 1); + rtx op1 = XEXP (*loc, 1); do_not_record = 0; hash = HASH (XEXP (*loc, 0), Pmode); @@ -3054,7 +3053,7 @@ find_best_addr (insn, loc, mode) || exp_equiv_p (p->exp, p->exp, 1, 0))) { rtx new = simplify_gen_binary (GET_CODE (*loc), Pmode, - p->exp, c); + p->exp, op1); int new_cost; new_cost = address_cost (new, mode); |