Re: [PATCH] [rtl-optimization] Simplify vector shift/rotate with const_vec_duplicate to vector shift/rotate with const_int element.

2021-08-06 Thread Segher Boessenkool
On Fri, Aug 06, 2021 at 11:55:52AM +0100, Richard Sandiford wrote: > liuhongt via Gcc-patches writes: > > Hi: > > Bootstrapped and regtested on x86_64-linux-gnu{-m32,} > > Ok for trunk? > > I think if anything the canonicalisation should be the other way: > if the shift amount is an in-range

Re: [PATCH] [rtl-optimization] Simplify vector shift/rotate with const_vec_duplicate to vector shift/rotate with const_int element.

2021-08-06 Thread Richard Sandiford via Gcc-patches
liuhongt via Gcc-patches writes: > Hi: > Bootstrapped and regtested on x86_64-linux-gnu{-m32,} > Ok for trunk? I think if anything the canonicalisation should be the other way: if the shift amount is an in-range constant, we know that it fits within a vector element, and so the vector form

[PATCH] [rtl-optimization] Simplify vector shift/rotate with const_vec_duplicate to vector shift/rotate with const_int element.

2021-08-06 Thread liuhongt via Gcc-patches
Hi: Bootstrapped and regtested on x86_64-linux-gnu{-m32,} Ok for trunk? gcc/ChangeLog: PR rtl-optimization/101796 * simplify-rtx.c (simplify_context::simplify_binary_operation_1): Simplify vector shift/rotate with const_vec_duplicate to vector