This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH] Expand floor and ceil inline with SSE on x86_64 and i?86
- From: Roger Sayle <roger at eyesopen dot com>
- To: Richard Guenther <rguenther at suse dot de>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Sun, 29 Oct 2006 07:38:49 -0700 (MST)
- Subject: 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 <email@example.com>
> * 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
> (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.