Re: [RFC] Implementing detection of saturation and rounding arithmetic

2021-05-11 Thread Joseph Myers
On Tue, 11 May 2021, David Brown wrote: > It is also worth noting that gcc already has support for saturating > types on some targets: > > > > My testing of these (quite a long time ago) left me with a feeling that > it was not a feature anyo

Re: [RFC] Implementing detection of saturation and rounding arithmetic

2021-05-11 Thread Segher Boessenkool
Hi! On Tue, May 11, 2021 at 05:37:34AM +, Tamar Christina via Gcc wrote: > 2. Saturating abs: >char sat (char a) >{ > int tmp = abs (a); > return tmp > 127 ? 127 : ((tmp < -128) ? -128 : tmp); >} That can be done quite a bit better, branchless at least. Same for all e

Re: gcc 11.1.0 mpfr

2021-05-11 Thread Serge Belyshev via Gcc
> $ egrep "mpfr\.h" log/cfg/cfg.gcc-11.1.0.log > checking for the correct version of mpfr.h... buggy but acceptable > > It appears "gcc-11.1.0/contrib/download_prerequisites" > specifies "mpfr-3.1.4.tar.bz2" whereas top level 'configure' > has "MPFR_VERSION_NUM(3,1,6)". > > Is there a reason

Re: Speed of compiling gimple-match.c

2021-05-11 Thread Segher Boessenkool
On Tue, May 04, 2021 at 10:40:38AM +0200, Richard Biener via Gcc wrote: > On Mon, May 3, 2021 at 11:10 PM Andrew Pinski via Gcc wrote: > > I noticed my (highly, -j24) parallel build of GCC is serialized on > > compiling gimple-match.c. Has anyone looked into splitting this > > generated file in

gcc 11.1.0 mpfr

2021-05-11 Thread Guy Harrison
Hi, (was advised to post here rather than gcc-help@) $ egrep "mpfr\.h" log/cfg/cfg.gcc-11.1.0.log checking for the correct version of mpfr.h... buggy but acceptable It appears "gcc-11.1.0/contrib/download_prerequisites" specifies "mpfr-3.1.4.tar.bz2" whereas top level 'configure' has "MPFR

Re: [RFC] Implementing detection of saturation and rounding arithmetic

2021-05-11 Thread Richard Biener
On Tue, 11 May 2021, Tamar Christina wrote: > Hi All, > > We are looking to implement saturation support in the compiler. The aim is to > recognize both Scalar and Vector variant of typical saturating expressions. > > As an example: > > 1. Saturating addition: >char sat (char a, char b) >

Re: [RFC] Implementing detection of saturation and rounding arithmetic

2021-05-11 Thread David Brown
On 11/05/2021 07:37, Tamar Christina via Gcc wrote: > Hi All, > > We are looking to implement saturation support in the compiler. The aim is to > recognize both Scalar and Vector variant of typical saturating expressions. > > As an example: > > 1. Saturating addition: >char sat (char a, cha