Re: [PATCH] Check if loading const from mem is faster

2022-03-08 Thread Richard Biener via Gcc-patches
On Wed, 9 Mar 2022, Jiufu Guo wrote: > > Hi! > > Richard Biener writes: > > > On Tue, 8 Mar 2022, Jiufu Guo wrote: > > > >> Jiufu Guo writes: > >> > >> Hi! > >> > >> > Hi Sehger, > >> > > >> > Segher Boessenkool writes: > >> > > >> >> On Tue, Mar 01, 2022 at 10:28:57PM +0800, Jiufu Guo wro

Re: [x86 PATCH] PR tree-optimization/98335: New peephole2 xorl;movb -> movzbl

2022-03-08 Thread Uros Bizjak via Gcc-patches
On Mon, Mar 7, 2022 at 12:51 PM Roger Sayle wrote: > > > Hi Uros, > > > Is there a reason that only inserts to DImode registers are implemented? > > IMO, these peepholes should also handle inserts to SImode. > > I wasn't able to construct a test case that produced a byte or word insert > into an S

Re: [PATCH v3] libgo: Don't use pt_regs member in mcontext_t

2022-03-08 Thread Sören Tempel via Gcc-patches
Ian Lance Taylor wrote: > Have you tested this in 32-bit mode? It does not look correct based > on the glibc definitions. Looking at glibc it seems that it ought to > be As stated in the commit message, I have only tested this on Alpine Linux ppc64le (which uses musl libc). Unfortunately, I don

Re: [PATCH] x86: Define LIBGCC2_UNWIND_ATTRIBUTE on ia32 [PR104781]

2022-03-08 Thread Richard Biener via Gcc-patches
On Tue, 8 Mar 2022, H.J. Lu wrote: > On Tue, Mar 8, 2022 at 9:35 AM Jakub Jelinek wrote: > > > > On Tue, Mar 08, 2022 at 08:09:25AM -0800, H.J. Lu wrote: > > > > Ok. So, what do you think about replacing the libgcc/ part of your > > > > patch > > > > with that > > > > /* __builtin_eh_return can

Re: [PATCH] simplify-rtx: Fix up SUBREG_PROMOTED_SET arguments [PR104839]

2022-03-08 Thread Richard Biener via Gcc-patches
On Tue, 8 Mar 2022, Jakub Jelinek wrote: > Hi! > > The following testcase is miscompiled on powerpc64le-linux at -O1 and higher > (except for -Og). The bug was introduced in r12-3252-gcad36f38576a6a7 > which for SIGN_EXTEND from SUBREG_PROMOTED_SIGNED_P SUBREG used > SUBREG_PROMOTED_SET (temp, 1

Re: [PATCH] Check if loading const from mem is faster

2022-03-08 Thread Jiufu Guo via Gcc-patches
Hi! Richard Biener writes: > On Tue, 8 Mar 2022, Jiufu Guo wrote: > >> Jiufu Guo writes: >> >> Hi! >> >> > Hi Sehger, >> > >> > Segher Boessenkool writes: >> > >> >> On Tue, Mar 01, 2022 at 10:28:57PM +0800, Jiufu Guo wrote: >> >>> Segher Boessenkool writes: >> >>> > No. insn_cost is onl

[PATCH] vect: fix out-of-bound access in supports_vec_convert_optab_p [PR 104851]

2022-03-08 Thread Xi Ruoyao via Gcc-patches
This should be obvious, OK for trunk? -- >8 -- Calling VECTOR_MODE_P with MAX_MACHINE_MODE has caused out-of-bound access. gcc/ PR tree-optimization/104851 * optabs-query.cc (supports_vec_convert_optab_p): Fix off-by-one error. --- gcc/optabs-query.cc | 2 +- 1 file cha

Re: [Patch] Fortran: Fix gfc_conv_gfc_desc_to_cfi_desc with NULL [PR104126]

2022-03-08 Thread Tobias Burnus
Hi Harald, On 08.03.22 22:44, Harald Anlauf wrote: Am 07.03.22 um 15:16 schrieb Tobias Burnus: Pre-remark: Related NULL, there some accepts-invalid issues, not addressed in this patch. See https://gcc.gnu.org/PR104819 This patch fixes an ICE (12 regression) with NULL() that has no MOLD argumen

Re: [PATCH] c, c++, c-family: -Wshift-negative-value and -Wshift-overflow* tweaks for -fwrapv and C++20+ [PR104711]

2022-03-08 Thread Jason Merrill via Gcc-patches
On 3/2/22 05:22, Jakub Jelinek wrote: Hi! As mentioned in the PR, different standards have different definition on what is an UB left shift. They all agree on out of bounds (including negative) shift count. The rules used by ubsan are: C99-C2x ((unsigned) x >> (uprecm1 - y)) != 0 then UB C++11-

Re: [PATCH] c++: naming a dependently-scoped template for CTAD [PR104641]

2022-03-08 Thread Jason Merrill via Gcc-patches
On 3/2/22 14:32, Patrick Palka wrote: In order to be able to perform CTAD for a dependently-scoped template such as A::B in the testcase below, we need to permit a typename-specifier to resolve to a template as per [dcl.type.simple]/2, at least when it appears in a CTAD-enabled context. This pat

Re: [PATCH] c++: detecting copy-init context during CTAD [PR102137]

2022-03-08 Thread Jason Merrill via Gcc-patches
On 3/8/22 17:17, Patrick Palka wrote: On Tue, 8 Mar 2022, Jason Merrill wrote: On 3/8/22 14:38, Patrick Palka wrote: On Tue, 8 Mar 2022, Jason Merrill wrote: On 3/8/22 11:36, Patrick Palka wrote: On Mon, 7 Mar 2022, Jason Merrill wrote: On 3/7/22 10:47, Patrick Palka wrote: On Fri, 4 Mar

Re: [PATCH] c++: Wrong error with alias template in class tmpl [PR104108]

2022-03-08 Thread Jason Merrill via Gcc-patches
On 3/8/22 17:14, Marek Polacek wrote: In r10-6329 I tried to optimize the number of calls to v_d_e_p in convert_nontype_argument by remembering whether the expression was value-dependent in a bool flag. I did that wrongly assuming that its value-dependence will not be changed by build_converted_

Re: [PATCH] c++: non-constant non-dependent decltype folding [PR104823]

2022-03-08 Thread Jason Merrill via Gcc-patches
On 3/8/22 16:57, Patrick Palka wrote: On Tue, 8 Mar 2022, Jason Merrill wrote: On 3/8/22 12:54, Patrick Palka wrote: On Mon, 7 Mar 2022, Jason Merrill wrote: On 3/7/22 14:41, Patrick Palka wrote: instantiate_non_dependent_expr_sfinae instantiates only potentially constant expressions Hm

Re: [PATCH] c++: merge default targs for function templates [PR65396]

2022-03-08 Thread Jason Merrill via Gcc-patches
On 3/3/22 16:06, Patrick Palka wrote: We currently merge default template arguments for class templates, but not for function templates. This patch fixes this by splitting out the argument merging logic in redeclare_class_template into a separate function and using it in duplicate_decls as well.

Re: [Patch] Fortran: Fix gfc_maybe_dereference_var [PR104430]

2022-03-08 Thread Harald Anlauf via Gcc-patches
Hi Tobias, Am 08.03.22 um 21:19 schrieb Tobias Burnus: PS: Can I make you review my two pending patches? (NULL and SIZEOF) ;-) I just approved the former one, but rather hope that Paul or Mikael or somebody else would jump in on the other one. PPS: I lost a bit track working on other things

Go patch committed: ignore function type result name in export data

2022-03-08 Thread Ian Lance Taylor via Gcc-patches
This patch to the Go frontend ignores the function type result name when producing export data. This change ensures that we never output a result name in the export data if there is only a single result. Previously we would output a ? if the single result had a name. That made the output unstable

[PATCH] ipa-cp: Avoid adjusting references through self-recursion (PR 104813)

2022-03-08 Thread Martin Jambor
Hi, when writing the patch that downgrades address-taken references to load references when IPA-CP can prove that all uses of the taken address ends up in loads, I unfortunately did not take into account that find_more_scalar_values_for_callers_subset now happily adds self-recursive edges to the s

Re: [Patch] Fortran: Fix gfc_conv_gfc_desc_to_cfi_desc with NULL [PR104126]

2022-03-08 Thread Harald Anlauf via Gcc-patches
Hi Tobias, Am 07.03.22 um 15:16 schrieb Tobias Burnus: Pre-remark: Related NULL, there some accepts-invalid issues, not addressed in this patch. See https://gcc.gnu.org/PR104819 This patch fixes an ICE (12 regression) with NULL() that has no MOLD argument. the patch does fix the ICE. But giv

Re: [PATCH] c++: detecting copy-init context during CTAD [PR102137]

2022-03-08 Thread Patrick Palka via Gcc-patches
On Tue, 8 Mar 2022, Jason Merrill wrote: > On 3/8/22 14:38, Patrick Palka wrote: > > On Tue, 8 Mar 2022, Jason Merrill wrote: > > > > > On 3/8/22 11:36, Patrick Palka wrote: > > > > On Mon, 7 Mar 2022, Jason Merrill wrote: > > > > > > > > > On 3/7/22 10:47, Patrick Palka wrote: > > > > > > On Fr

[PATCH] c++: Wrong error with alias template in class tmpl [PR104108]

2022-03-08 Thread Marek Polacek via Gcc-patches
In r10-6329 I tried to optimize the number of calls to v_d_e_p in convert_nontype_argument by remembering whether the expression was value-dependent in a bool flag. I did that wrongly assuming that its value-dependence will not be changed by build_converted_constant_expr. This testcase shows that

Re: Ping: [PATCH] PR target/102059 Fix inline of target specific functions

2022-03-08 Thread Michael Meissner via Gcc-patches
On Tue, Mar 08, 2022 at 11:28:03AM -0600, Segher Boessenkool wrote: > On Fri, Feb 11, 2022 at 12:53:07PM -0500, Michael Meissner wrote: > > Ping patch for PR target/102059 to ignore implicit -mpower8-fusion that > > prevents a function targeting power9 or power10 from inlining a function > > that

[PATCH, committed] PR fortran/104811 - maxloc/minloc cannot accept character arguments without `dim` optional argument

2022-03-08 Thread Harald Anlauf via Gcc-patches
Dear all, frontend-optimization of MINLOC/MAXLOC tries to generate code for rank-1 arrays that may be expanded inline later and optimzed. Except when the argument is a character array... As there is even a comment in trans-intrinsic.cc that we will call a library function for character arguments

Re: [PATCH] c++: non-constant non-dependent decltype folding [PR104823]

2022-03-08 Thread Patrick Palka via Gcc-patches
On Tue, 8 Mar 2022, Jason Merrill wrote: > On 3/8/22 12:54, Patrick Palka wrote: > > > > > > On Mon, 7 Mar 2022, Jason Merrill wrote: > > > > > On 3/7/22 14:41, Patrick Palka wrote: > > > > instantiate_non_dependent_expr_sfinae instantiates only potentially > > > > constant expressions > > > >

Re: [Patch] Fortran: Fix gfc_maybe_dereference_var [PR104430]

2022-03-08 Thread Tobias Burnus
Hi Harald, On 07.03.22 20:58, Harald Anlauf wrote: I think there are other PRs which profit from this fix. Can you please have a look at PR99585, and in particular the link in comment#0? ;-) Good pointer – the testcase looks nearly identical and it is indeed fixed. I included it in addition

Re: [PATCH] c++: detecting copy-init context during CTAD [PR102137]

2022-03-08 Thread Jason Merrill via Gcc-patches
On 3/8/22 14:38, Patrick Palka wrote: On Tue, 8 Mar 2022, Jason Merrill wrote: On 3/8/22 11:36, Patrick Palka wrote: On Mon, 7 Mar 2022, Jason Merrill wrote: On 3/7/22 10:47, Patrick Palka wrote: On Fri, 4 Mar 2022, Jason Merrill wrote: On 3/4/22 14:24, Patrick Palka wrote: Here we're fa

[Patch] Fortran: Fix CLASS handling in SIZEOF intrinsic

2022-03-08 Thread Tobias Burnus
Fix SIZEOF handling. I have to admit that I do understand what the current code does, but do not understand what the previous code did. However, it still passes the testsuite - and also some code which did ICE now compiles :-) While writing the testcase, I did find two issues: * Passing a CLASS

Re: [PING PATCH 2/3] rs6000: Move g++.dg powerpc PR tests to g++.target

2022-03-08 Thread Paul A. Clarke via Gcc-patches
Gentle ping. I am grateful for the initial review, but seek closure on the final couple of discussion items. Thanks! PC On Tue, Feb 22, 2022 at 07:56:40PM -0600, Paul A. Clarke via Gcc-patches wrote: > On Tue, Feb 22, 2022 at 06:41:45PM -0600, Segher Boessenkool wrote: > > On Mon, Feb 21, 2022 at

Re: [PING PATCH 3/3] rs6000: Move more g++.dg powerpc tests to g++.target

2022-03-08 Thread Paul A. Clarke via Gcc-patches
Ping. On Mon, Feb 21, 2022 at 03:17:47PM -0600, Paul A. Clarke via Gcc-patches wrote: > Also adjust DejaGnu directives, as specifically requiring "powerpc*-*-*" is no > longer required. > > 2021-02-21 Paul A. Clarke > > gcc/testsuite > * g++.dg/debug/dwarf2/const2.C: Move to g++.target/

Re: [PATCH v8 00/12] Add LoongArch support.

2022-03-08 Thread Richard Sandiford via Gcc-patches
Xi Ruoyao via Gcc-patches writes: > On Fri, 2022-03-04 at 15:17 +0800, xucheng...@loongson.cn wrote: > >> The binutils has been merged into trunk: >> https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=560b3fe208255ae909b4b1c88ba9c28b09043307 >> >> Note: We split -mabi= into -mabi=lp64d/f/s

Re: [PATCH v8 12/12] LoongArch Port: Add doc.

2022-03-08 Thread Richard Sandiford via Gcc-patches
xucheng...@loongson.cn writes: > From: chenglulu > > 2022-03-04 Chenghua Xu > Lulu Cheng > > * contrib/config-list.mk: Add LoongArch triplet. > * gcc/doc/install.texi: Add LoongArch options section. > * gcc/doc/invoke.texi: Add LoongArch options section. > *

Re: [PATCH] c++: Attribute deprecated/unavailable divergence

2022-03-08 Thread Jason Merrill via Gcc-patches
On 3/2/22 14:31, Marek Polacek wrote: Attributes deprecated and unavailable are largely the same, except that the former produces a warning whereas the latter produces an error. So is_late_template_attribute should treat them the same. Confirmed by Iain that this divergence is not intentional: <

Re: [PATCH] c++: Don't allow type-constraint auto(x) [PR104752]

2022-03-08 Thread Jason Merrill via Gcc-patches
On 3/2/22 14:31, Marek Polacek wrote: 104752 points out that template concept C = true; auto y = C auto(1); is ill-formed as per [dcl.type.auto.deduct]: "For an explicit type conversion, T is the specified type, which shall be auto." which doesn't allow type-constraint auto. Bootstrap

Re: [PATCH v8 08/12] LoongArch Port: libgcc

2022-03-08 Thread Andreas Schwab
On Mär 08 2022, Richard Sandiford via Gcc-patches wrote: >> + >> +.section .init,"ax",@progbits >> +.globl _init >> +.type _init,@function >> +_init: >> +addi.d $r3,$r3,-16 >> +st.d $r1,$r3,8 >> +addi.d $r3,$r3,16 >> +jirl$r0,$r1,0 >> + >> +.section

[pushed] Darwin: Address a translation comment [PR104552].

2022-03-08 Thread Iain Sandoe via Gcc-patches
This amends an error message to correct punctuation and a little better wording. bootstrapped on x86_64-darwin18, pushed to master, thanks, Iain Signed-off-by: Iain Sandoe PR translation/104552 gcc/ChangeLog: * config/host-darwin.cc (darwin_gt_pch_get_address): Amend t

[committed] analyzer: more test coverage of leak detection [PR99771]

2022-03-08 Thread David Malcolm via Gcc-patches
Successfully tested on x86_64-pc-linux-gnu. Pushed to trunk as r12-7541-gb7175f36812b32d3de242f15c065b9cb68e957a9. gcc/testsuite/ChangeLog: PR analyzer/99771 * gcc.dg/analyzer/leak-4.c: New test. Signed-off-by: David Malcolm --- gcc/testsuite/gcc.dg/analyzer/leak-4.c | 103 +

Re: [PATCH v8 11/12] LoongArch Port: gcc/testsuite

2022-03-08 Thread Richard Sandiford via Gcc-patches
xucheng...@loongson.cn writes: > diff --git a/gcc/testsuite/lib/target-supports.exp > b/gcc/testsuite/lib/target-supports.exp > index 737e1a8913b..843b508b010 100644 > --- a/gcc/testsuite/lib/target-supports.exp > +++ b/gcc/testsuite/lib/target-supports.exp > @@ -286,6 +286,10 @@ proc check_config

Re: [PATCH v8 08/12] LoongArch Port: libgcc

2022-03-08 Thread Richard Sandiford via Gcc-patches
xucheng...@loongson.cn writes: > diff --git a/libgcc/config/loongarch/crti.S b/libgcc/config/loongarch/crti.S > new file mode 100644 > index 000..27b7eab3626 > --- /dev/null > +++ b/libgcc/config/loongarch/crti.S > @@ -0,0 +1,43 @@ > +/* Copyright (C) 2021-2022 Free Software Foundation, Inc

Re: [PATCH v8 06/12] LoongArch Port: Builtin functions.

2022-03-08 Thread Richard Sandiford via Gcc-patches
xucheng...@loongson.cn writes: > +#ifndef _GCC_LOONGARCH_BASE_INTRIN_H > +#define _GCC_LOONGARCH_BASE_INTRIN_H > + > +#ifdef __cplusplus > +extern "C" { > +#endif > + > +typedef struct drdtime > +{ > + unsigned long dvalue; > + unsigned long dtimeid; > +} __drdtime_t; > + > +typedef struct rdtime

Re: [PATCH] c++: detecting copy-init context during CTAD [PR102137]

2022-03-08 Thread Patrick Palka via Gcc-patches
On Tue, 8 Mar 2022, Jason Merrill wrote: > On 3/8/22 11:36, Patrick Palka wrote: > > On Mon, 7 Mar 2022, Jason Merrill wrote: > > > > > On 3/7/22 10:47, Patrick Palka wrote: > > > > On Fri, 4 Mar 2022, Jason Merrill wrote: > > > > > > > > > On 3/4/22 14:24, Patrick Palka wrote: > > > > > > Here

Re: [PATCH] c++: non-constant non-dependent decltype folding [PR104823]

2022-03-08 Thread Jason Merrill via Gcc-patches
On 3/8/22 12:54, Patrick Palka wrote: On Mon, 7 Mar 2022, Jason Merrill wrote: On 3/7/22 14:41, Patrick Palka wrote: instantiate_non_dependent_expr_sfinae instantiates only potentially constant expressions Hmm, that now strikes me as a problematic interface, as we don't know whether what w

Re: [PATCH] c++: Don't suggest cdtor or conversion op identifiers in spelling hints [PR104806]

2022-03-08 Thread Jason Merrill via Gcc-patches
On 3/8/22 05:32, Jakub Jelinek wrote: On Tue, Mar 08, 2022 at 10:23:28AM +0100, Richard Biener wrote: On Tue, Mar 8, 2022 at 8:27 AM Jakub Jelinek via Gcc-patches On the following testcase, we emit "did you mean '__dt '?" in the error message. "__dt " shows there because it is dtor_identifier,

Re: [PATCH] mips: avoid signed overflow in LUI_OPERAND [PR104842]

2022-03-08 Thread Richard Sandiford via Gcc-patches
Xi Ruoyao writes: > I think this one obvious. Ok for trunk? OK, thanks. Richard > > gcc/ > > PR target/104842 > * config/mips/mips.h (LUI_OPERAND): Cast the input to an unsigned > value before adding an offset. > --- > gcc/config/mips/mips.h | 2 +- > 1 file changed, 1 inser

Re: [PATCH] contrib: Fix non-portable sed commands in gcc-descr [PR102664/]

2022-03-08 Thread Jakub Jelinek via Gcc-patches
On Tue, Mar 08, 2022 at 05:58:34PM +, Jonathan Wakely via Gcc-patches wrote: > This now works with Solaris /usr/xpg4/bin/sed and should work with BSD > sed too. > > OK for trunk? > > -- >8 -- > > POSIX sed does not support \? or \+ in its Basic Regular Expression > grammar. Replace the \(tag

[PATCH] contrib: Fix non-portable sed commands in gcc-descr [PR102664/]

2022-03-08 Thread Jonathan Wakely via Gcc-patches
This now works with Solaris /usr/xpg4/bin/sed and should work with BSD sed too. OK for trunk? -- >8 -- POSIX sed does not support \? or \+ in its Basic Regular Expression grammar. Replace the \(tags/\)\? part of the pattern with a substitution to remove ^tags/ before other substitutions. Replace

Re: [PATCH][RFC] tree-optimization/84201 - add --param vect-induction-float

2022-03-08 Thread Richard Sandiford via Gcc-patches
Richard Biener writes: > This adds a --param to allow disabling of vectorization of > floating point inductions. Ontop of -Ofast this should allow > 549.fotonik3d_r to not miscompare. > > While I thought of a more elaborate way of disabling certain > vectorization kinds (reductions also came to m

Re: [PATCH] x86: Define LIBGCC2_UNWIND_ATTRIBUTE on ia32 [PR104781]

2022-03-08 Thread H.J. Lu via Gcc-patches
On Tue, Mar 8, 2022 at 9:35 AM Jakub Jelinek wrote: > > On Tue, Mar 08, 2022 at 08:09:25AM -0800, H.J. Lu wrote: > > > Ok. So, what do you think about replacing the libgcc/ part of your patch > > > with that > > > /* __builtin_eh_return can't handle stack realignment, so disable SSE in > > >3

Re: [PATCH] x86: Define LIBGCC2_UNWIND_ATTRIBUTE on ia32 [PR104781]

2022-03-08 Thread H.J. Lu via Gcc-patches
On Tue, Mar 8, 2022 at 9:35 AM Jakub Jelinek wrote: > > On Tue, Mar 08, 2022 at 08:09:25AM -0800, H.J. Lu wrote: > > > Ok. So, what do you think about replacing the libgcc/ part of your patch > > > with that > > > /* __builtin_eh_return can't handle stack realignment, so disable SSE in > > >3

[PATCH v4] x86: Disallow unsupported EH return

2022-03-08 Thread H.J. Lu via Gcc-patches
Disallow stack realignment and regparm nested function with EH return since they don't work together. gcc/ PR target/104781 * config/i386/i386.cc (ix86_expand_epilogue): Sorry if there is stack realignment or regparm nested function with EH return. gcc/testsuite/

[PATCH] x86: Define LIBGCC2_UNWIND_ATTRIBUTE on ia32 [PR104781]

2022-03-08 Thread Jakub Jelinek via Gcc-patches
On Tue, Mar 08, 2022 at 08:09:25AM -0800, H.J. Lu wrote: > > Ok. So, what do you think about replacing the libgcc/ part of your patch > > with that > > /* __builtin_eh_return can't handle stack realignment, so disable SSE in > >32-bit libgcc functions that call it. */ > > #ifndef __x86_64__ >

Re: Ping: [PATCH] PR target/102059 Fix inline of target specific functions

2022-03-08 Thread Segher Boessenkool
On Fri, Feb 11, 2022 at 12:53:07PM -0500, Michael Meissner wrote: > Ping patch for PR target/102059 to ignore implicit -mpower8-fusion that > prevents a function targeting power9 or power10 from inlining a function that > declared it needed power8 via attribute/pragma target. Can we just disable a

[PATCH] mips: avoid signed overflow in LUI_OPERAND [PR104842]

2022-03-08 Thread Xi Ruoyao via Gcc-patches
I think this one obvious. Ok for trunk? gcc/ PR target/104842 * config/mips/mips.h (LUI_OPERAND): Cast the input to an unsigned value before adding an offset. --- gcc/config/mips/mips.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/config/mips/m

Re: [PATCH] c++: non-constant non-dependent decltype folding [PR104823]

2022-03-08 Thread Patrick Palka via Gcc-patches
On Mon, 7 Mar 2022, Jason Merrill wrote: > On 3/7/22 14:41, Patrick Palka wrote: > > instantiate_non_dependent_expr_sfinae instantiates only potentially > > constant expressions > > Hmm, that now strikes me as a problematic interface, as we don't know whether > what we get back is template or

[committed] contrib: Fix gcc-descr script [PR102664]

2022-03-08 Thread Jonathan Wakely via Gcc-patches
Pushed to trunk. -- >8 -- POSIX expr does not support the 'match' keyword, so the git-descr.sh scripts should use ':' instead. contrib/ChangeLog: PR other/102664 * git-descr.sh: Use portable form of expr match. --- contrib/git-descr.sh | 2 +- 1 file changed, 1 insertion(+), 1

RE: [aarch64] Enable FP16 feature by default for Armv9

2022-03-08 Thread Kyrylo Tkachov via Gcc-patches
> -Original Message- > From: Andre Vieira (lists) > Sent: Tuesday, March 8, 2022 3:20 PM > To: gcc-patches@gcc.gnu.org > Cc: Richard Sandiford ; Kyrylo Tkachov > > Subject: [aarch64] Enable FP16 feature by default for Armv9 > > Hi all, > > This patch adds the feature bit for FP16 to t

Re: [PATCH v2] rtl: ICE with thread_local and inline asm [PR104777]

2022-03-08 Thread Jakub Jelinek via Gcc-patches
On Tue, Mar 08, 2022 at 11:33:59AM -0500, Marek Polacek wrote: > PR rtl-optimization/104777 > > gcc/ChangeLog: > > * rtl.cc (classify_insn): For ASM_OPERANDS, return JUMP_INSN only if > ASM_OPERANDS_LABEL_VEC has at least one element. > > gcc/testsuite/ChangeLog: > > * g

[PATCH v2] rtl: ICE with thread_local and inline asm [PR104777]

2022-03-08 Thread Marek Polacek via Gcc-patches
On Tue, Mar 08, 2022 at 10:24:50AM -0600, Segher Boessenkool wrote: > On Tue, Mar 08, 2022 at 05:12:43PM +0100, Jakub Jelinek wrote: > > On Tue, Mar 08, 2022 at 09:49:15AM -0600, Segher Boessenkool wrote: > > > > But like I said above, even if we didn't copy these XVECLEN 0 rtvecs, > > > > the cras

Re: [PATCH] rtl: ICE with thread_local and inline asm [PR104777]

2022-03-08 Thread Segher Boessenkool
On Tue, Mar 08, 2022 at 05:12:43PM +0100, Jakub Jelinek wrote: > On Tue, Mar 08, 2022 at 09:49:15AM -0600, Segher Boessenkool wrote: > > > But like I said above, even if we didn't copy these XVECLEN 0 rtvecs, > > > the crash would not go away. > > > > An rtvec should never have length 0. Look at

Re: [PATCH] c++: detecting copy-init context during CTAD [PR102137]

2022-03-08 Thread Jason Merrill via Gcc-patches
On 3/8/22 11:36, Patrick Palka wrote: On Mon, 7 Mar 2022, Jason Merrill wrote: On 3/7/22 10:47, Patrick Palka wrote: On Fri, 4 Mar 2022, Jason Merrill wrote: On 3/4/22 14:24, Patrick Palka wrote: Here we're failing to communicate to cp_finish_decl from tsubst_expr that we're in a copy-initi

Re: [PATCH] rtl: ICE with thread_local and inline asm [PR104777]

2022-03-08 Thread Marek Polacek via Gcc-patches
On Tue, Mar 08, 2022 at 05:12:43PM +0100, Jakub Jelinek wrote: > On Tue, Mar 08, 2022 at 09:49:15AM -0600, Segher Boessenkool wrote: > > > But like I said above, even if we didn't copy these XVECLEN 0 rtvecs, > > > the crash would not go away. > > > > An rtvec should never have length 0. Look at

Re: [PATCH] rtl: ICE with thread_local and inline asm [PR104777]

2022-03-08 Thread Jakub Jelinek via Gcc-patches
On Tue, Mar 08, 2022 at 09:49:15AM -0600, Segher Boessenkool wrote: > > But like I said above, even if we didn't copy these XVECLEN 0 rtvecs, > > the crash would not go away. > > An rtvec should never have length 0. Look at gen_rtvec for another > example. That is not true. In case of ASM_OPERA

Re: [PATCH v3] x86: Disable SSE on unwind-c.c and unwind-dw2.c

2022-03-08 Thread H.J. Lu via Gcc-patches
On Tue, Mar 8, 2022 at 7:46 AM Jakub Jelinek wrote: > > On Tue, Mar 08, 2022 at 07:37:17AM -0800, H.J. Lu wrote: > > > Though, perhaps it should be > > > #ifndef __x86_64__ > > > #define LIBGCC2_UNWIND_ATTRIBUTE __attribute__((target ("no-sse"))) > > > #endif > > > or something similar, on x86-64

Re: [PATCH] rtl: ICE with thread_local and inline asm [PR104777]

2022-03-08 Thread Marek Polacek via Gcc-patches
On Tue, Mar 08, 2022 at 09:49:15AM -0600, Segher Boessenkool wrote: > On Tue, Mar 08, 2022 at 10:25:45AM -0500, Marek Polacek wrote: > > On Tue, Mar 08, 2022 at 09:14:56AM -0600, Segher Boessenkool wrote: > > > On Tue, Mar 08, 2022 at 10:08:25AM -0500, Marek Polacek wrote: > > > > ...I don't see th

Re: Porting the Docs to Sphinx - project status

2022-03-08 Thread Martin Liška
On 2/4/22 14:40, Matthias Klose wrote: On 1/31/22 15:06, Martin Liška wrote: Hello. It's about 5 months since the last project status update: https://gcc.gnu.org/pipermail/gcc-patches/2021-August/577108.html Now it's pretty clear that it won't be merged before GCC 12.1 gets released. So where

[PATCH] simplify-rtx: Fix up SUBREG_PROMOTED_SET arguments [PR104839]

2022-03-08 Thread Jakub Jelinek via Gcc-patches
Hi! The following testcase is miscompiled on powerpc64le-linux at -O1 and higher (except for -Og). The bug was introduced in r12-3252-gcad36f38576a6a7 which for SIGN_EXTEND from SUBREG_PROMOTED_SIGNED_P SUBREG used SUBREG_PROMOTED_SET (temp, 1) (but that makes temp SUBREG_PROMOTED_UNSIGNED_P beca

Re: [PATCH] rtl: ICE with thread_local and inline asm [PR104777]

2022-03-08 Thread Segher Boessenkool
On Tue, Mar 08, 2022 at 10:25:45AM -0500, Marek Polacek wrote: > On Tue, Mar 08, 2022 at 09:14:56AM -0600, Segher Boessenkool wrote: > > On Tue, Mar 08, 2022 at 10:08:25AM -0500, Marek Polacek wrote: > > > ...I don't see that. In fact copy_rtx does the same thing as > > > copy_insn: > > > > > >

Re: [PATCH v3] x86: Disable SSE on unwind-c.c and unwind-dw2.c

2022-03-08 Thread Jakub Jelinek via Gcc-patches
On Tue, Mar 08, 2022 at 07:37:17AM -0800, H.J. Lu wrote: > > Though, perhaps it should be > > #ifndef __x86_64__ > > #define LIBGCC2_UNWIND_ATTRIBUTE __attribute__((target ("no-sse"))) > > #endif > > or something similar, on x86-64 one at least normally doesn't use lower > > stack realignment unles

Re: [PATCH v2] Add TARGET_MOVE_WITH_MODE_P

2022-03-08 Thread H.J. Lu via Gcc-patches
On Mon, Mar 7, 2022 at 5:45 AM Richard Biener wrote: > > On Wed, Mar 2, 2022 at 10:18 PM H.J. Lu wrote: > > > > On Wed, Mar 02, 2022 at 09:51:26AM +0100, Richard Biener wrote: > > > On Tue, Mar 1, 2022 at 11:41 PM H.J. Lu via Gcc-patches > > > wrote: > > > > > > > > Add TARGET_FOLD_MEMCPY_MAX fo

Re: [PATCH v3] x86: Disable SSE on unwind-c.c and unwind-dw2.c

2022-03-08 Thread H.J. Lu via Gcc-patches
On Tue, Mar 8, 2022 at 4:29 AM Jakub Jelinek wrote: > > On Tue, Mar 08, 2022 at 12:15:15PM +0100, Jakub Jelinek via Gcc-patches wrote: > > > --- gcc/config/i386/i386.h.jj 2022-02-25 12:06:45.535493490 +0100 > > > +++ gcc/config/i386/i386.h 2022-03-08 11:20:43.207043370 +0100 > > > @@ -2848,

Re: [PATCH] c++: detecting copy-init context during CTAD [PR102137]

2022-03-08 Thread Patrick Palka via Gcc-patches
On Mon, 7 Mar 2022, Jason Merrill wrote: > On 3/7/22 10:47, Patrick Palka wrote: > > On Fri, 4 Mar 2022, Jason Merrill wrote: > > > > > On 3/4/22 14:24, Patrick Palka wrote: > > > > Here we're failing to communicate to cp_finish_decl from tsubst_expr > > > > that we're in a copy-initialization co

Re: [PATCH] rtl: ICE with thread_local and inline asm [PR104777]

2022-03-08 Thread Marek Polacek via Gcc-patches
On Tue, Mar 08, 2022 at 09:14:56AM -0600, Segher Boessenkool wrote: > Hi! > > On Tue, Mar 08, 2022 at 10:08:25AM -0500, Marek Polacek wrote: > > On Mon, Mar 07, 2022 at 07:19:09PM -0600, Segher Boessenkool wrote: > > > On Mon, Mar 07, 2022 at 07:03:17PM -0500, Marek Polacek via Gcc-patches > > >

[aarch64] Enable FP16 feature by default for Armv9

2022-03-08 Thread Andre Vieira (lists) via Gcc-patches
Hi all, This patch adds the feature bit for FP16 to the feature set for Armv9 since Armv9 requires SVE to be implemented and SVE requires FP16 to be implemented. 2022-03-04  Andre Vieira      * config/aarch64/aarch64.h (AARCH64_FL_FOR_ARCH9): Add FP16 feature bit. diff --git a/gcc/conf

[aarch64] update reg-costs to include predicate move costs

2022-03-08 Thread Andre Vieira (lists) via Gcc-patches
Hi, This patch adds predicate move costs to several SVE enabled cores. 2022-02-25  Tamar Christina     Andre Vieira gcc/ChangeLog:     * config/aarch64/aarch64-protos.h (struct cpu_regmove_cost): Add PR2PR member.     * config/aarch64/aarch64.cc (aarch64_registe

Re: [PATCH] rtl: ICE with thread_local and inline asm [PR104777]

2022-03-08 Thread Segher Boessenkool
Hi! On Tue, Mar 08, 2022 at 10:08:25AM -0500, Marek Polacek wrote: > On Mon, Mar 07, 2022 at 07:19:09PM -0600, Segher Boessenkool wrote: > > On Mon, Mar 07, 2022 at 07:03:17PM -0500, Marek Polacek via Gcc-patches > > wrote: > > > In r270550, Jakub fixed classify_insn to handle asm goto: if the as

Re: [PATCH] rtl: ICE with thread_local and inline asm [PR104777]

2022-03-08 Thread Marek Polacek via Gcc-patches
On Mon, Mar 07, 2022 at 07:19:09PM -0600, Segher Boessenkool wrote: > On Mon, Mar 07, 2022 at 07:03:17PM -0500, Marek Polacek via Gcc-patches wrote: > > In r270550, Jakub fixed classify_insn to handle asm goto: if the asm can > > jump to a label, the insn should be a JUMP_INSN. > > > > However, as

Re: [PATCH][RFC] tree-optimization/84201 - add --param vect-induction-float

2022-03-08 Thread Richard Biener via Gcc-patches
On Tue, 8 Mar 2022, Jeff Law wrote: > > > On 3/8/2022 5:56 AM, Richard Biener via Gcc-patches wrote: > > This adds a --param to allow disabling of vectorization of > > floating point inductions. Ontop of -Ofast this should allow > > 549.fotonik3d_r to not miscompare. > > > > While I thought of

Re: [PATCH] PR tree-optimization/98335: Improvements to DSE's compute_trims.

2022-03-08 Thread Jeff Law via Gcc-patches
On 3/8/2022 3:10 AM, Richard Biener via Gcc-patches wrote: On Mon, Mar 7, 2022 at 11:04 AM Roger Sayle wrote: This patch is the main middle-end piece of a fix for PR tree-opt/98335, which is a code-quality regression affecting mainline. The issue occurs in DSE's (dead store elimination's)

Re: [PATCH][RFC] tree-optimization/84201 - add --param vect-induction-float

2022-03-08 Thread Jeff Law via Gcc-patches
On 3/8/2022 5:56 AM, Richard Biener via Gcc-patches wrote: This adds a --param to allow disabling of vectorization of floating point inductions. Ontop of -Ofast this should allow 549.fotonik3d_r to not miscompare. While I thought of a more elaborate way of disabling certain vectorization kin

[Patch] Fortran: OpenMP/OpenACC avoid uninit access in size calc for mapping

2022-03-08 Thread Tobias Burnus
Hi Thomas & Jakub, found when working on the deep-mapping patch* with OpenMP code (and part of that patch) but it already shows up in an existing OpenACC testcase. I think it makes sense to fix it already for GCC 12. Problem: Also for unallocated allocatables, their size was calculated - the 'if

Re: [PATCH] arm: Remove unused variable arm_binop_none_none_unone_qualifiers

2022-03-08 Thread Christophe Lyon via Gcc-patches
Hi, On 3/4/22 15:39, Christophe Lyon via Gcc-patches wrote: From: Christophe Lyon I went ahead and committed this patch after fixing my committer address (above); I hope this is obvious enough. Christophe Commits r12-7342 and r12-7344 made some cleanup, leaving arm_binop_none_none_unone_

Re: [PATCH v3] libgo: Don't use pt_regs member in mcontext_t

2022-03-08 Thread Rich Felker
On Mon, Mar 07, 2022 at 02:59:02PM -0800, Ian Lance Taylor wrote: > On Sun, Mar 6, 2022 at 11:11 PM wrote: > > > > +#ifdef __PPC64__ > > + ret.sigpc = ((ucontext_t*)(context))->uc_mcontext.gp_regs[32]; > > +#else > > + ret.sigpc = ((ucontext_t*)(context))->uc_mcontext.gregs[32]; > > +#

[PATCH][RFC] tree-optimization/84201 - add --param vect-induction-float

2022-03-08 Thread Richard Biener via Gcc-patches
This adds a --param to allow disabling of vectorization of floating point inductions. Ontop of -Ofast this should allow 549.fotonik3d_r to not miscompare. While I thought of a more elaborate way of disabling certain vectorization kinds (reductions also came to my mind) this for now simply uses a

[committed] libstdc++: Remove incorrect copyright notice from header

2022-03-08 Thread Jonathan Wakely via Gcc-patches
Tested powerpc64le-linux, pushed to trunk. Backport to gcc-11 to follow. -- >8 -- This file has the SGI copyright notice, but contains no code from the SGI STL. It was entirely written by me in 2019, originally as part of the header. When I extracted it into a new header I accidentally copied ac

Re: [PATCH v3] x86: Disable SSE on unwind-c.c and unwind-dw2.c

2022-03-08 Thread Eric Botcazou via Gcc-patches
> Disabling sse/sse2 might be a problem especially on mingw where we need to > restore SSE registers in the EH return, no? Not in 32-bit mode I think, all XMM registers are call used. -- Eric Botcazou

Re: [PATCH v3] x86: Disable SSE on unwind-c.c and unwind-dw2.c

2022-03-08 Thread Jakub Jelinek via Gcc-patches
On Tue, Mar 08, 2022 at 12:15:15PM +0100, Jakub Jelinek via Gcc-patches wrote: > > --- gcc/config/i386/i386.h.jj 2022-02-25 12:06:45.535493490 +0100 > > +++ gcc/config/i386/i386.h 2022-03-08 11:20:43.207043370 +0100 > > @@ -2848,6 +2848,10 @@ extern enum attr_cpu ix86_schedule; > > #define

Re: [PATCH] Check if loading const from mem is faster

2022-03-08 Thread Richard Biener via Gcc-patches
On Tue, 8 Mar 2022, Jiufu Guo wrote: > Jiufu Guo writes: > > Hi! > > > Hi Sehger, > > > > Segher Boessenkool writes: > > > >> On Tue, Mar 01, 2022 at 10:28:57PM +0800, Jiufu Guo wrote: > >>> Segher Boessenkool writes: > >>> > No. insn_cost is only for correct, existing instructions, not for

[PATCH 5/5] openmp: -foffload-memory=pinned

2022-03-08 Thread Hafiz Abid Qadeer
From: Andrew Stubbs Implement the -foffload-memory=pinned option such that libgomp is instructed to enable fully-pinned memory at start-up. The option is intended to provide a performance boost to certain offload programs without modifying the code. This feature only works on Linux, at present,

[PATCH 4/5] openmp: Use libgomp memory allocation functions with unified shared memory.

2022-03-08 Thread Hafiz Abid Qadeer
This patches changes calls to malloc/free/calloc/realloc and operator new to memory allocation functions in libgomp with allocator=ompx_unified_shared_mem_alloc. This helps existing code to benefit from the unified shared memory. The libgomp does the correct thing with all the mapping constructs

[PATCH 3/5] openmp, nvptx: ompx_unified_shared_mem_alloc

2022-03-08 Thread Hafiz Abid Qadeer
From: Andrew Stubbs This adds support for using Cuda Managed Memory with omp_alloc. It will be used as the underpinnings for "requires unified_shared_memory" in a later patch. There are two new predefined allocators, ompx_unified_shared_mem_alloc and ompx_host_mem_alloc, plus corresponding memo

[PATCH 2/5] openmp: allow requires unified_shared_memory

2022-03-08 Thread Hafiz Abid Qadeer
From: Andrew Stubbs This is the front-end portion of the Unified Shared Memory implementation. It removes the "sorry, unimplemented message" in C, C++, and Fortran, and sets flag_offload_memory, but is otherwise inactive, for now. It also checks that -foffload-memory isn't set to an incompatible

[PATCH 1/5] openmp: Add -foffload-memory

2022-03-08 Thread Hafiz Abid Qadeer
From: Andrew Stubbs Add a new option. It will be used in follow-up patches. gcc/ChangeLog: * common.opt: Add -foffload-memory and its enum values. * coretypes.h (enum offload_memory): New. * doc/invoke.texi: Document -foffload-memory. --- gcc/common.opt | 16 +

[PATCH 0/5] openmp: Handle pinned and unified shared memory.

2022-03-08 Thread Hafiz Abid Qadeer
This patch series add support for unified shared memory (USM) and pinned memory. The support in libgomp is for nvptx offloading only. A new command line option -foffload-memory allows user to choose either USM or pinned memory. The USM can also be enabled using requires construct. When USM us in

[PATCH][committed][testsuite] vect: disable bitmask tests on sparc

2022-03-08 Thread Tamar Christina via Gcc-patches
Hi All, These testcases declare requiring vect_int which sparc declares as well however sparc doesn't have an optab to vectorize comparisons so these testcases fail to vectorize and so the tests fail. As such best coure of action is to just skip them on sparc as comparisons are somewhat expected

Re: [PATCH] Check if loading const from mem is faster

2022-03-08 Thread Jiufu Guo via Gcc-patches
Jiufu Guo writes: Hi! > Hi Sehger, > > Segher Boessenkool writes: > >> On Tue, Mar 01, 2022 at 10:28:57PM +0800, Jiufu Guo wrote: >>> Segher Boessenkool writes: >>> > No. insn_cost is only for correct, existing instructions, not for >>> > made-up nonsense. I created insn_cost precisely to ge

Re: [PATCH v3] x86: Disable SSE on unwind-c.c and unwind-dw2.c

2022-03-08 Thread Jakub Jelinek via Gcc-patches
On Tue, Mar 08, 2022 at 11:23:51AM +0100, Jakub Jelinek via Gcc-patches wrote: > On Mon, Mar 07, 2022 at 07:06:28AM -0800, H.J. Lu wrote: > > Since eh_return doesn't work with stack realignment, disable SSE on > > unwind-c.c and unwind-dw2.c to avoid stack realignment with the 4-byte > > incoming s

[PATCH] params: Remove repeated word "that" in parameter description

2022-03-08 Thread Martin Jambor
Hi, One of the mistakes reported in PR 104552 is repeated "that" in description of ipa-cp-recursive-freq-factor which I introduced. This patch removes one of them. Added to a bootstrap and testing on x86_64-linux, which passed, committed as obvious. Thanks, Martin gcc/ChangeLog: 2022-03-07

Re: [PATCH] PR tree-optimization/98335: Improvements to DSE's compute_trims.

2022-03-08 Thread Richard Biener via Gcc-patches
On Tue, Mar 8, 2022 at 11:10 AM Richard Biener wrote: > > On Mon, Mar 7, 2022 at 11:04 AM Roger Sayle > wrote: > > > > > > This patch is the main middle-end piece of a fix for PR tree-opt/98335, > > which is a code-quality regression affecting mainline. The issue occurs > > in DSE's (dead store

Re: [PATCH] OpenMP, libgomp: Add new runtime routine omp_get_mapped_ptr.

2022-03-08 Thread Marcel Vollweiler
Hi Jakub, diff --git a/libgomp/libgomp.map b/libgomp/libgomp.map index 2ac5809..00a4858 100644 --- a/libgomp/libgomp.map +++ b/libgomp/libgomp.map @@ -224,6 +224,7 @@ OMP_5.1 { omp_set_teams_thread_limit_8_; omp_get_teams_thread_limit; omp_get_teams_thread_limit_; +omp_get_map

Re: [PATCH v3] x86: Disable SSE on unwind-c.c and unwind-dw2.c

2022-03-08 Thread Jakub Jelinek via Gcc-patches
On Mon, Mar 07, 2022 at 07:06:28AM -0800, H.J. Lu wrote: > Since eh_return doesn't work with stack realignment, disable SSE on > unwind-c.c and unwind-dw2.c to avoid stack realignment with the 4-byte > incoming stack to avoid SSE usage which is caused by > > commit 609e8c492d62d92465460eae3d43dfc4

Re: [PATCH] PR tree-optimization/98335: Improvements to DSE's compute_trims.

2022-03-08 Thread Richard Biener via Gcc-patches
On Mon, Mar 7, 2022 at 11:04 AM Roger Sayle wrote: > > > This patch is the main middle-end piece of a fix for PR tree-opt/98335, > which is a code-quality regression affecting mainline. The issue occurs > in DSE's (dead store elimination's) compute_trims function that determines > where a store t

Re: [PATCH] c++: Don't suggest cdtor or conversion op identifiers in spelling hints [PR104806]

2022-03-08 Thread Jakub Jelinek via Gcc-patches
On Tue, Mar 08, 2022 at 10:23:28AM +0100, Richard Biener wrote: > On Tue, Mar 8, 2022 at 8:27 AM Jakub Jelinek via Gcc-patches > > On the following testcase, we emit "did you mean '__dt '?" in the error > > message. "__dt " shows there because it is dtor_identifier, but we > > shouldn't suggest th

  1   2   >