This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: GCC build failed for 2 targets with your patch on 2001-05-17T15:11:55Z.
- To: gcc-regression at gcc dot gnu dot org, gcc-patches at gcc dot gnu dot org
- Subject: Re: GCC build failed for 2 targets with your patch on 2001-05-17T15:11:55Z.
- From: Jan Hubicka <jh at suse dot cz>
- Date: Thu, 17 May 2001 19:39:53 +0200
Hi,
the sanity checking code found another problem on PPC.
if (SUBREG:QI (reg:SI) 3)
gets subregged back to SImode, we result in (SUBREG:SI (reg:SI) 3), that
is incorrect.
Following code prevents that.
If testing finishes sucessfully, I will install it as obvious. I hope
this one to finally fix the bootstrap problem for PPC.
Thu May 17 19:34:18 CEST 2001 Jan Hubicka <jh@suse.cz>
* simplify-rtx.c (simplify_subreg): Avoid creating of incorrect subregs.
Index: simplify-rtx.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/simplify-rtx.c,v
retrieving revision 1.50
diff -c -3 -p -r1.50 simplify-rtx.c
*** simplify-rtx.c 2001/05/17 16:18:26 1.50
--- simplify-rtx.c 2001/05/17 17:34:08
*************** simplify_subreg (outermode, op, innermod
*** 2331,2336 ****
--- 2331,2340 ----
% UNITS_PER_WORD));
}
+ /* Bail out in case resulting subreg would be incorrect. */
+ if (final_offset % GET_MODE_SIZE (outermode)
+ || final_offset >= GET_MODE_SIZE (innermostmode))
+ return NULL;
/* Recurse for futher possible simplifications. */
new = simplify_subreg (outermode, SUBREG_REG (op),
GET_MODE (SUBREG_REG (op)),