Re: [PATCH] rs6000: Vector shift-right should honor modulo semantics

2019-02-11 Thread Bill Schmidt
On 2/11/19 8:11 AM, Segher Boessenkool wrote: > On Mon, Feb 11, 2019 at 07:17:16AM -0600, Bill Schmidt wrote: >> At -O0 (if I hand-inline everything myself to avoid errors), we scalarize >> the modulo/masking operation into a rldicl for each doubleword. I really >> don't see any reason to change t

Re: [PATCH] rs6000: Vector shift-right should honor modulo semantics

2019-02-11 Thread Segher Boessenkool
On Mon, Feb 11, 2019 at 07:17:16AM -0600, Bill Schmidt wrote: > At -O0 (if I hand-inline everything myself to avoid errors), we scalarize > the modulo/masking operation into a rldicl for each doubleword. I really > don't see any reason to change the code. So what does this look like at expand (at

Re: [PATCH] rs6000: Vector shift-right should honor modulo semantics

2019-02-11 Thread Bill Schmidt
On 2/11/19 6:43 AM, Segher Boessenkool wrote: > On Sun, Feb 10, 2019 at 08:42:42PM -0600, Bill Schmidt wrote: >> On 2/10/19 4:05 PM, Segher Boessenkool wrote: >>> On Sun, Feb 10, 2019 at 10:10:02AM -0600, Bill Schmidt wrote: I've added executable tests for both shift-right algebraic and shift-

Re: [PATCH] rs6000: Vector shift-right should honor modulo semantics

2019-02-11 Thread Segher Boessenkool
On Sun, Feb 10, 2019 at 08:42:42PM -0600, Bill Schmidt wrote: > On 2/10/19 4:05 PM, Segher Boessenkool wrote: > > On Sun, Feb 10, 2019 at 10:10:02AM -0600, Bill Schmidt wrote: > >> I've added executable tests for both shift-right algebraic and shift-right > >> logical. > >> Both fail prior to appl

Re: [PATCH] rs6000: Vector shift-right should honor modulo semantics

2019-02-10 Thread Bill Schmidt
On 2/10/19 8:42 PM, Bill Schmidt wrote: > On 2/10/19 4:05 PM, Segher Boessenkool wrote: >> Hi Bill, >> >> On Sun, Feb 10, 2019 at 10:10:02AM -0600, Bill Schmidt wrote: >>> I've added executable tests for both shift-right algebraic and shift-right >>> logical. >>> Both fail prior to applying the pa

Re: [PATCH] rs6000: Vector shift-right should honor modulo semantics

2019-02-10 Thread Bill Schmidt
On 2/10/19 4:05 PM, Segher Boessenkool wrote: > Hi Bill, > > On Sun, Feb 10, 2019 at 10:10:02AM -0600, Bill Schmidt wrote: >> I've added executable tests for both shift-right algebraic and shift-right >> logical. >> Both fail prior to applying the patch, and work correctly afterwards. > Please add

Re: [PATCH] rs6000: Vector shift-right should honor modulo semantics

2019-02-10 Thread Segher Boessenkool
Hi Bill, On Sun, Feb 10, 2019 at 10:10:02AM -0600, Bill Schmidt wrote: > I've added executable tests for both shift-right algebraic and shift-right > logical. > Both fail prior to applying the patch, and work correctly afterwards. Please add a test for left shifts, as well? > 2019-02-08 Bill S

[PATCH] rs6000: Vector shift-right should honor modulo semantics

2019-02-10 Thread Bill Schmidt
Hi! We had a problem report for code attempting to implement a vector right-shift for a vector long long (V2DImode) type. The programmer noted that we don't have a vector splat-immediate for this mode, but cleverly realized he could use a vector char splat-immediate since only the lower 6 bits