[PATCH, middle end]: Introduce BUILT_IN_I{CEIL_FLOOR_ROUND_RINT} FP-to-int conversion functions

Uros Bizjak ubizjak@gmail.com
Thu Aug 11 21:00:00 GMT 2011


On Thu, Aug 11, 2011 at 2:50 PM, Richard Guenther <rguenther@suse.de> wrote:

>> Currently, conversion from floating point to integer on 64bit targets
>> goes through DImode temporary, due to missing BUILT_IN_ICEIL (and
>> other) builtins that can convert directly from FP to integer.

> I'm not sure about the naming - shouldn't we name those internal
> builtins after the mode, thus sifloor or even SIfloor?  Is there
> precedent for the 'i' prefix?

I have taken precedent from ilogb conversion function that converts to
"int". This function also has its non-converting counterpart, logb.
IMO, this naming also fits in a general scheme where a prefix
encodes output type. So, "l" corresponds to "long", "ll" to "long
long" and from this sequence, and taking ilogb name into account, most
logical choice would be "i" for "int".

I will prepare a new patch with a documentation and requested tests tomorrow.

Thanks,
Uros.



More information about the Gcc-patches mailing list