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

2019-02-11 Thread Bill Schmidt
On 2/11/19 10:01 AM, Segher Boessenkool wrote: > Hi Bill, > > On Mon, Feb 11, 2019 at 07:36:11AM -0600, Bill Schmidt wrote: >> 2019-02-11 Bill Schmidt >> >> * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Shift-right >> and shift-left vector built-ins need to include a TRUNC_MO

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

2019-02-11 Thread Segher Boessenkool
Hi Bill, On Mon, Feb 11, 2019 at 07:36:11AM -0600, Bill Schmidt wrote: > 2019-02-11 Bill Schmidt > > * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Shift-right > and shift-left vector built-ins need to include a TRUNC_MOD_EXPR > for correct semantics. > > [gcc/testsu

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

2019-02-11 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