Re: [PATCH] x86: Shrink writing 0/-1 to memory using and/or with -Oz.

2021-12-22 Thread Uros Bizjak via Gcc-patches
On Tue, Dec 21, 2021 at 4:08 PM Roger Sayle wrote: > > > This is the second part of my fix to PR target/103773 where -Oz shouldn't > use push/pop on x86 to shrink writing small integer constants to memory. > Instead clang uses "andl $0, mem" for writing zero, and "orl $-1, mem" > when writing -1 t

Re: [PATCH] PR target/103773: Fix wrong-code with -Oz from pop to memory.

2021-12-22 Thread Uros Bizjak via Gcc-patches
On Tue, Dec 21, 2021 at 1:27 PM Roger Sayle wrote: > > > My apologies for the inconvenience. The new support for -Oz using > push/pop for small integer constants on x86_64 is only a win/correct > for loading registers. Fixed by adding !MEM_P tests in the appropriate > locations. > > This patch h

Re: [PATCH] PR target/103773: Fix wrong-code with -Oz from pop to memory.

2021-12-22 Thread Uros Bizjak via Gcc-patches
On Wed, Dec 22, 2021 at 9:10 AM Uros Bizjak wrote: > > On Tue, Dec 21, 2021 at 1:27 PM Roger Sayle > wrote: > > > > > > My apologies for the inconvenience. The new support for -Oz using > > push/pop for small integer constants on x86_64 is only a win/correct > > for loading registers. Fixed by

Re: vxworks libstdc++ locale

2021-12-22 Thread Rasmus Villemoes via Gcc-patches
On 21/12/2021 16.42, Rasmus Villemoes wrote: > Hi > > While trying to upgrade our vxworks 5.5 compiler to gcc12, I've hit a > problem when loading the libstdc++ module on target. It manifests as > > [00] tShell memPartFree: invalid block 8bf72c in partition 9605dc. > [00] tShell m

RE: [PATCH] PR target/103773: Fix wrong-code with -Oz from pop to memory.

2021-12-22 Thread Roger Sayle
Hi Uros, Would you consider the following variant that disables this optimization when a red zone is used by the current function? You're right that cfun's red_zone_size is recalculated dynamically, but ix86_red_zone_used should be a better "gate" given that this logic resides very late during c

[PATCH][pushed] docs: Unify instruct set name.

2021-12-22 Thread Martin Liška
gcc/ChangeLog: * doc/extend.texi: Use uppercase letters for SSEx. --- gcc/doc/extend.texi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gcc/doc/extend.texi b/gcc/doc/extend.texi index f52384f7629..a15c4fe9b33 100644 --- a/gcc/doc/extend.texi +++ b/gcc/doc/extend

Re: [PATCH] PR target/103773: Fix wrong-code with -Oz from pop to memory.

2021-12-22 Thread Uros Bizjak via Gcc-patches
On Wed, Dec 22, 2021 at 10:26 AM Roger Sayle wrote: > > > Hi Uros, > Would you consider the following variant that disables this optimization when > a > red zone is used by the current function? You're right that cfun's > red_zone_size is > recalculated dynamically, but ix86_red_zone_used shoul

[PATCH][GCC] aarch64: fix: ls64 tests fail on aarch64-linux-gnu_ilp32 [PR103729]

2021-12-22 Thread Przemyslaw Wirkus via Gcc-patches
This patch is sorting issue with LS64 intrinsics tests failing with aarch64-linux-gnu_ilp32 target. Regtested on aarch64-linux-gnu_ilp32, aarch64-elf and aarch64_be-elf and no issues. OK to install? gcc/ChangeLog: PR target/103729 * config/aarch64/aarch64-builtin

[PATCH][pushed] docs: use ';' for function declarations.

2021-12-22 Thread Martin Liška
Pushed as obvious, it makes the documentation more consistent. Martin gcc/ChangeLog: * doc/extend.texi: Unify all function declarations in examples where some miss trailing ';'. --- gcc/doc/extend.texi | 2973 +-- 1 file changed, 1483 ins

Re: [PATCH] PR target/103773: Fix wrong-code with -Oz from pop to memory.

2021-12-22 Thread Uros Bizjak via Gcc-patches
On Wed, Dec 22, 2021 at 11:26 AM Uros Bizjak wrote: > > On Wed, Dec 22, 2021 at 10:26 AM Roger Sayle > wrote: > > > > > > Hi Uros, > > Would you consider the following variant that disables this optimization > > when a > > red zone is used by the current function? You're right that cfun's > >

Re: [patch, Fortran] Make REAL(KIND=16) detection more robust

2021-12-22 Thread FX via Gcc-patches
Thanks Thomas, pushed as 228173565eafbe34e44c1600c32e32a323eb5aab 228173565eafbe34e44c1600c32e32a323eb5aab.patch Description: Binary data

[PATCH] Fix typo in type verification.

2021-12-22 Thread Martin Liška
Hello. The patch is quite obvious fix. Patch can bootstrap on x86_64-linux-gnu and survives regression tests. Ready to be installed? Thanks, Martin PR ipa/103786 gcc/ChangeLog: * tree.c (verify_type): Fix typo. --- gcc/tree.c | 2 +- 1 file changed, 1 insertion(+), 1 deletio

[PATCH] docs: replace http:// with https://

2021-12-22 Thread Martin Liška
I replaced and verified http:// links for various domains. Ready to be installed? Tahnks, Martin gcc/ada/ChangeLog: * doc/share/gnu_free_documentation_license.rst: Replace http:// with https. * gnat-style.texi: Likewise. * gnat_rm.texi: Likewise. * gnat_ugn.texi

[OG11][PATCH] OpenMP: Ensure that offloaded variables are public

2021-12-22 Thread Andrew Stubbs
This is now backported to the devel/omp/gcc-11 branch (OG11). Andrew On 09/12/2021 11:41, Andrew Stubbs wrote: On 02/12/2021 16:43, Jakub Jelinek wrote: On Thu, Dec 02, 2021 at 04:31:36PM +, Andrew Stubbs wrote: On 02/12/2021 16:05, Andrew Stubbs wrote: On 02/12/2021 12:58, Jakub Jelinek

Re: [PATCH] docs: replace http:// with https://

2021-12-22 Thread Iain Buclaw via Gcc-patches
Excerpts from Martin Liška's message of Dezember 22, 2021 1:57 pm: > I replaced and verified http:// links for various domains. > > Ready to be installed? > Tahnks, > Martin > Hi, > gcc/d/ChangeLog: > > * gdc.texi: Replace http:// with https. > > --- > gcc/d/gdc.texi

Re: [PATCH 1/2][GCC] arm: Move arm_simd_info array declaration into header

2021-12-22 Thread Richard Earnshaw via Gcc-patches
On 24/11/2021 12:18, Richard Earnshaw via Gcc-patches wrote: On 24/11/2021 12:15, Murray Steele wrote: On 18/11/2021 15:40, Richard Earnshaw wrote: On 16/11/2021 10:14, Murray Steele via Gcc-patches wrote: Hi all, This patch moves the arm_simd_type and arm_type_qualifiers enums, and ar

Re: [PATCH v3 2/2][GCC] arm: Declare MVE types internally via pragma

2021-12-22 Thread Richard Earnshaw via Gcc-patches
On 09/12/2021 15:24, Murray Steele via Gcc-patches wrote: Changes from original patch: 1. Make mentioned changes to changelog. 2. Add namespace-end comments. 3. Add #error for when arm-mve-builtins.def is included without defining DEF_MVE_TYPE. 4. Make placement of '#undef DEF_MVE_TYPE' c

[PATCH][GCC] arm: fix __arm_vld1q_z* and __arm_vst1q_p* intrinsics.

2021-12-22 Thread Murray Steele via Gcc-patches
Hi All, This patch fixes the implementation of the existing __arm_vld1q_z* and __arm_vst1q_p* MVE intrinsic functions. The MVE ACLE allows for __ARM_MVE_PRESERVE_USER_NAMESPACE to be defined, which removes definitions for intrinsic functions without the __arm_ prefix. __arm_vld1q_z* and __arm_vst

Re: [PATCH][GCC] arm: fix __arm_vld1q_z* and __arm_vst1q_p* intrinsics.

2021-12-22 Thread Richard Earnshaw via Gcc-patches
On 22/12/2021 15:55, Murray Steele via Gcc-patches wrote: > Hi All, > > This patch fixes the implementation of the existing __arm_vld1q_z* and > __arm_vst1q_p* MVE intrinsic functions. > > The MVE ACLE allows for __ARM_MVE_PRESERVE_USER_NAMESPACE to be defined, > which removes definitions for int

Re: [PATCH] Fix typo in type verification.

2021-12-22 Thread Richard Biener via Gcc-patches
On December 22, 2021 1:03:18 PM GMT+01:00, "Martin Liška" wrote: >Hello. > >The patch is quite obvious fix. > >Patch can bootstrap on x86_64-linux-gnu and survives regression tests. > >Ready to be installed? Ok. Richard. >Thanks, >Martin > > PR ipa/103786 > >gcc/ChangeLog: > > *

Re: [PATCH][GCC] arm: fix __arm_vld1q_z* and __arm_vst1q_p* intrinsics.

2021-12-22 Thread Murray Steele via Gcc-patches
Hi, On 22/12/2021 16:04, Richard Earnshaw wrote: > > Is there a PR in bugzilla for this? > > R. > No, not at this time. It's something I came across whilst making changes of my own. For completeness, the ACLE specification I am referencing has been added below [1]. [1]: https://github.com/

[PATCH] c++: hard error w/ ptr+CST and incomplete type [PR103700]

2021-12-22 Thread Patrick Palka via Gcc-patches
In pointer_int_sum when called from a SFINAE context, we need to avoid calling size_in_bytes_loc on an incomplete pointed-to type since this latter function isn't SFINAE-friendly and always emits an error in this case. Bootstrapped and regtested on x86_64-pc-linux-gnu, does this look OK for trunk

Re: [PATCH] c++: hard error w/ ptr+CST and incomplete type [PR103700]

2021-12-22 Thread Jason Merrill via Gcc-patches
On 12/22/21 12:39, Patrick Palka wrote: In pointer_int_sum when called from a SFINAE context, we need to avoid calling size_in_bytes_loc on an incomplete pointed-to type since this latter function isn't SFINAE-friendly and always emits an error in this case. Bootstrapped and regtested on x86_64-

[PATCH] libsanitizer: Fix setbuffer() interceptor (accept size not mode)

2021-12-22 Thread Azat Khuzhin via Gcc-patches
Fixes: b667dd7017a ("Libsanitizer merge from trunk r368656.") Refs: https://reviews.llvm.org/D116176 --- .../sanitizer_common/sanitizer_common_interceptors.inc | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/libsanitizer/sanitizer_common/sanitizer_common_interceptors

Re: [PATCH] libsanitizer: Fix setbuffer() interceptor (accept size not mode)

2021-12-22 Thread Bernhard Reutner-Fischer via Gcc-patches
On 22 December 2021 19:19:12 CET, Azat Khuzhin via Gcc-patches wrote: >Fixes: b667dd7017a ("Libsanitizer merge from trunk r368656.") >Refs: https://reviews.llvm.org/D116176 >--- > .../sanitizer_common/sanitizer_common_interceptors.inc | 7 --- > 1 file changed, 4 insertions(+), 3 deletions

Re: [PATCH] libsanitizer: Fix setbuffer() interceptor (accept size not mode)

2021-12-22 Thread Azat Khuzhin via Gcc-patches
On Wed, Dec 22, 2021 at 09:41:06PM +0100, Bernhard Reutner-Fischer wrote: > On 22 December 2021 19:19:12 CET, Azat Khuzhin via Gcc-patches > wrote: > >Fixes: b667dd7017a ("Libsanitizer merge from trunk r368656.") > >Refs: https://reviews.llvm.org/D116176 > >--- > > .../sanitizer_common/sanitizer_

[PATCH v2] libsanitizer: Fix setbuffer() interceptor (accept size not mode)

2021-12-22 Thread Azat Khuzhin via Gcc-patches
Fixes: b667dd7017a ("Libsanitizer merge from trunk r368656.") Refs: https://reviews.llvm.org/D116176 --- .../sanitizer_common/sanitizer_common_interceptors.inc | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/libsanitizer/sanitizer_common/sanitizer_common_interceptors

Re: [PATCH] libsanitizer: Fix setbuffer() interceptor (accept size not mode)

2021-12-22 Thread Azat Khuzhin via Gcc-patches
On Wed, Dec 22, 2021 at 09:41:06PM +0100, Bernhard Reutner-Fischer wrote: > On 22 December 2021 19:19:12 CET, Azat Khuzhin via Gcc-patches > wrote: > >- COMMON_INTERCEPTOR_ENTER(ctx, setbuffer, stream, buf, mode); > >+ COMMON_INTERCEPTOR_ENTER(ctx, setbuffer, stream, buf, size); > > REAL(setb

Re: [PATCH] libsanitizer: Fix setbuffer() interceptor (accept size not mode)

2021-12-22 Thread Bernhard Reutner-Fischer via Gcc-patches
On Wed, 22 Dec 2021 23:50:39 +0300 Azat Khuzhin wrote: > Thanks! you're welcome. You should state how you tested the patch. Please refer to https://gcc.gnu.org/contribute.html#testing thanks,

Re: [PATCH] libsanitizer: Fix setbuffer() interceptor (accept size not mode)

2021-12-22 Thread Azat Khuzhin via Gcc-patches
On Wed, Dec 22, 2021 at 10:02:02PM +0100, Bernhard Reutner-Fischer wrote: > You should state how you tested the patch. Please refer to > https://gcc.gnu.org/contribute.html#testing I though about this, but when gcc syncs changes with upstream [1], it does not syncs tests, even though they were the

[PATCH] rs6000: Fix an assertion in update_target_cost_per_stmt [PR103702]

2021-12-22 Thread Kewen.Lin via Gcc-patches
Hi, This patch is to fix one wrong assertion which is too aggressive. Vectorizer can do vec_construct costing for the vector type which only has one unit. For the failed case, the passed-in vector type is "vector(1) int", though it doesn't end up with any construction eventually. We have to han

[PATCH] rs6000: Disable MMA if no P9 VECTOR support [PR103627]

2021-12-22 Thread Kewen.Lin via Gcc-patches
Hi, As PR103627 shows, there is an unexpected case where !TARGET_VSX and TARGET_MMA co-exist. As ISA3.1 claims, SIMD is a requirement for MMA. By looking into the ICE, I noticed that the current MMA implementation depends on vector pairs load/store, but since we don't have a separated option to

[PATCH] rs6000: Move the hunk affecting VSX/ALTIVEC ahead [PR103627]

2021-12-22 Thread Kewen.Lin via Gcc-patches
Hi, There is one hunk checking for functions with target attribute/pragma have the same altivec abi as the one of main_target_opt, it can update both VSX and ALTIVEC flags. Meanwhile, we have some codes to check or warn for some isa flags related to VSX and ALTIVEC, that sit where the mentioned h

Re: [PATCH] i386: Enable intrinsics that convert float and bf16 data to each other.

2021-12-22 Thread Hongtao Liu via Gcc-patches
On Wed, Dec 22, 2021 at 11:28 AM Kong, Lingling via Gcc-patches wrote: > > Hi, > > > This patch is to enable intrinsics that convert float and bf16 data to each > other. > Ok for master? > Ok. > gcc/ChangeLog: > > * config/i386/avx512bf16intrin.h (_mm_cvtsbh_ss): Add new intrinsic. >

Re: [PATCH] [i386] Add define_insn_and_split for vpcmp{b, w, d, q} vpcmp{ph, ps, pd}.

2021-12-22 Thread Hongtao Liu via Gcc-patches
On Tue, Dec 21, 2021 at 2:27 PM liuhongt wrote: > > The purpose of those define_insn_and_split: > 1. Combine vpcmpuw and zero_extend into vpcmpuw. > 2. Canonicalize vpcmpuw pattern so CSE can replace duplicate vpcmpuw to just > kmov > 3. Use DImode as dest of zero_extend so cprop_hardreg can elim

[PATCH] fixed testcase riscv/pr103302.c

2021-12-22 Thread shihua
From: LiaoShihua because riscv32 not support __int128, so skip if -march=rv32*. gcc/testsuite\ChangeLog: * gcc.target/riscv/pr103302.c: skip if -march=rv32* --- gcc/testsuite/gcc.target/riscv/pr103302.c | 1 + 1 file changed, 1 insertion(+) diff --git a/gcc/testsuite/gcc.target

Re: [PATCH] fixed testcase riscv/pr103302.c

2021-12-22 Thread Andrew Pinski via Gcc-patches
On Wed, Dec 22, 2021 at 11:37 PM wrote: > > From: LiaoShihua > > because riscv32 not support __int128, so skip if -march=rv32*. > > gcc/testsuite\ChangeLog: > * gcc.target/riscv/pr103302.c: skip if -march=rv32* > --- > gcc/testsuite/gcc.target/riscv/pr103302.c | 1 + > 1 file cha