diff options
author | ebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-10-25 22:26:20 +0000 |
---|---|---|
committer | ebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-10-25 22:26:20 +0000 |
commit | 6211b3f43815c1f75455795b0c5af9a197b67bbc (patch) | |
tree | faff5a0d8130e0d5a404907f400799a1246e1203 /gcc/reload.c | |
parent | 7ea9280f09af7437f958dcb4bd153ea027253460 (diff) | |
download | gcc-6211b3f43815c1f75455795b0c5af9a197b67bbc.tar.gz |
PR rtl-optimization/46603
* reload.c (push_reload): In the out case, reload the subreg as well
as the reg if it has word mode.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@180457 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/reload.c')
-rw-r--r-- | gcc/reload.c | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/gcc/reload.c b/gcc/reload.c index 3ddc13e48fc..5928660746a 100644 --- a/gcc/reload.c +++ b/gcc/reload.c @@ -1117,10 +1117,10 @@ push_reload (rtx in, rtx out, rtx *inloc, rtx *outloc, /* Similarly for paradoxical and problematical SUBREGs on the output. Note that there is no reason we need worry about the previous value - of SUBREG_REG (out); even if wider than out, - storing in a subreg is entitled to clobber it all - (except in the case of STRICT_LOW_PART, - and in that case the constraint should label it input-output.) */ + of SUBREG_REG (out); even if wider than out, storing in a subreg is + entitled to clobber it all (except in the case of a word mode subreg + or of a STRICT_LOW_PART, in that latter case the constraint should + label it input-output.) */ if (out != 0 && GET_CODE (out) == SUBREG && (subreg_lowpart_p (out) || strict_low) #ifdef CANNOT_CHANGE_MODE_CLASS @@ -1142,16 +1142,6 @@ push_reload (rtx in, rtx out, rtx *inloc, rtx *outloc, / UNITS_PER_WORD))) #endif )) - || (REG_P (SUBREG_REG (out)) - && REGNO (SUBREG_REG (out)) < FIRST_PSEUDO_REGISTER - && ((GET_MODE_SIZE (outmode) <= UNITS_PER_WORD - && (GET_MODE_SIZE (GET_MODE (SUBREG_REG (out))) - > UNITS_PER_WORD) - && ((GET_MODE_SIZE (GET_MODE (SUBREG_REG (out))) - / UNITS_PER_WORD) - != (int) hard_regno_nregs[REGNO (SUBREG_REG (out))] - [GET_MODE (SUBREG_REG (out))])) - || ! HARD_REGNO_MODE_OK (subreg_regno (out), outmode))) || (secondary_reload_class (0, rclass, outmode, out) != NO_REGS && (secondary_reload_class (0, rclass, GET_MODE (SUBREG_REG (out)), SUBREG_REG (out)) |