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, middle end]: Introduce BUILT_IN_I{CEIL_FLOOR_ROUND_RINT} FP-to-int conversion functions


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.

> Please document those in doc/extend.texi and make sure they do not
> leak into the global namespace as ifloor, etc., but are only available
> as __builtin_ifloor, etc.. ?Please also add at least a testcase
> that excercises expanding all of the variants - like by simply
> writing wrappers with the non-__builtin_ name variant like

Attached patch adds testcases for all conversion builtins. The gcc.dg
one tests that we are always able to link executable correctly, no
matter if target implements convresion optabs or not, the
gcc.target/i386 test exercises x86 specific code generation paths and
check if these builtins leak anything with -ffast-math.

2011-08-12  Uros Bizjak  <ubizjak@gmail.com>

	* gcc.dg/builtins-67.c: New test.
	* gcc.target/i386/conversion.c: Ditto.

Tested on x86_64-pc-linux-gnu {,-m32}. OK for mainline?

Uros.

Attachment: t.diff.txt
Description: Text document


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