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

--- Comment #4 from Steve Kargl <sgk at troutmask dot apl.washington.edu> ---
On Tue, Feb 21, 2023 at 09:49:38PM +0000, pinskia at gcc dot gnu.org wrote:
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108878
> 
> --- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
> So the right way of fixing this is to have a builtin versions of "frexp" which
> return a complex type and that is pure for -fno-math-errno and such. And gets
> expanded to frexp correctly.
> 

A complex type seems out-of-place as the exponent() returns
an integer and fraction() a real.  __builtin_frexp() already
returns the info.  I was hoping that he following:

  _5 = *x_4(D);
  __builtin_frexpf (_5, &D.4261);
  _1 = D.4261;
  *m_7(D) = _1;
  D.4261 ={v} {CLOBBER(eol)};
  _2 = __builtin_frexpf (_5, &D.4263);
  *f_11(D) = _2;
  D.4263 ={v} {CLOBBER(eol)};

could be transformed into

  <bb 2> [local count: 1073741824]:
  _5 = *x_4(D);
  _2 = __builtin_frexpf (_5, &D.4263);
  _1 = D.4263;
  *m_7(D) = _1;
  *f_11(D) = _2;
  D.4263 ={v} {CLOBBER(eol)};

Reply via email to