diff options
author | Daniel Jacobowitz <dan@codesourcery.com> | 2005-09-30 18:09:56 +0000 |
---|---|---|
committer | Daniel Jacobowitz <drow@gcc.gnu.org> | 2005-09-30 18:09:56 +0000 |
commit | 3f27846b1cd3f04086f6666bc271cd0345817329 (patch) | |
tree | c800022dbcbe625bd5923ca8f78b11ed3a2aa448 /gcc/reload1.c | |
parent | f46876f99ca558a311cf215f9eec26a4db4097e0 (diff) | |
download | gcc-3f27846b1cd3f04086f6666bc271cd0345817329.zip gcc-3f27846b1cd3f04086f6666bc271cd0345817329.tar.gz gcc-3f27846b1cd3f04086f6666bc271cd0345817329.tar.bz2 |
reload1.c (merge_assigned_reloads): Do not change any RELOAD_FOR_OUTPUT_ADDRESS reloads.
* reload1.c (merge_assigned_reloads): Do not change any
RELOAD_FOR_OUTPUT_ADDRESS reloads.
From-SVN: r104827
Diffstat (limited to 'gcc/reload1.c')
-rw-r--r-- | gcc/reload1.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/gcc/reload1.c b/gcc/reload1.c index 33840b5..d8eeb2a 100644 --- a/gcc/reload1.c +++ b/gcc/reload1.c @@ -6083,6 +6083,8 @@ merge_assigned_reloads (rtx insn) if (j == n_reloads && max_input_address_opnum <= min_conflicting_input_opnum) { + gcc_assert (rld[i].when_needed != RELOAD_FOR_OUTPUT); + for (j = 0; j < n_reloads; j++) if (i != j && rld[j].reg_rtx != 0 && rtx_equal_p (rld[i].reg_rtx, rld[j].reg_rtx) @@ -6101,16 +6103,17 @@ merge_assigned_reloads (rtx insn) if they were for inputs, RELOAD_OTHER for outputs. Note that this test is equivalent to looking for reloads for this operand number. */ - /* We must take special care when there are two or more reloads to - be merged and a RELOAD_FOR_OUTPUT_ADDRESS reload that loads the - same value or a part of it; we must not change its type if there - is a conflicting input. */ + /* We must take special care with RELOAD_FOR_OUTPUT_ADDRESS; it may + share registers with a RELOAD_FOR_INPUT, so we can not change it + to RELOAD_FOR_OTHER_ADDRESS. We should never need to, since we + do not modify RELOAD_FOR_OUTPUT. */ if (rld[i].when_needed == RELOAD_OTHER) for (j = 0; j < n_reloads; j++) if (rld[j].in != 0 && rld[j].when_needed != RELOAD_OTHER && rld[j].when_needed != RELOAD_FOR_OTHER_ADDRESS + && rld[j].when_needed != RELOAD_FOR_OUTPUT_ADDRESS && (! conflicting_input || rld[j].when_needed == RELOAD_FOR_INPUT_ADDRESS || rld[j].when_needed == RELOAD_FOR_INPADDR_ADDRESS) |