Re: [PATCH, rs6000] Do not do gimple-folding of expressions that are missing their LHS

2017-07-17 Thread Richard Biener
On Wed, Jul 12, 2017 at 11:24 PM, Segher Boessenkool wrote: > On Wed, Jul 12, 2017 at 01:34:01PM -0500, Bill Schmidt wrote: >> Although I said this was invalid code, it really isn't -- it's legal code. >> It's more of an ice-on-stupid-code situation. :) So probably you should >> remove the "in

Re: [PATCH, rs6000] Do not do gimple-folding of expressions that are missing their LHS

2017-07-12 Thread Segher Boessenkool
On Wed, Jul 12, 2017 at 01:34:01PM -0500, Bill Schmidt wrote: > Although I said this was invalid code, it really isn't -- it's legal code. > It's more of an ice-on-stupid-code situation. :) So probably you should > remove the "invalid" language from the commentary. Sorry for misleading you. W

Re: [PATCH, rs6000] Do not do gimple-folding of expressions that are missing their LHS

2017-07-12 Thread Segher Boessenkool
On Wed, Jul 12, 2017 at 11:45:07AM -0500, Will Schmidt wrote: > diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c > index 10c5521..e21b56f 100644 > --- a/gcc/config/rs6000/rs6000.c > +++ b/gcc/config/rs6000/rs6000.c > @@ -16297,6 +16297,9 @@ rs6000_gimple_fold_builtin (gimple_stm

Re: [PATCH, rs6000] Do not do gimple-folding of expressions that are missing their LHS

2017-07-12 Thread Bill Schmidt
Although I said this was invalid code, it really isn't -- it's legal code. It's more of an ice-on-stupid-code situation. :) So probably you should remove the "invalid" language from the commentary. Sorry for misleading you. -- Bill Bill Schmidt, Ph.D. GCC for Linux on Power Linux on Power To

[PATCH, rs6000] Do not do gimple-folding of expressions that are missing their LHS

2017-07-12 Thread Will Schmidt
Hi, Do not do the gimple-folding optimizations of expressions that are missing their LHS. (Preventing an ICE on invalid code). This was noticed during debug of PR81317, but is not a fix for that PR. This is based on a patch suggested by Segher. (This will need a revisit if/when we get a