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: [PATCH, midlevel]: Convert (int)floor -> lfloor


> Attached patch implements midlevel part of (int)floor -> floor /and 
> similar/ conversions. Patch was bootstrapped on i686-pc-linux-gnu, 
> regtested for c and c++. A testcase is also included to check generation 
> of new itransformations.

Nothing against the patch but I would like to see the optimization in
convert.c be moved to fold-const.c instead as fold is used more and more
by the tree optimizators.  Also it will help to cause cases like the following
to be optimizated:

int f(double e)
{
  double e1 = floor(e);
  return e1;
}

Thanks,
Andrew Pinski


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