[Bug rtl-optimization/15473] Sibcall optimization for libcalls.

hjl.tools at gmail dot com gcc-bugzilla@gcc.gnu.org
Tue Sep 8 13:03:00 GMT 2015


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=15473

H.J. Lu <hjl.tools at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |hjl.tools at gmail dot com
            Version|4.0.0                       |6.0

--- Comment #5 from H.J. Lu <hjl.tools at gmail dot com> ---
Some libcalls are expanded in

static rtx
expand_builtin_unop (machine_mode target_mode, tree exp, rtx target,
                     rtx subtarget, optab op_optab)
{
  rtx op0;

  if (!validate_arglist (exp, INTEGER_TYPE, VOID_TYPE))
    return NULL_RTX;

  /* Compute the argument.  */
  op0 = expand_expr (CALL_EXPR_ARG (exp, 0),
                     (subtarget
                      && (TYPE_MODE (TREE_TYPE (CALL_EXPR_ARG (exp, 0)))
                          == GET_MODE (subtarget))) ? subtarget : NULL_RTX,
                     VOIDmode, EXPAND_NORMAL);
  /* Compute op, into TARGET if possible.
     Set TARGET to wherever the result comes back.  */
  target = expand_unop (TYPE_MODE (TREE_TYPE (CALL_EXPR_ARG (exp, 0))),
                        op_optab, op0, target, op_optab != clrsb_optab);
  gcc_assert (target);

  return convert_to_mode (target_mode, target, 0);
}

which doesn't go through expand_call.



More information about the Gcc-bugs mailing list