This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [lno] optimizing return statements
- From: Falk Hueffner <falk dot hueffner at student dot uni-tuebingen dot de>
- To: Andrew Pinski <pinskia at physics dot uc dot edu>
- Cc: gcc-patches Patches <gcc-patches at gcc dot gnu dot org>
- Date: Fri, 12 Mar 2004 15:59:10 +0100
- Subject: Re: [lno] optimizing return statements
- References: <563FD8F2-73F5-11D8-969E-000393A6D2F2@physics.uc.edu>
Andrew Pinski <pinskia@physics.uc.edu> writes:
> This implements the following transformation so that other optimizer
> can happen:
> if (a)
> return b;
> else
> return c;
> into
> if (a)
> T = b;
> else
> T = c;
> return T;
This breaks bootstrapping on Alpha when creating __cmpti2. Test case:
% cat >! test.i && ./xgcc -B. -c -O test.i
int cmpti2 (int au)
{
if (au)
return 1;
return 0;
}
test.i: In function `cmpti2':
test.i:2: internal compiler error: in tree_redirect_edge_and_branch, at tree-cfg.c:3742
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
--
Falk