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] Expand round inline with SSE on x86_64 and i?86


On Sun, 29 Oct 2006, Richard Guenther wrote:
> 2006-08-23  Richard Guenther  <rguenther@suse.de>
>
> 	* config/i386/i386-protos.h (ix86_expand_round): Declare.
> 	(ix86_expand_rounddf_32): Likewise.
> 	* config/i386/i386.c (ix86_expand_round): New function expanding
> 	round inline for SSE math and -fno-trapping-math.
> 	(ix86_expand_rounddf_32): Same for DFmode on 32bit archs.
> 	* config/i386/i386.md (rounddf2, roundsf2): New pattern expanding
> 	round via ix86_expand_round.
>
> 	* gcc.target/i386/math-torture/round.c: New testcase.

This is OK for mainline.  Thanks.

I'm not sure how easy it would be to add some execution tests for these
recent changes.  It's complicated by the fact that we need to pass flags
to the compiler, and test for the presence of SSE at run-time, but all
of your tests so far only confirm that we don't ICE the compiler, not
that we get the correct result.  In theory, it might be nice to confirm
that floor(2.6) == 2.0, and ceil(3.4) == 4.0 [but without compile-time
rounding via real.c getting in the way].

Roger
--


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