Re: [PATCH] make canonicalize_condition keep its promise

2018-01-02 Thread Aaron Sawdey
On Tue, 2017-12-19 at 16:56 -0700, Jeff Law wrote: > So the path to get_condition is reasonable. That's really all I > needed > to have verified one way or the other. > > With that in mind your patch is fine. > > I will note that I find it highly confusing that we attach a simple > loop >

Re: [PATCH] make canonicalize_condition keep its promise

2017-12-19 Thread Segher Boessenkool
On Tue, Dec 19, 2017 at 04:56:16PM -0700, Jeff Law wrote: > With that in mind your patch is fine. Thanks for the reviewing :-) > I will note that I find it highly confusing that we attach a simple loop > descriptor to a loop that is not a simple loop. But clearly you didn't > introduce that

Re: [PATCH] make canonicalize_condition keep its promise

2017-12-19 Thread Segher Boessenkool
Hi Jeff, On Tue, Dec 19, 2017 at 04:40:23PM -0700, Jeff Law wrote: > On 12/15/2017 02:16 AM, Segher Boessenkool wrote: > >> The only way to get into check_simple_exit is via find_simple_exit which > >> is only called from get_simple_loop_desc. > >> > >> And if you're calling get_simple_loop_desc,

Re: [PATCH] make canonicalize_condition keep its promise

2017-12-19 Thread Jeff Law
On 12/14/2017 03:22 PM, Aaron Sawdey wrote: >> >> Understood.  But what I still struggle with is how you're getting >> into >> check_simple_exit to begin with and whether or not that should be >> happening. >> >> >> The only way to get into check_simple_exit is via find_simple_exit >> which >> is

Re: [PATCH] make canonicalize_condition keep its promise

2017-12-19 Thread Jeff Law
On 12/15/2017 02:16 AM, Segher Boessenkool wrote: > On Thu, Dec 14, 2017 at 01:43:35PM -0700, Jeff Law wrote: >> On 11/21/2017 10:45 AM, Aaron Sawdey wrote: >>> There is no existing loop structure. This starts with a memcmp() call >>> and then goes down through the builtin expansion mechanism,

Re: [PATCH] make canonicalize_condition keep its promise

2017-12-15 Thread Segher Boessenkool
On Thu, Dec 14, 2017 at 01:43:35PM -0700, Jeff Law wrote: > On 11/21/2017 10:45 AM, Aaron Sawdey wrote: > > There is no existing loop structure. This starts with a memcmp() call > > and then goes down through the builtin expansion mechanism, which is > > ultimately expanding the pattern cmpmemsi

Re: [PATCH] make canonicalize_condition keep its promise

2017-12-14 Thread Aaron Sawdey
On Thu, 2017-12-14 at 13:43 -0700, Jeff Law wrote: > On 11/21/2017 10:45 AM, Aaron Sawdey wrote: > > On Tue, 2017-11-21 at 10:06 -0700, Jeff Law wrote: > > > On 11/20/2017 06:41 AM, Aaron Sawdey wrote: > > > > On Sun, 2017-11-19 at 16:44 -0700, Jeff Law wrote: > > > > > On 11/15/2017 08:40 AM,

Re: [PATCH] make canonicalize_condition keep its promise

2017-12-14 Thread Jeff Law
On 11/21/2017 10:45 AM, Aaron Sawdey wrote: > On Tue, 2017-11-21 at 10:06 -0700, Jeff Law wrote: >> On 11/20/2017 06:41 AM, Aaron Sawdey wrote: >>> On Sun, 2017-11-19 at 16:44 -0700, Jeff Law wrote: On 11/15/2017 08:40 AM, Aaron Sawdey wrote: > So, the story of this very small patch

Re: [PATCH] make canonicalize_condition keep its promise

2017-11-30 Thread Jeff Law
On 11/29/2017 06:24 PM, Aaron Sawdey wrote: > On Tue, 2017-11-21 at 11:45 -0600, Aaron Sawdey wrote: >> On Tue, 2017-11-21 at 10:06 -0700, Jeff Law wrote: >>> On 11/20/2017 06:41 AM, Aaron Sawdey wrote: On Sun, 2017-11-19 at 16:44 -0700, Jeff Law wrote: > On 11/15/2017 08:40 AM, Aaron

Re: [PATCH] make canonicalize_condition keep its promise

2017-11-29 Thread Aaron Sawdey
On Tue, 2017-11-21 at 11:45 -0600, Aaron Sawdey wrote: > On Tue, 2017-11-21 at 10:06 -0700, Jeff Law wrote: > > On 11/20/2017 06:41 AM, Aaron Sawdey wrote: > > > On Sun, 2017-11-19 at 16:44 -0700, Jeff Law wrote: > > > > On 11/15/2017 08:40 AM, Aaron Sawdey wrote: > > > > > So, the story of this

Re: [PATCH] make canonicalize_condition keep its promise

2017-11-21 Thread Aaron Sawdey
On Tue, 2017-11-21 at 10:06 -0700, Jeff Law wrote: > On 11/20/2017 06:41 AM, Aaron Sawdey wrote: > > On Sun, 2017-11-19 at 16:44 -0700, Jeff Law wrote: > > > On 11/15/2017 08:40 AM, Aaron Sawdey wrote: > > > > So, the story of this very small patch starts with me adding > > > > patterns > > > >

Re: [PATCH] make canonicalize_condition keep its promise

2017-11-21 Thread Jeff Law
On 11/20/2017 06:41 AM, Aaron Sawdey wrote: > On Sun, 2017-11-19 at 16:44 -0700, Jeff Law wrote: >> On 11/15/2017 08:40 AM, Aaron Sawdey wrote: >>> So, the story of this very small patch starts with me adding >>> patterns >>> for ppc instructions bdz[tf] and bdnz[tf] such as this: >>> >>>   [(set

Re: [PATCH] make canonicalize_condition keep its promise

2017-11-20 Thread Aaron Sawdey
On Sun, 2017-11-19 at 16:44 -0700, Jeff Law wrote: > On 11/15/2017 08:40 AM, Aaron Sawdey wrote: > > So, the story of this very small patch starts with me adding > > patterns > > for ppc instructions bdz[tf] and bdnz[tf] such as this: > > > >   [(set (pc) > > (if_then_else > >   (and > >

Re: [PATCH] make canonicalize_condition keep its promise

2017-11-19 Thread Jeff Law
On 11/15/2017 08:40 AM, Aaron Sawdey wrote: > So, the story of this very small patch starts with me adding patterns > for ppc instructions bdz[tf] and bdnz[tf] such as this: > > [(set (pc) > (if_then_else > (and >(ne (match_operand:P 1 "register_operand" "c,*b,*b,*b")

Re: [PATCH] make canonicalize_condition keep its promise

2017-11-15 Thread Peter Bergner
On 11/15/17 9:40 AM, Aaron Sawdey wrote: > Index: gcc/rtlanal.c > === > --- gcc/rtlanal.c (revision 254553) > +++ gcc/rtlanal.c (working copy) > @@ -5623,7 +5623,11 @@ >if (CC0_P (op0)) > return 0; > > - return

[PATCH] make canonicalize_condition keep its promise

2017-11-15 Thread Aaron Sawdey
So, the story of this very small patch starts with me adding patterns for ppc instructions bdz[tf] and bdnz[tf] such as this: [(set (pc) (if_then_else (and (ne (match_operand:P 1 "register_operand" "c,*b,*b,*b") (const_int 1))