Re: [PATCH] vect: Try folding first for shifted value generation [PR107240]

2022-10-19 Thread Kewen.Lin via Gcc-patches
Hi Richi, on 2022/10/19 15:43, Richard Biener wrote: > On Wed, Oct 19, 2022 at 5:18 AM Kewen.Lin wrote: >> >> Hi, >> >> As PR107240 shows, when both the value to be shifted and the >> count used for shifting are constants, it doesn't actually >> requires a target to support vector shift operation

Re: [PATCH] vect: Try folding first for shifted value generation [PR107240]

2022-10-19 Thread Richard Biener via Gcc-patches
On Wed, Oct 19, 2022 at 5:18 AM Kewen.Lin wrote: > > Hi, > > As PR107240 shows, when both the value to be shifted and the > count used for shifting are constants, it doesn't actually > requires a target to support vector shift operations. > > This patch is to try fold_build2 for the generation of

[PATCH] vect: Try folding first for shifted value generation [PR107240]

2022-10-18 Thread Kewen.Lin via Gcc-patches
Hi, As PR107240 shows, when both the value to be shifted and the count used for shifting are constants, it doesn't actually requires a target to support vector shift operations. This patch is to try fold_build2 for the generation of the shifted value first, if it's folded, the shift is gone, othe