diff options
author | Jim Wilson <wilson@gcc.gnu.org> | 1993-09-28 15:22:08 -0700 |
---|---|---|
committer | Jim Wilson <wilson@gcc.gnu.org> | 1993-09-28 15:22:08 -0700 |
commit | 0ec1e3690e3680993939bd15e3fa89706fe94c5c (patch) | |
tree | de9c1c5d026e0d969c9aaa0341a824738f8f3ef6 /gcc/reload.c | |
parent | bc3d85218305e221081987476adb0411213a8a5b (diff) | |
download | gcc-0ec1e3690e3680993939bd15e3fa89706fe94c5c.zip gcc-0ec1e3690e3680993939bd15e3fa89706fe94c5c.tar.gz gcc-0ec1e3690e3680993939bd15e3fa89706fe94c5c.tar.bz2 |
(form_sum): Change the way that form_sum canonicalizes addresses...
(form_sum): Change the way that form_sum canonicalizes
addresses, so that it never creates (PLUS (PLUS MEM CONST_INT) REG)
but instead canonicallizes this to (PLUS (PLUS REG CONST_INT) MEM).
From-SVN: r5506
Diffstat (limited to 'gcc/reload.c')
-rw-r--r-- | gcc/reload.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/gcc/reload.c b/gcc/reload.c index a4558d6..609414c 100644 --- a/gcc/reload.c +++ b/gcc/reload.c @@ -4324,7 +4324,10 @@ form_sum (x, y) /* Note that if the operands of Y are specified in the opposite order in the recursive calls below, infinite recursion will occur. */ - if (GET_CODE (y) == PLUS && CONSTANT_P (XEXP (y, 1))) + if (GET_CODE (y) == PLUS && CONSTANT_P (XEXP (y, 1)) + /* Moving the constant in with the MEM yields rtl that reload may not + be able to handle when this is an address calculation. */ + && GET_CODE (x) != MEM) return form_sum (form_sum (x, XEXP (y, 0)), XEXP (y, 1)); /* If both constant, encapsulate sum. Otherwise, just form sum. A |