fold strchr (e, 0) to e + strlen (e)

2014-02-15 Thread Prathamesh Kulkarni
This patch folds strchr (e, 0) to e + strlen (e), if e has no side-effects. Bootstrapped, regtested on x86_64-unknown-linux-gnu Ok for trunk ? [gcc] * gcc/builtins.c (fold_builtin_strchr): returns tree for s1 + strlen (s1) if TREE_SIDE_EFFECTS (s1) is false and integer_zerop (s2) is true. [gcc/t

Re: fold strchr (e, 0) to e + strlen (e)

2014-02-15 Thread Jakub Jelinek
On Sat, Feb 15, 2014 at 02:23:24PM +0530, Prathamesh Kulkarni wrote: > This patch folds strchr (e, 0) to e + strlen (e), if e has no side-effects. > Bootstrapped, regtested on x86_64-unknown-linux-gnu > Ok for trunk ? Why do you think it is a good idea? It is often very much the opposite.

Re: fold strchr (e, 0) to e + strlen (e)

2014-02-15 Thread Prathamesh Kulkarni
On Sat, Feb 15, 2014 at 2:28 PM, Jakub Jelinek wrote: > On Sat, Feb 15, 2014 at 02:23:24PM +0530, Prathamesh Kulkarni wrote: >> This patch folds strchr (e, 0) to e + strlen (e), if e has no side-effects. >> Bootstrapped, regtested on x86_64-unknown-linux-gnu >> Ok for trunk ? > > Why do you think

Re: fold strchr (e, 0) to e + strlen (e)

2014-02-15 Thread Richard Biener
On Sat, Feb 15, 2014 at 10:45 AM, Prathamesh Kulkarni wrote: > On Sat, Feb 15, 2014 at 2:28 PM, Jakub Jelinek wrote: >> On Sat, Feb 15, 2014 at 02:23:24PM +0530, Prathamesh Kulkarni wrote: >>> This patch folds strchr (e, 0) to e + strlen (e), if e has no side-effects. >>> Bootstrapped, regtested

RE: [PATCH] Fix Cilk+ ICEs in the alias oracle

2014-02-15 Thread Richard Biener
On Fri, 14 Feb 2014, Iyer, Balaji V wrote: > > > > -Original Message- > > From: Jeff Law [mailto:l...@redhat.com] > > Sent: Friday, February 14, 2014 12:34 PM > > To: Richard Biener; gcc-patches@gcc.gnu.org > > Cc: Iyer, Balaji V > > Subject: Re: [PATCH] Fix Cilk+ ICEs in the alias oracl

Re: [Patch, fortran] PR 59599 ICE on intrinsic ichar

2014-02-15 Thread Richard Biener
On Fri, 14 Feb 2014, Mikael Morin wrote: > Hello, > > this bug is not a regression, but the patch shouldn't wreck the compiler > too much on the other hand. > The problem is a wrong number of arguments while generating code for the > ichar intrinsic. The correct number is 2 without the kind argu

Re: fold strchr (e, 0) to e + strlen (e)

2014-02-15 Thread Ondřej Bílka
On Sat, Feb 15, 2014 at 10:50:02AM +0100, Richard Biener wrote: > On Sat, Feb 15, 2014 at 10:45 AM, Prathamesh Kulkarni > wrote: > > On Sat, Feb 15, 2014 at 2:28 PM, Jakub Jelinek wrote: > >> On Sat, Feb 15, 2014 at 02:23:24PM +0530, Prathamesh Kulkarni wrote: > >>> This patch folds strchr (e, 0)

Re: [Patch, fortran] PR 59599 ICE on intrinsic ichar

2014-02-15 Thread Mikael Morin
Le 15/02/2014 11:04, Richard Biener a écrit : > On Fri, 14 Feb 2014, Mikael Morin wrote: > >> Hello, >> >> this bug is not a regression, but the patch shouldn't wreck the compiler >> too much on the other hand. >> The problem is a wrong number of arguments while generating code for the >> ichar in

Re: fold strchr (e, 0) to e + strlen (e)

2014-02-15 Thread Jakub Jelinek
On Sat, Feb 15, 2014 at 12:15:22PM +0100, Ondřej Bílka wrote: > On Sat, Feb 15, 2014 at 10:50:02AM +0100, Richard Biener wrote: > > On Sat, Feb 15, 2014 at 10:45 AM, Prathamesh Kulkarni > > wrote: > > > On Sat, Feb 15, 2014 at 2:28 PM, Jakub Jelinek wrote: > > >> On Sat, Feb 15, 2014 at 02:23:24P

Re: [PATCH RFC] MIPS add support for MIPS SIMD ARCHITECTURE V1.07

2014-02-15 Thread Richard Sandiford
Graham Stott writes: > +(define_constraint "YC" > + "@internal > + A constant vector with each element is a unsigned bitimm-bit integer with > only one bit set" Maybe: A replicated vector constant in which the replicated value has a single bit set Likewise YZ and clear bits. > +(define

[PATCH] Fixing SEH exceptions for languages != C++

2014-02-15 Thread Jonathan Schleifer
Hi! The following patch fixes a bug in SEH exception handling that made it crash with ObjC (and most likely other languages as well). The problem is that the SEH exception handler always passes the unwind exception as 4th parameter to RtlUnwindEx, which RtlUnwindEx then later passes to the landing

Re: [PATCH][ARM] add HFmode to arm_preferred_simd_mode

2014-02-15 Thread Kugan
On 14/02/14 14:34, Kugan wrote: > > > On 14/02/14 11:24, Andrew Pinski wrote: >> On Thu, Feb 13, 2014 at 4:15 PM, Kugan >> wrote: >>> Hi, >>> >>> Is there any reason why HFmode is not there in arm_preferred_simd_mode? >>> NEON does support this. >> >> Most likely because there is no support fo