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 floor and ceil 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_floorceil): Declare.
> 	(ix86_expand_floorceildf_32): Likewise.
> 	* config/i386/i386.c (ix86_expand_sse_compare_mask): New
> 	static helper function.
> 	(ix86_expand_floorceil): Expander for floor and ceil to SSE
> 	math.
> 	(ix86_expand_floorceildf_32): Same for DFmode on 32bit archs.
> 	* config/i386/i386.md (floordf2): Adjust to enable floor
> 	expansion via ix86_expand_floorceil if TARGET_SSE_MATH and
> 	-fno-trapping-math is enabled.
> 	(floorsf2, ceildf2, ceilsf2): Likewise.
> 	* config/i386/sse.md (sse_maskcmpsf3): New insn.
> 	(sse2_maskcmpdf3): Likewise.
>
> 	* gcc.target/i386/math-torture/ceil.c: New testcase.
> 	* gcc.target/i386/math-torture/floor.c: Likewise.

This is OK for mainline.  Thanks.



> This expansion we might disable for -Os though?

Hmm.  I'll admit that I've not been thinking about -Os whilst reviewing
this patch series.  Any chance I could ask you to look over your recent
x86 SSE rounding changes, and add the appropriate "&& !optimize_size"
wherever the expansion would be larger than the original subroutine
call?  Sorry for missing this.

Roger
--


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