symbol_refs vs. eq_attr in define_insn_reservations

2012-02-13 Thread Quentin Neill
Hi, For readability (and correctness) I'm interested in rewriting a bunch of: (define_insn_reservation "insn1" 0 (eq_attr "attr1" "val1,val2")) into something like: (define attr "consattr1" "val1,val2" (const (cond [ (eq_attr "attr1" "val1") (const_string "cvaly") (eq_attr "

Re: odd license grant in gcc(1) manpage

2012-02-13 Thread Joseph S. Myers
On Mon, 13 Feb 2012, Samuel Bronson wrote: > ... Notice how the one in invoke.texi has an additional invariant > section? What's up with this? It looks like Ralf's 2008-07-30 commit (r138293) omitted to change invoke.texi. -- Joseph S. Myers jos...@codesourcery.com

Re: weird optimization in sin+cos, x86 backend

2012-02-13 Thread Geert Bosch
> On 2012-02-09 12:36:01 -0500, Geert Bosch wrote: >> I think it would make sense to have a check list of properties, and >> use configure-based tests to categorize implementations. These tests >> would be added as we go along. >> >> Criteria: >> >> [ ] Conforms to C99 for exceptional values >

odd license grant in gcc(1) manpage

2012-02-13 Thread Samuel Bronson
Okay, I'm really puzzled by this. The source for gcc.1, gcc/doc/invoke.texi, begins thus: > @c Copyright (C) 1988, 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, > @c 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 > @c Free Software Foundation, Inc. > @c This is part

Re: weird optimization in sin+cos, x86 backend

2012-02-13 Thread Joseph S. Myers
On Mon, 13 Feb 2012, Jakub Jelinek wrote: > Furthermore, crlibm_init changes the i?86/x86_64 rounding mode globally, > that is not appropriate for a general purpose math library, there you either > need to cope with extended precision, or rely on SSE/SSE2 for float/double, > or change the rounding

Re: weird optimization in sin+cos, x86 backend

2012-02-13 Thread Vincent Lefevre
On 2012-02-10 17:41:49 +, Andrew Haley wrote: > On 02/10/2012 05:31 PM, Paweł Sikora wrote: > > it would be also nice to see functions for reducing argument range in > > public api. > > finally the end-user can use e.g. sin(reduce(x)) to get the best precision > > with some declared cpu overhe

Re: weird optimization in sin+cos, x86 backend

2012-02-13 Thread Vincent Lefevre
On 2012-02-09 15:49:37 +, Andrew Haley wrote: > I'd start with INRIA's crlibm. I point I'd like to correct. GNU MPFR has mainly (> 95%) been developed by researchers and engineers paid by INRIA. But this is not the case of CRlibm. I don't know its copyright status (apparently, mainly ENS Lyon,

Re: weird optimization in sin+cos, x86 backend

2012-02-13 Thread Richard Guenther
On Mon, Feb 13, 2012 at 3:32 PM, Jakub Jelinek wrote: > On Mon, Feb 13, 2012 at 02:48:05PM +0100, Richard Guenther wrote: >> > I think there is some consensus that crlibm is a great place to start >> > for correctly-rounded elementary functions.  I think we'd need, or at >> > least greatly appreci

Re: weird optimization in sin+cos, x86 backend

2012-02-13 Thread Jakub Jelinek
On Mon, Feb 13, 2012 at 02:48:05PM +0100, Richard Guenther wrote: > > I think there is some consensus that crlibm is a great place to start > > for correctly-rounded elementary functions.  I think we'd need, or at > > least greatly appreciate, some help from your team. > > I agree. If crlibm can

Re: weird optimization in sin+cos, x86 backend

2012-02-13 Thread Joseph S. Myers
On Mon, 13 Feb 2012, Vincent Lefevre wrote: > Also note that CRlibm supports the 4 rounding modes, while the > IBM Accurate Mathematical Library currently used in glibc behaves > erratically (e.g. can even crash) on directed rounding modes. FWIW the proposed ISO C bindings to IEEE 754-2008 (still

Re: weird optimization in sin+cos, x86 backend

2012-02-13 Thread Vincent Lefevre
On 2012-02-09 12:36:01 -0500, Geert Bosch wrote: > I think it would make sense to have a check list of properties, and > use configure-based tests to categorize implementations. These tests > would be added as we go along. > > Criteria: > > [ ] Conforms to C99 for exceptional values > (acc

Re: weird optimization in sin+cos, x86 backend

2012-02-13 Thread Vincent Lefevre
On 2012-02-09 17:18:25 +, Joseph S. Myers wrote: > The crlibm approach, involving exhaustive searches for worst cases for > directed rounding, could as I understand it work for functions of one > float, double or 80-bit long double argument, but I think the exhaustive > searches are still in

Re: weird optimization in sin+cos, x86 backend

2012-02-13 Thread Richard Guenther
On Mon, Feb 13, 2012 at 2:32 PM, Andrew Haley wrote: > On 02/13/2012 01:11 PM, Vincent Lefevre wrote: >> On 2012-02-09 16:01:48 +, Andrew Haley wrote: >>> On 02/09/2012 03:59 PM, Richard Guenther wrote: > Maybe.  Nothing would prevent us from composing from multiple sources of course

Re: weird optimization in sin+cos, x86 backend

2012-02-13 Thread Andrew Haley
On 02/13/2012 01:11 PM, Vincent Lefevre wrote: > On 2012-02-09 16:01:48 +, Andrew Haley wrote: >> On 02/09/2012 03:59 PM, Richard Guenther wrote: >>> Maybe. Nothing would prevent us from composing from multiple sources >>> of course. crlibm also only provides double precision routines. >> >>

Re: weird optimization in sin+cos, x86 backend

2012-02-13 Thread Vincent Lefevre
On 2012-02-09 16:01:48 +, Andrew Haley wrote: > On 02/09/2012 03:59 PM, Richard Guenther wrote: > > On Thu, Feb 9, 2012 at 4:57 PM, Andrew Haley wrote: > >> On 02/09/2012 03:56 PM, Michael Matz wrote: > >>> Hi, > >>> > >>> On Thu, 9 Feb 2012, Andrew Haley wrote: > >>> > On 02/09/2012 03:2

Re: weird optimization in sin+cos, x86 backend

2012-02-13 Thread Richard Guenther
On Fri, Feb 10, 2012 at 5:25 PM, Geert Bosch wrote: > > On Feb 10, 2012, at 05:07, Richard Guenther wrote: > >> On Thu, Feb 9, 2012 at 8:16 PM, Geert Bosch wrote: >>> I don't agree having such a libm is the ultimate goal. It could be >>> a first step along the way, addressing correctness issues.

Re: Combine misses commutativity

2012-02-13 Thread Paulo J. Matos
On Fri, 10 Feb 2012 11:00:43 -0800, Richard Henderson wrote: > On 02/10/2012 08:57 AM, Paulo J. Matos wrote: >> However, there's a failure to combine looking like: (parallel [ >> (set (reg:QI 1 AL) >> (ior:QI (mem/c/i:QI (reg/f:QI 4 AP) [2 y+0 S1 A16]) >> (reg:Q