Re: [RFA] More type narrowing in match.pd V2

2015-05-18 Thread Richard Biener
On Mon, May 18, 2015 at 2:34 PM, Marc Glisse wrote: > On Mon, 18 May 2015, Richard Biener wrote: > >> On Thu, May 14, 2015 at 4:28 PM, Jeff Law wrote: >>> >>> On 05/14/2015 08:04 AM, Marc Glisse wrote: On Fri, 1 May 2015, Jeff Law wrote: > Slight refactoring of the conditi

Re: [RFA] More type narrowing in match.pd V2

2015-05-18 Thread Marc Glisse
On Mon, 18 May 2015, Richard Biener wrote: On Thu, May 14, 2015 at 4:28 PM, Jeff Law wrote: On 05/14/2015 08:04 AM, Marc Glisse wrote: On Fri, 1 May 2015, Jeff Law wrote: Slight refactoring of the condition by using types_match as suggested by Richi. I also applied the new types_match to

Re: [RFA] More type narrowing in match.pd V2

2015-05-18 Thread Richard Biener
On Mon, May 18, 2015 at 11:17 AM, Richard Biener wrote: > On Thu, May 14, 2015 at 4:28 PM, Jeff Law wrote: >> On 05/14/2015 08:04 AM, Marc Glisse wrote: >>> >>> On Fri, 1 May 2015, Jeff Law wrote: >>> Slight refactoring of the condition by using types_match as suggested by Richi. I als

Re: [RFA] More type narrowing in match.pd V2

2015-05-18 Thread Richard Biener
On Thu, May 14, 2015 at 4:28 PM, Jeff Law wrote: > On 05/14/2015 08:04 AM, Marc Glisse wrote: >> >> On Fri, 1 May 2015, Jeff Law wrote: >> >>> Slight refactoring of the condition by using types_match as suggested >>> by Richi. I also applied the new types_match to 2 other patterns in >>> match.pd

Re: [RFA] More type narrowing in match.pd V2

2015-05-14 Thread Jeff Law
On 05/14/2015 08:04 AM, Marc Glisse wrote: On Fri, 1 May 2015, Jeff Law wrote: Slight refactoring of the condition by using types_match as suggested by Richi. I also applied the new types_match to 2 other patterns in match.pd where it seemed clearly appropriate. I would like to propose this

Re: [RFA] More type narrowing in match.pd V2

2015-05-14 Thread Marc Glisse
On Fri, 1 May 2015, Jeff Law wrote: Slight refactoring of the condition by using types_match as suggested by Richi. I also applied the new types_match to 2 other patterns in match.pd where it seemed clearly appropriate. I would like to propose this small tweak (regtested ok). If we had a di

Re: [RFA] More type narrowing in match.pd V2

2015-05-04 Thread H.J. Lu
I think this caused: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66009 H.J. On Mon, May 4, 2015 at 2:02 AM, Richard Biener wrote: > On Sat, May 2, 2015 at 2:36 AM, Jeff Law wrote: >> Here's an updated patch to add more type narrowing to match.pd. >> >> Changes since the last version: >> >> S

Re: [RFA] More type narrowing in match.pd V2

2015-05-04 Thread Jeff Law
On 05/02/2015 03:17 PM, Bernhard Reutner-Fischer wrote: I should find time to commit the already approved auto-wipe dump file patch. So let's assume I'll get to it maybe next weekend and nobody will notice the 2 leftover .original dumps in this patch :) Doh! Not sure how there's be a .original

Re: [RFA] More type narrowing in match.pd V2

2015-05-04 Thread Richard Biener
On Sat, May 2, 2015 at 2:36 AM, Jeff Law wrote: > Here's an updated patch to add more type narrowing to match.pd. > > Changes since the last version: > > Slight refactoring of the condition by using types_match as suggested by > Richi. I also applied the new types_match to 2 other patterns in mat

Re: [RFA] More type narrowing in match.pd V2

2015-05-02 Thread Bernhard Reutner-Fischer
On May 2, 2015 2:36:02 AM GMT+02:00, Jeff Law wrote: >Here's an updated patch to add more type narrowing to match.pd. > >Changes since the last version: > >Slight refactoring of the condition by using types_match as suggested >by >Richi. I also applied the new types_match to 2 other patterns in

[RFA] More type narrowing in match.pd V2

2015-05-01 Thread Jeff Law
Here's an updated patch to add more type narrowing to match.pd. Changes since the last version: Slight refactoring of the condition by using types_match as suggested by Richi. I also applied the new types_match to 2 other patterns in match.pd where it seemed clearly appropriate. Additionall

Re: More type narrowing in match.pd

2015-05-01 Thread Jeff Law
On 04/30/2015 05:07 AM, Richard Biener wrote: On Thu, Apr 30, 2015 at 12:53 PM, Marc Glisse wrote: On Thu, 30 Apr 2015, Richard Biener wrote: I have in my local dev tree (so completely untested...) @@ -1040,31 +1052,22 @@ (define_operator_list CBRT BUILT_IN_CBRT operation and convert the

Re: More type narrowing in match.pd

2015-05-01 Thread Jeff Law
On 04/30/2015 03:38 PM, Marc Glisse wrote: On Thu, 30 Apr 2015, Jeff Law wrote: On 04/30/2015 01:17 AM, Marc Glisse wrote: +/* This is another case of narrowing, specifically when there's an outer + BIT_AND_EXPR which masks off bits outside the type of the innermost + operands. Like the

Re: More type narrowing in match.pd

2015-04-30 Thread Marc Glisse
On Thu, 30 Apr 2015, Jeff Law wrote: On 04/30/2015 01:17 AM, Marc Glisse wrote: +/* This is another case of narrowing, specifically when there's an outer + BIT_AND_EXPR which masks off bits outside the type of the innermost + operands. Like the previous case we have to convert the operan

Re: More type narrowing in match.pd

2015-04-30 Thread Jeff Law
On 04/30/2015 01:17 AM, Marc Glisse wrote: +/* This is another case of narrowing, specifically when there's an outer + BIT_AND_EXPR which masks off bits outside the type of the innermost + operands. Like the previous case we have to convert the operands + to unsigned types to avoid intro

Re: More type narrowing in match.pd

2015-04-30 Thread Jeff Law
On 04/30/2015 03:00 AM, Richard Biener wrote: Without looking too close at this patch I'll note that we might want to improve the previous one first to also handle a constant 2nd operand for the operation (your new one also misses that). Yea, I think you mentioned in that in the 47477 BZ as well

Re: More type narrowing in match.pd

2015-04-30 Thread Richard Biener
On Thu, Apr 30, 2015 at 12:53 PM, Marc Glisse wrote: > On Thu, 30 Apr 2015, Richard Biener wrote: > >> I have in my local dev tree (so completely untested...) >> >> @@ -1040,31 +1052,22 @@ (define_operator_list CBRT BUILT_IN_CBRT >>operation and convert the result to the desired type. */ >> (

Re: More type narrowing in match.pd

2015-04-30 Thread Marc Glisse
On Thu, 30 Apr 2015, Richard Biener wrote: I have in my local dev tree (so completely untested...) @@ -1040,31 +1052,22 @@ (define_operator_list CBRT BUILT_IN_CBRT operation and convert the result to the desired type. */ (for op (plus minus) (simplify -(convert (op (convert@2 @0) (con

Re: More type narrowing in match.pd

2015-04-30 Thread Richard Biener
On Thu, Apr 30, 2015 at 5:52 AM, Jeff Law wrote: > > This is an incremental improvement to the type narrowing in match.pd. It's > largely based on the pattern I added to fix 47477. > > Basically if we have > > (bit_and (arith_op (convert A) (convert B)) mask) > > Where the conversions are widening

Re: More type narrowing in match.pd

2015-04-30 Thread Marc Glisse
On Wed, 29 Apr 2015, Jeff Law wrote: This is an incremental improvement to the type narrowing in match.pd. It's largely based on the pattern I added to fix 47477. Basically if we have (bit_and (arith_op (convert A) (convert B)) mask) Where the conversions are widening and the mask turns off

More type narrowing in match.pd

2015-04-29 Thread Jeff Law
This is an incremental improvement to the type narrowing in match.pd. It's largely based on the pattern I added to fix 47477. Basically if we have (bit_and (arith_op (convert A) (convert B)) mask) Where the conversions are widening and the mask turns off all bits outside the original types