Re: [PATCH] [X86] Fold more shuffle builtins to VEC_PERM_EXPR.

2021-02-15 Thread Jeff Law via Gcc-patches
1) + ((imask & 1 << i) >> i); >> Again, formatting. Plus, i >> 1 << 1 looks too ugly/unreadable, >> if you mean i & ~1, write it like that, it is up to the compiler to emit >> it like i >> 1 << 1 if that is the best implementation. >&

Re: [PATCH] [X86] Fold more shuffle builtins to VEC_PERM_EXPR.

2020-12-16 Thread Hongtao Liu via Gcc-patches
](if VL > 128, also use Imm[7:0]) provide 4 select > > + controls for each element of the destination. */ > > + unsigned j = i % 4; > > + sel_idx = ((i & 2) >> 1) * elems > > + + (i >> 2 <

Re: [PATCH] [X86] Fold more shuffle builtins to VEC_PERM_EXPR.

2020-12-15 Thread Jakub Jelinek via Gcc-patches
On Tue, Dec 15, 2020 at 06:10:57PM +0800, Hongtao Liu via Gcc-patches wrote: > --- a/gcc/config/i386/i386.c > +++ b/gcc/config/i386/i386.c > @@ -18187,21 +18187,67 @@ ix86_gimple_fold_builtin (gimple_stmt_iterator *gsi) > } >break; > > +case IX86_BUILTIN_SHUFPD512: > +case

[PATCH] [X86] Fold more shuffle builtins to VEC_PERM_EXPR.

2020-12-15 Thread Hongtao Liu via Gcc-patches
From 74596b08a91dafcb29441de59544dd857a090564 Mon Sep 17 00:00:00 2001 From: liuhongt Date: Fri, 11 Dec 2020 19:02:43 +0800 Subject: [PATCH] [X86] Fold more shuffle builtins to VEC_PERM_EXPR. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit A follow-up