This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
SUBREGs of hard registers: when not to simplify
- To: gcc-patches at gcc dot gnu dot org, meissner at cygnus dot com
- Subject: SUBREGs of hard registers: when not to simplify
- From: Geoff Keating <geoffk at ozemail dot com dot au>
- Date: Wed, 27 Oct 1999 14:25:49 +1000
If you turn (subreg:SF (reg/i:SC r3) 1) into (reg:SF r4) before function
inlining has finished, integrate will have trouble when it goes to
look for the return value because you've lost the '/i'. This was causing
complex-5 to fail at -O3.
--
Geoffrey Keating <geoffk@cygnus.com>
===File ~/patches/cygnus/egcs-ppc-cret-2.patch==============
md5sum: f9ed65f0e9c8ab84 1c3e70723be6246c 377605
Index: egcs/gcc/ChangeLog
0a
Sun Oct 24 20:18:10 1999 Geoff Keating <geoffk@cygnus.com>
* config/rs6000/rs6000.md (movsf): Don't convert a SUBREG
of the function return register into a plain REG until
after function inlining is done.
.
Changed files:
egcs/gcc/ChangeLog
egcs/gcc/config/rs6000/rs6000.md
md5sum: 7a40a6f95a3322fb fd8de47ac12278a9 359681
--- /sloth/disk0/co/egcs-mainline/egcs/gcc/config/rs6000/rs6000.md Fri Oct 15 18:39:51 1999
+++ egcs/gcc/config/rs6000/rs6000.md Wed Oct 27 14:01:57 1999
@@ -6256,7 +6256,9 @@ (define_expand "movsf"
reg. So expand it. */
if (GET_CODE (operands[0]) == SUBREG
&& GET_CODE (SUBREG_REG (operands[0])) == REG
- && REGNO (SUBREG_REG (operands[0])) < FIRST_PSEUDO_REGISTER)
+ && REGNO (SUBREG_REG (operands[0])) < FIRST_PSEUDO_REGISTER
+ && (! REG_FUNCTION_VALUE_P (SUBREG_REG (operands[0]))
+ || ! rtx_equal_function_value_matters))
operands[0] = alter_subreg (operands[0]);
if (GET_CODE (operands[1]) == SUBREG
&& GET_CODE (SUBREG_REG (operands[1])) == REG
============================================================