Re: [PATCH] tree-optimization/97081 - fix wrong-code with vectorized shift

2020-09-18 Thread Jakub Jelinek via Gcc-patches
On Fri, Sep 18, 2020 at 01:39:16PM +0200, Richard Biener wrote: > --- a/gcc/tree-vect-patterns.c > +++ b/gcc/tree-vect-patterns.c > @@ -2456,7 +2456,6 @@ vect_recog_rotate_pattern (vec_info *vinfo, >append_pattern_def_seq (vinfo, stmt_vinfo, def_stmt); > } >stype = TREE_TYPE (def);

Re: [PATCH] tree-optimization/97081 - fix wrong-code with vectorized shift

2020-09-18 Thread Jakub Jelinek via Gcc-patches
On Fri, Sep 18, 2020 at 01:39:16PM +0200, Richard Biener wrote: > This corrects the mask for creation of x << s | x >> (-x & mask) > from a rotate x < > Bootstrap / regtest running on x86_64-unknown-linux-gnu. > > 2020-09-18 Richard Biener > > PR tree-optimization/97081 > * tree-v

[PATCH] tree-optimization/97081 - fix wrong-code with vectorized shift

2020-09-18 Thread Richard Biener
This corrects the mask for creation of x << s | x >> (-x & mask) from a rotate x < PR tree-optimization/97081 * tree-vect-patterns.c (vect_recog_rotate_pattern): Use the precision of the shifted operand to determine the mask. * gcc.dg/vect/pr97081.c: New testcase.