From dec0798ef381045769f51dc673593d2261e40f2d Mon Sep 17 00:00:00 2001 From: "J\"orn Rennecke" Date: Mon, 17 Jun 2002 11:33:20 +0000 Subject: [PATCH] reload1.c (merge_assigned_reloads): Don't change reloads other than RELOAD_FOR_INPUT_ADDRESS /... * reload1.c (merge_assigned_reloads): Don't change reloads other than RELOAD_FOR_INPUT_ADDRESS / RELOAD_FOR_INPADDR_ADDRESS to RELOAD_OTHER when there are conflicting input reloads. From-SVN: r54703 --- gcc/ChangeLog | 6 ++++++ gcc/reload1.c | 8 ++++++++ 2 files changed, 14 insertions(+) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 0fb38c6c22d..46433106da0 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +Mon Jun 17 12:32:24 2002 J"orn Rennecke + + * reload1.c (merge_assigned_reloads): Don't change reloads + other than RELOAD_FOR_INPUT_ADDRESS / RELOAD_FOR_INPADDR_ADDRESS + to RELOAD_OTHER when there are conflicting input reloads. + 2002-06-17 Richard Earnshaw (rearnsha@arm.com) * function.c (epilogue_done): Correctly build a sequence of insns for diff --git a/gcc/reload1.c b/gcc/reload1.c index 81adb8dcbf8..1cbdde152aa 100644 --- a/gcc/reload1.c +++ b/gcc/reload1.c @@ -6096,11 +6096,19 @@ merge_assigned_reloads (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. */ 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 + && (! conflicting_input + || rld[j].when_needed == RELOAD_FOR_INPUT_ADDRESS + || rld[j].when_needed == RELOAD_FOR_INPADDR_ADDRESS) && reg_overlap_mentioned_for_reload_p (rld[j].in, rld[i].in)) rld[j].when_needed -- 2.30.2