Re: [PATCH] rs6000: Make the ctr* patterns allow ints in vector regs (PR71763)

2016-07-15 Thread Segher Boessenkool
On Mon, Jul 11, 2016 at 06:54:44AM -0400, David Edelsohn wrote: > Should we backport this? At least Alan's UNSPEC_DOLOOP part? Alan backported this to 6 (I unfortunately removed gcc-patches from cc:). Segher

Re: [PATCH] rs6000: Make the ctr* patterns allow ints in vector regs (PR71763)

2016-07-11 Thread Segher Boessenkool
On Mon, Jul 11, 2016 at 06:54:44AM -0400, David Edelsohn wrote: > Should we backport this? At least Alan's UNSPEC_DOLOOP part? The *wi is a bugfix; I'll backport it, just like the *d (already did that one, 6 and 5; do we want 4.9 as well?) Alan's last patch would be good to have as well, it is a

Re: [PATCH] rs6000: Make the ctr* patterns allow ints in vector regs (PR71763)

2016-07-11 Thread David Edelsohn
Should we backport this? At least Alan's UNSPEC_DOLOOP part? - David On Mon, Jul 11, 2016 at 6:30 AM, Alan Modra wrote: > On Fri, Jul 08, 2016 at 04:17:36AM -0500, Segher Boessenkool wrote: >> Maybe just UNSPEC_BDZ? UNSPEC_DOLOOP? > > Committed revision 238207, using UNSPEC_DOLOOP. > > -- > A

Re: [PATCH] rs6000: Make the ctr* patterns allow ints in vector regs (PR71763)

2016-07-11 Thread Alan Modra
On Fri, Jul 08, 2016 at 04:17:36AM -0500, Segher Boessenkool wrote: > Maybe just UNSPEC_BDZ? UNSPEC_DOLOOP? Committed revision 238207, using UNSPEC_DOLOOP. -- Alan Modra Australia Development Lab, IBM

Re: [PATCH] rs6000: Make the ctr* patterns allow ints in vector regs (PR71763)

2016-07-08 Thread Segher Boessenkool
On Fri, Jul 08, 2016 at 01:28:05AM +0930, Alan Modra wrote: > BTW, both pr70098 and pr71763 are triggered by combine, not > loop-doloop as I was thinking earlier. See rtl dumps for the > testcases. I doubt the "optimization" done by combine here is worth > keeping, since loop-doloop.c ought to al

Re: [PATCH] rs6000: Make the ctr* patterns allow ints in vector regs (PR71763)

2016-07-08 Thread Segher Boessenkool
On Fri, Jul 08, 2016 at 12:37:55PM +0930, Alan Modra wrote: > The regression tests passed. I've been looking at differences in > gcc/*.o and find many cases like the following. > > orig/combine.o > 1508: 01 00 3f 2c cmpdi r31,1 > 150c: ff ff ff 3b addir31,r31,-1 >

Re: [PATCH] rs6000: Make the ctr* patterns allow ints in vector regs (PR71763)

2016-07-07 Thread Alan Modra
On Fri, Jul 08, 2016 at 01:28:05AM +0930, Alan Modra wrote: > BTW, both pr70098 and pr71763 are triggered by combine, not > loop-doloop as I was thinking earlier. See rtl dumps for the > testcases. I doubt the "optimization" done by combine here is worth > keeping, since loop-doloop.c ought to al

Re: [PATCH] rs6000: Make the ctr* patterns allow ints in vector regs (PR71763)

2016-07-07 Thread Alan Modra
On Thu, Jul 07, 2016 at 02:58:17AM +, Segher Boessenkool wrote: > Similar to PR70098, which is about integers in floating point registers, > we can have the completely analogous problem with vector registers as well > now that we allow integers in vector registers. So, this patch solves it > i

Re: [PATCH] rs6000: Make the ctr* patterns allow ints in vector regs (PR71763)

2016-07-06 Thread Segher Boessenkool
Whoops, left off a bit: > 2016-07-06 Segher Boessenkool > > PR target/70098 > PR target/71763 > * config/rs6000/rs6000.md (*ctr_internal1, *ctr_internal2, > *ctr_internal5, *ctr_internal6): * config/rs6000/rs6000.md (*ctr_internal1, *ctr_internal2, *ct

[PATCH] rs6000: Make the ctr* patterns allow ints in vector regs (PR71763)

2016-07-06 Thread Segher Boessenkool
Similar to PR70098, which is about integers in floating point registers, we can have the completely analogous problem with vector registers as well now that we allow integers in vector registers. So, this patch solves it in the same way. This only works for targets with direct move. To recap: re