Re: [PATCH] [i386] Support avx512 vector shift with vector [PR98434]

2021-06-23 Thread Hongtao Liu via Gcc-patches
On Wed, Jun 23, 2021 at 5:08 PM Richard Biener wrote: > > On Wed, Jun 23, 2021 at 10:01 AM Jakub Jelinek wrote: > > > > On Wed, Jun 23, 2021 at 09:53:27AM +0200, Richard Biener via Gcc-patches > > wrote: > > > On Wed, Jun 23, 2021 at 9:19 AM Hongtao Liu via Gcc-patches > > > wrote: > > > > > >

Re: [PATCH] [i386] Support avx512 vector shift with vector [PR98434]

2021-06-23 Thread Richard Biener via Gcc-patches
On Wed, Jun 23, 2021 at 10:01 AM Jakub Jelinek wrote: > > On Wed, Jun 23, 2021 at 09:53:27AM +0200, Richard Biener via Gcc-patches > wrote: > > On Wed, Jun 23, 2021 at 9:19 AM Hongtao Liu via Gcc-patches > > wrote: > > > > > > Here's the patch I'm going to check in. > > > > > > The patch will re

Re: [PATCH] [i386] Support avx512 vector shift with vector [PR98434]

2021-06-23 Thread Jakub Jelinek via Gcc-patches
On Wed, Jun 23, 2021 at 09:53:27AM +0200, Richard Biener via Gcc-patches wrote: > On Wed, Jun 23, 2021 at 9:19 AM Hongtao Liu via Gcc-patches > wrote: > > > > Here's the patch I'm going to check in. > > > > The patch will regress pr91838.C with extra options: -march=cascadelake > > > > using T = u

Re: [PATCH] [i386] Support avx512 vector shift with vector [PR98434]

2021-06-23 Thread Richard Biener via Gcc-patches
On Wed, Jun 23, 2021 at 9:19 AM Hongtao Liu via Gcc-patches wrote: > > Here's the patch I'm going to check in. > > The patch will regress pr91838.C with extra options: -march=cascadelake > > using T = unsigned char; // or ushort, or uint > using V [[gnu::vector_size(8)]] = T; > V f(V x) { return x

Re: [PATCH] [i386] Support avx512 vector shift with vector [PR98434]

2021-06-23 Thread Hongtao Liu via Gcc-patches
On Wed, Jun 23, 2021 at 3:23 PM Hongtao Liu wrote: > > Here's the patch I'm going to check in. > > The patch will regress pr91838.C with extra options: -march=cascadelake > > using T = unsigned char; // or ushort, or uint > using V [[gnu::vector_size(8)]] = T; > V f(V x) { return x >> 8 * sizeof(T

Re: [PATCH] [i386] Support avx512 vector shift with vector [PR98434]

2021-06-23 Thread Hongtao Liu via Gcc-patches
Here's the patch I'm going to check in. The patch will regress pr91838.C with extra options: -march=cascadelake using T = unsigned char; // or ushort, or uint using V [[gnu::vector_size(8)]] = T; V f(V x) { return x >> 8 * sizeof(T); } Basically, the testcase is UB with logic right shift more th

[PATCH] [i386] Support avx512 vector shift with vector [PR98434]

2021-05-24 Thread Hongtao Liu via Gcc-patches
Hi: This patch is about to add expanders for vashl, vlshr, vashr and vashr. Besides there's some assumption in expand_mult_const that mul and add must be available at the same time, but for i386, addv8qi is restricted under TARGET_64BIT, but mulv8qi not, that could cause ICE. So restrict mulv8qi