[PATCH] Update document for VECTOR_MODES_WITH_PREFIX

2022-06-05 Thread Kewen.Lin via Gcc-patches
Hi, r10-3912 updated the format of VECTOR_MODES_WITH_PREFIX by adding one more parameter ORDER, the related document is out of date. So update the document for ORDER. Is it ok for trunk? BR, Kewen - gcc/ChangeLog: * machmode.def (VECTOR_MODES_WITH_PREFIX): Update document for

[PATCH] inline: Rebuild target option node for caller [PR105459]

2022-06-05 Thread Kewen.Lin via Gcc-patches
Hi, PR105459 exposes one issue in inline_call handling that when it decides to copy FP flags from callee to caller and rebuild the optimization node for caller fndecl, it's possible that the target option node is also necessary to be rebuilt. Without updating target option node early, it can make

Re: [PATCH] Update {skylake,icelake,alderlake}_cost to add a bit preference to vector store.

2022-06-05 Thread Hongtao Liu via Gcc-patches
On Wed, Jun 1, 2022 at 11:56 PM H.J. Lu via Gcc-patches wrote: > > On Tue, May 31, 2022 at 10:06 PM Cui,Lili wrote: > > > > This patch is to update {skylake,icelake,alderlake}_cost to add a bit > > preference to vector store. > > Since the interger vector construction cost has changed, we need t

Re: [PATCH] x86: harmonize __builtin_ia32_psadbw*() types

2022-06-05 Thread Hongtao Liu via Gcc-patches
On Mon, Jun 6, 2022 at 3:17 AM Uros Bizjak via Gcc-patches wrote: > > On Thu, Jun 2, 2022 at 5:04 PM Jan Beulich wrote: > > > > The 64-bit, 128-bit, and 512-bit variants have VDI return type, in > > line with instruction behavior. Make the 256-bit builtin match, thus > > also making it match the

[PATCH-1, rs6000] Replace shift and ior insns with one rotate and mask insn for bswap pattern [PR93453]

2022-06-05 Thread HAO CHEN GUI via Gcc-patches
Hi, This patch replaces shift and ior insns with one rotate and mask insn for the split patterns which are for DI byte swap on Power6 and before. The test cases shows the optimization. Bootstrapped and tested on ppc64 Linux BE and LE with no regressions. Is this okay for trunk? Any recommendat

[PATCH]: libgompd add parallel handle functions

2022-06-05 Thread Mohamed Sayed via Gcc-patches
This patch adds parallel region handles specified in section 5.5.3. >From examining libgomp code, I found that struct gomp_team describes the parallel region. The Thread handle gives the address of gomp_thread so, I tried to access *team gomp_thread->ts->team. The parallel handle is the team pointe

Re: [PING] PR middle-end/95126: Expand small const structs as immediate constants

2022-06-05 Thread Rainer Orth
Andreas Schwab writes: > This breaks Ada on aarch64 in stage3, probably a miscompiled stage2 > compiler. For example: > > /opt/gcc/gcc-20220605/Build/./prev-gcc/xgcc > -B/opt/gcc/gcc-20220605/Build/./prev-gcc/ -B/usr/aarch64-suse-linux/bin/ > -B/usr/aarch64-suse-linux/bin/ -

Re: [PATCH] x86: harmonize __builtin_ia32_psadbw*() types

2022-06-05 Thread Uros Bizjak via Gcc-patches
On Thu, Jun 2, 2022 at 5:04 PM Jan Beulich wrote: > > The 64-bit, 128-bit, and 512-bit variants have VDI return type, in > line with instruction behavior. Make the 256-bit builtin match, thus > also making it match the insn it expands to (using VI8_AVX2_AVX512BW). > > gcc/ > > * config/i38

Re: [x86 PATCH] Double word implementation of and; cmp to not; test optimization.

2022-06-05 Thread Uros Bizjak via Gcc-patches
On Sun, Jun 5, 2022 at 7:19 PM Roger Sayle wrote: > > > This patch extends the recent and;cmp to not;test optimization to also > perform this transformation for TImode on TARGET_64BIT and DImode on -m32, > One motivation for this is that it's a step to fixing the current failure > of gcc.target/i3

Re: [x86 PATCH] PR target/91681: zero_extendditi2 pattern for more optimizations.

2022-06-05 Thread Uros Bizjak via Gcc-patches
On Sun, Jun 5, 2022 at 1:48 PM Roger Sayle wrote: > > > Hi Uros, > Many thanks for your speedy review. This revised patch implements > all three of your recommended improvements; the use of > ix86_binary_operator_ok with code UNKNOWN, the removal of > "n" constraints from const_int_operand predic

Re: [x86 PATCH] Recognize vpcmov in combine with -mxop.

2022-06-05 Thread Uros Bizjak via Gcc-patches
On Sat, Jun 4, 2022 at 1:03 PM Roger Sayle wrote: > > > By way of an apology for causing PR target/105791, where I'd overlooked > the need to support V1TImode in TARGET_XOP's vpcmov instruction, this > patch further improves support for TARGET_XOP's vpcmov instruction, by > recognizing it in combi

Re: [PING] PR middle-end/95126: Expand small const structs as immediate constants

2022-06-05 Thread Andreas Schwab
This breaks Ada on aarch64 in stage3, probably a miscompiled stage2 compiler. For example: /opt/gcc/gcc-20220605/Build/./prev-gcc/xgcc -B/opt/gcc/gcc-20220605/Build/./prev-gcc/ -B/usr/aarch64-suse-linux/bin/ -B/usr/aarch64-suse-linux/bin/ -B/usr/aarch64-suse-linux/lib/ -isystem /usr/aarch64

[x86 PATCH] Double word implementation of and; cmp to not; test optimization.

2022-06-05 Thread Roger Sayle
This patch extends the recent and;cmp to not;test optimization to also perform this transformation for TImode on TARGET_64BIT and DImode on -m32, One motivation for this is that it's a step to fixing the current failure of gcc.target/i386/pr65105-5.c on -m32. A more direct benefit for x86_64 is t

[PATCH] PR tree-optimization/105835: Two narrowing patterns for match.pd.

2022-06-05 Thread Roger Sayle
This patch resolves PR tree-optimization/105835, which is a code quality (dead code elimination) regression at -O1 triggered/exposed by a recent change to canonicalize X&-Y as X*Y. The new (shorter) form exposes some missed optimization opportunities that can be handled by adding some extra simpl

RE: [x86 PATCH] PR target/91681: zero_extendditi2 pattern for more optimizations.

2022-06-05 Thread Roger Sayle
Hi Uros, Many thanks for your speedy review. This revised patch implements all three of your recommended improvements; the use of ix86_binary_operator_ok with code UNKNOWN, the removal of "n" constraints from const_int_operand predicates, and the use of force_reg (for input operands, and REG_P fo

[PATCH take #2] Fold truncations of left shifts in match.pd

2022-06-05 Thread Roger Sayle
Hi Richard, Many thanks for taking the time to explain how vectorization is supposed to work. I now see that vect_recog_rotate_pattern in tree-vect-patterns.cc is supposed to handle lowering of rotations to (vector) shifts, and completely agree that adding support for signed types (using appropri

Re: [1/2] PR96463 - aarch64 specific changes

2022-06-05 Thread Prathamesh Kulkarni via Gcc-patches
On Wed, 1 Jun 2022 at 14:12, Richard Sandiford wrote: > > Prathamesh Kulkarni writes: > > On Thu, 12 May 2022 at 16:15, Richard Sandiford > > wrote: > >> > >> Prathamesh Kulkarni writes: > >> > On Wed, 11 May 2022 at 12:44, Richard Sandiford > >> > wrote: > >> >> > >> >> Prathamesh Kulkarni w

[C++ PATCH take #2] PR c++/96442: Improved error recovery in enumerations.

2022-06-05 Thread Roger Sayle
Hi Jason, My apologies for the long delay, but I've finally got around to implementing your suggested improvements (implied by your review): https://gcc.gnu.org/pipermail/gcc-patches/2022-March/591504.html of my patch for PR c++/96442: https://gcc.gnu.org/pipermail/gcc-patches/2022-February/590716