This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: expand_builtin_mathfn_2 and re-expanding arguments
- From: Roger Sayle <roger at eyesopen dot com>
- To: Jan Hubicka <jh at suse dot cz>
- Cc: rth at redhat dot com, <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 24 Jun 2003 13:35:57 -0600 (MDT)
- Subject: Re: expand_builtin_mathfn_2 and re-expanding arguments
Hi Jan,
I'm happy to prepare/submit a patch to both expand_builtin_mathfn and
expand_builtin_mathfn2 where we always protect the arguments with
save_expr, and instead of returning NULL_RTX if the call to expand_binop
fails, we can call expand_call directly ourselves with the stabilized
argument list.
I've already been caught out by the current strange behaviour. RTH
corrected me recently when I tried to removing the effects of calling
expand_expr. SAVE_EXPRs in these arguments mean that the correct fix
is to never return NULL_RTX from expand_builtin_mathfn*.
Sorry for the inconvenience. It looks like this bug has been in GCC's
builtin math function expansion for some time, but has only recently
tripped up eon due to my introducing support for pow as an intrinsic.
Hopefully, I'll have a patch by the end of the day.
Roger
--