This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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
--


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]