http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32684

Richard Guenther <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
         AssignedTo|unassigned at gcc dot       |rguenth at gcc dot gnu.org
                   |gnu.org                     |

--- Comment #10 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-01-14 
13:51:31 UTC ---
Looking here again I can't see what tailcall you would expect.  Mainline
generates

complex double
quantum_cexp (double phi)
{
  complex double sincostmp.1;
  double D.2685;
  double D.2684;
  complex double D.2683;

<bb 2>:
  sincostmp.1_5 = __builtin_cexpi (phi_1(D));
  D.2684_2 = REALPART_EXPR <sincostmp.1_5>;
  D.2685_3 = IMAGPART_EXPR <sincostmp.1_5>;
  D.2683_4 = COMPLEX_EXPR <D.2684_2, D.2685_3>;
  return D.2683_4;

which we indeed do not optimize to just

  return __builtin_cexp1 (phi_1(D));

but in the end sincos doesn't have an ABI that allows for tailcalling
or sibcalling to it.

There is a missing folding of COMPLEX_EXPR <REALPART_EXPR <x>, IMAGPART_EXPR
<x>> to x and SCCVN does not go the full way of combining binary expressions.

Reply via email to