This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
expand_builtin_mathfn_2 and re-expanding arguments
- From: Jan Hubicka <jh at suse dot cz>
- To: rth at redhat dot com, gcc at gcc dot gnu dot org, roger at eyesopen dot com
- Date: Tue, 24 Jun 2003 20:52:03 +0200
- Subject: expand_builtin_mathfn_2 and re-expanding arguments
Hi,
Roger's patch to make pow builtins causes eon from spec2000 to be
misscopmiled. The reason is that expand_builtin_mathfn_2 fails, but it
expands the operand:
op0 = expand_expr (arg0, subtarget, VOIDmode, 0);
op1 = expand_expr (arg1, 0, VOIDmode, 0);
emit_queue ();
start_sequence ();
/* Compute into TARGET.
Set TARGET to wherever the result comes back. */
target = expand_binop (mode, builtin_optab, op0, op1,
target, 0, OPTAB_DIRECT);
/* If we were unable to expand via the builtin, stop the
sequence (without outputting the insns) and return 0, causing
a call to the library function. */
if (target == 0)
{
end_sequence ();
return 0;
It falls back to:
return expand_call (exp, target, ignore);
that expands them again. In the eon case the argument is inline
function and reexapnding it creates infinite loop. What would be best
way to fix this?
Honza