RE: [PATCH][X86_64] Separate znver4 insn reservations from older znvers

2023-01-04 Thread Joshi, Tejas Sanjay via Gcc-patches
[Public] Hello, > OK, > thanks! > Honza Thanks! We have pushed the patch. Regards, Tejas

Re: [PATCH] rs6000: Don't use optimize_function_for_speed_p too early [PR108184]

2023-01-04 Thread Kewen.Lin via Gcc-patches
on 2023/1/4 22:02, Segher Boessenkool wrote: > Hi! > > On Wed, Jan 04, 2023 at 08:15:03PM +0800, Kewen.Lin wrote: >> on 2023/1/4 18:46, Segher Boessenkool wrote: @@ -25604,7 +25602,9 @@ rs6000_call_aix (rtx value, rtx func_desc, rtx tlsarg, rtx cookie) /* Can we optimize

[PATCH 1/1] Add link to gmplib.org

2023-01-04 Thread Benson Muite via Gcc-patches
Link is missing from install documentation Signed-off-by: Benson Muite --- gcc/doc/install.texi | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gcc/doc/install.texi b/gcc/doc/install.texi index ccc8d15fd08..18e8709a169 100644 --- a/gcc/doc/install.texi +++

[PATCH 0/1] Update installation docs with gmplib link

2023-01-04 Thread Benson Muite via Gcc-patches
Improved patch formatting Benson Muite (1): Add link to gmplib.org gcc/doc/install.texi | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- 2.39.0

Re: [PATCH] modula-2, driver: Implement handling for -static-libgm2.

2023-01-04 Thread Gaius Mulley via Gcc-patches
Iain Sandoe writes: > Hi Gaius, > >> On 4 Jan 2023, at 12:11, Gaius Mulley wrote: >> >> Iain Sandoe writes: >> >>> tested on x86_64-linux-gnu, x86_64,aarch64-darwin21, > >> >> yes LGTM - it was unimplemented - thanks! > > My apologies, when I came to apply this I realised that I posted the

Re: [PATCH 4/n] modula-2, driver: Handle static-libstd++ for targets without static/dynamic

2023-01-04 Thread Gaius Mulley via Gcc-patches
Iain Sandoe writes: > Oops pressed ‘send' too soon - this is part of the series for Darwin: > > There are several modula-2 issues on Darwin, some blocking bootstrap on > one or more system versions. > > This has been tested on powerpc/i688-darwin9 .. x86_64-darwin10,17,21 and > the prototype

[committed] libstdc++: Support single components in name of chrono::current_zone() [PR108211]

2023-01-04 Thread Jonathan Wakely via Gcc-patches
Tested x86_64-linux. Pushed to trunk. -- >8 -- We currently only handle the case where /etc/localtime is a symlink to a path like ".../Etc/UTC" and fail for ".../UTC". This makes both work. libstdc++-v3/ChangeLog: PR libstdc++/108211 * src/c++20/tzdb.cc

[committed] libstdc++: Only use std::atomic if lock free [PR108228]

2023-01-04 Thread Jonathan Wakely via Gcc-patches
Tested x86_64-linux. Pushed to trunk. -- >8 -- This fixes linker errors for hppa-hp-hpux11.11 due to an undefined weak symbol and the use of atomic operations that require libatomic. The weak symbol can simply be defined, which we already do for darwin. The std::atomic<_Node*> is only an

[committed] libstdc++: Fix std::chrono::hh_mm_ss with unsigned rep [PR108265]

2023-01-04 Thread Jonathan Wakely via Gcc-patches
Tested x86_64-linux. Pushed to trunk, backports to gcc-11 and gcc-12 will follow. -- >8 -- libstdc++-v3/ChangeLog: PR libstdc++/108265 * include/std/chrono (hh_mm_ss): Do not use chrono::abs if duration rep is unsigned. * testsuite/std/time/hh_mm_ss/1.cc: Check

[PATCH modula2] Add missing declarations to gcc/m2/gm2-libs-min/M2RTS.def

2023-01-04 Thread Gaius Mulley via Gcc-patches
Bootstrapped on gnu/linux x86_64 Ok for trunk? thanks Gaius - o< - o< - o< - o< - o< Add missing declarations to gcc/m2/gm2-libs-min/M2RTS.def This patch adds two missing procedures to gcc/m2/gm2-libs-min/M2RTS.def required for linking (the

Re: [PATCH] PR 107189 Remove useless _Alloc_node

2023-01-04 Thread François Dumont via Gcc-patches
Still no chance to review ? On 14/11/22 18:56, François Dumont wrote: Gentle reminder. Sorry if I should have committed it as trivial but I cannot do it anymore now that I asked :-) On 12/10/22 22:18, François Dumont wrote: libstdc++: Remove _Alloc_node instance in _Rb_tree [PR107189]    

Re: [PATCH] modula-2, driver: Implement handling for -static-libgm2.

2023-01-04 Thread Iain Sandoe
Hi Gaius, > On 4 Jan 2023, at 12:11, Gaius Mulley wrote: > > Iain Sandoe writes: > >> tested on x86_64-linux-gnu, x86_64,aarch64-darwin21, > > yes LGTM - it was unimplemented - thanks! My apologies, when I came to apply this I realised that I posted the wrong version of the patch -

Re: [PATCH] gccrs: avoid printing to stderr in selftest::rust_flatten_list

2023-01-04 Thread David Malcolm via Gcc-patches
On Mon, 2023-01-02 at 13:47 +0100, Arthur Cohen wrote: > Hi David, > > Sorry for the delayed reply! > > On 12/16/22 18:01, David Malcolm wrote: > > Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu. > > > > OK for trunk? > > > > gcc/rust/ChangeLog: > > *

Re: [PATCH] c++: mark_single_function and SFINAE [PR108282]

2023-01-04 Thread Jason Merrill via Gcc-patches
On 1/4/23 11:37, Patrick Palka wrote: We typically ignore mark_used failure when in a non-SFINAE context for sake of better error recovery. But in mark_single_function we're instead ignoring mark_used failure in a SFINAE context, which ends up causing the second static_assert here to

Re: [PATCH] vrp: Handle pointers in maybe_set_nonzero_bits [PR108253]

2023-01-04 Thread Aldy Hernandez via Gcc-patches
On PTO until Monday but thinking out loud here Shouldn't we put this code in set_nonzero_bits instead, and leave maybe* alone? That way any possible setters may benefit from your change? Also, havent looked (AFK) but does this change work with the global range getter

[ping][PATCH] cp: warn uninitialized const/ref in base class [PR80681]

2023-01-04 Thread Charlie Sale via Gcc-patches
On this example: ``` struct Fine { private: const int f; }; struct BuggyA { const int a; int }; struct BuggyB : private BuggyA { }; ``` g++ currently emits: ``` test.cc:3:19: warning: non-static const member ‘const int Fine::f’ in class without a constructor

Re: [PATCH] libstdc++: Export the __gnu_cxx::zoneinfo_dir_override symbol.

2023-01-04 Thread Jonathan Wakely via Gcc-patches
On Wed, 4 Jan 2023 at 17:14, Jakub Jelinek wrote: > > On Wed, Jan 04, 2023 at 03:17:42PM +, Jonathan Wakely via Gcc-patches > wrote: > > On Sat, 24 Dec 2022 at 12:21, Iain Sandoe wrote: > > > > > > > > > > > > > On 24 Dec 2022, at 12:12, Jonathan Wakely wrote: > > > > > > > > > > > > > > > >

Avoid quadratic behaviour of symbol renaming

2023-01-04 Thread Jan Hubicka via Gcc-patches
Hi, LTO partitioning does renaming of symbols that ends up in same partition and clash with assembler name. This is done for "ordinary" symbols (such as static functions) but also for symbols that are kept only as master clones holding bodies of functions to be specialized later. This is done

Re: [PATCH] libstdc++: Export the __gnu_cxx::zoneinfo_dir_override symbol.

2023-01-04 Thread Jakub Jelinek via Gcc-patches
On Wed, Jan 04, 2023 at 03:17:42PM +, Jonathan Wakely via Gcc-patches wrote: > On Sat, 24 Dec 2022 at 12:21, Iain Sandoe wrote: > > > > > > > > > On 24 Dec 2022, at 12:12, Jonathan Wakely wrote: > > > > > > > > > > > > On Sat, 24 Dec 2022, 11:35 Iain Sandoe via Libstdc++, > > > wrote: > > >

[PATCH] c++: mark_single_function and SFINAE [PR108282]

2023-01-04 Thread Patrick Palka via Gcc-patches
We typically ignore mark_used failure when in a non-SFINAE context for sake of better error recovery. But in mark_single_function we're instead ignoring mark_used failure in a SFINAE context, which ends up causing the second static_assert here to incorrectly fail. Bootstrapped and regtested on

Re: [PATCH] c++, TLS: Support cross-tu static initialization for targets without alias support [PR106435].

2023-01-04 Thread Jason Merrill via Gcc-patches
On 1/4/23 10:30, Iain Sandoe wrote: On 4 Jan 2023, at 15:03, Jason Merrill wrote: On 1/3/23 18:17, Iain Sandoe wrote: On 3 Jan 2023, at 22:22, Jason Merrill wrote: On 12/7/22 10:39, Iain Sandoe wrote: This has been tested on x86_64 and arm64 Darwin and on x86_64 linux gnu. The basic

Re: [PATCH] c++, TLS: Support cross-tu static initialization for targets without alias support [PR106435].

2023-01-04 Thread Iain Sandoe
> On 4 Jan 2023, at 15:03, Jason Merrill wrote: > > On 1/3/23 18:17, Iain Sandoe wrote: >>> On 3 Jan 2023, at 22:22, Jason Merrill wrote: >>> >>> On 12/7/22 10:39, Iain Sandoe wrote: This has been tested on x86_64 and arm64 Darwin and on x86_64 linux gnu. The basic patch is live

Re: [PATCH] libstdc++: Export the __gnu_cxx::zoneinfo_dir_override symbol.

2023-01-04 Thread Jonathan Wakely via Gcc-patches
On Sat, 24 Dec 2022 at 12:21, Iain Sandoe wrote: > > > > > On 24 Dec 2022, at 12:12, Jonathan Wakely wrote: > > > > > > > > On Sat, 24 Dec 2022, 11:35 Iain Sandoe via Libstdc++, > > wrote: > > If this is not the right place to export the symbol (or you do not want > > to export it in the

Re: [PATCH] c++: Error recovery in merge_default_template_args [PR108206]

2023-01-04 Thread Jason Merrill via Gcc-patches
On 1/4/23 04:32, Jakub Jelinek wrote: Hi! We ICE on the following testcase during error recovery, both new_parm and old_parm are error_mark_node, the ICE is on error ("redefinition of default argument for %q+#D", new_parm); inform (DECL_SOURCE_LOCATION (old_parm),

Re: [PATCH] c++, TLS: Support cross-tu static initialization for targets without alias support [PR106435].

2023-01-04 Thread Jason Merrill via Gcc-patches
On 1/3/23 18:17, Iain Sandoe wrote: On 3 Jan 2023, at 22:22, Jason Merrill wrote: On 12/7/22 10:39, Iain Sandoe wrote: This has been tested on x86_64 and arm64 Darwin and on x86_64 linux gnu. The basic patch is live in the homebrew macOS support and so has had quite wide coverage on

Re: [PATCH] rs6000: Don't use optimize_function_for_speed_p too early [PR108184]

2023-01-04 Thread Segher Boessenkool
Hi! On Wed, Jan 04, 2023 at 08:15:03PM +0800, Kewen.Lin wrote: > on 2023/1/4 18:46, Segher Boessenkool wrote: > >> @@ -25604,7 +25602,9 @@ rs6000_call_aix (rtx value, rtx func_desc, rtx > >> tlsarg, rtx cookie) > >> > >> /* Can we optimize saving the TOC in the prologue or > >> do

[PATCH] RISC-V: Add testcases for IMM (0 ~ 31) AVL

2023-01-04 Thread juzhe . zhong
From: Ju-Zhe Zhong gcc/testsuite/ChangeLog: * gcc.target/riscv/rvv/vsetvl/imm_bb_prop-1.c: New test. * gcc.target/riscv/rvv/vsetvl/imm_bb_prop-10.c: New test. * gcc.target/riscv/rvv/vsetvl/imm_bb_prop-11.c: New test. *

[PATCH V2] extract DF/SF/SI/HI/QI subreg from parameter word on stack

2023-01-04 Thread Jiufu Guo via Gcc-patches
Hi, This patch is fixing an issue about parameter accessing if the parameter is struct type and passed through integer registers, and there is floating member is accessed. Like below code: typedef struct DF {double a[4]; long l; } DF; double foo_df (DF arg){return arg.a[3];} On ppc64le, with

[PATCH] RISC-V: Refine Phase 3 of VSETVL PASS

2023-01-04 Thread juzhe . zhong
From: Ju-Zhe Zhong gcc/ChangeLog: * config/riscv/riscv-vsetvl.cc (can_backward_propagate_p): Fix for null iter_bb. (vector_insn_info::set_demand_info): New function. (pass_vsetvl::emit_local_forward_vsetvls): Adjust for refinement of Phase 3.

[PATCH V4] Use reg mode to move sub blocks for parameters and returns

2023-01-04 Thread Jiufu Guo via Gcc-patches
Hi, When assigning a parameter to a variable, or assigning a variable to return value with struct type, "block move" may be used to expand the assignment if the parameter/return is passing through registers and the parameter/return has BLK mode. For this kind of case, when moving the blocks, it

Re: [PATCH] rs6000: Don't use optimize_function_for_speed_p too early [PR108184]

2023-01-04 Thread Kewen.Lin via Gcc-patches
Hi Segher, Thanks for the comments. on 2023/1/4 18:46, Segher Boessenkool wrote: > On Wed, Jan 04, 2023 at 05:20:14PM +0800, Kewen.Lin wrote: >> As Honza pointed out in [1], the current uses of function >> optimize_function_for_speed_p in rs6000_option_override_internal >> are too early, since

Re: [PATCH] modula-2, driver: Implement handling for -static-libgm2.

2023-01-04 Thread Gaius Mulley via Gcc-patches
Iain Sandoe writes: > tested on x86_64-linux-gnu, x86_64,aarch64-darwin21, > OK for trunk? > thanks, > Iain > > --- 8< --- > > This was unimplemented so far. > > gcc/ChangeLog: > > * common.opt: Add -static-libgm2. > * config/darwin.h (LINK_SPEC): Handle static-libgm2. > >

Re: [PATCH] modula-2: Module registration constructors need to be visible [PR108259].

2023-01-04 Thread Gaius Mulley via Gcc-patches
Iain Sandoe writes: > Tested on x86_64-linux-gnu, x86_64,aarch64-darwin21. > There remain issues with shared libraries, but the link fails are fixed > by this. > > OK for master? > Thanks > Iain > > --- 8< --- > > In the current design the main executable links explicitly to the module >

Re: [PATCH] modula-2: Fix registration of modules via constructors [PR108183].

2023-01-04 Thread Gaius Mulley via Gcc-patches
Iain Sandoe writes: > When I first made this patch I had a question as to what should be > done for registration CTORs generated by the compiler for .mod files. > I've now answered that question (the code that makes the GCC decl > has also be updated in a separately posted patch). > >

Re: [PATCH] modula-2, doc: Build dvi, ps and pdf doc in the gcc/doc directory.

2023-01-04 Thread Gaius Mulley via Gcc-patches
Iain Sandoe writes: > Tested on darwin21 with "make m2.pdf" and "make m2.dvi". > OK for trunk? > thanks. > Iain > > --- 8< --- > > This also uses the configured $(TEXI2DVI) and $(TEXI2PDF) to deal with those > targets (since we cannot assume to know what the user might have installed). > >

Re: [PATCH] Modula-2, testsuite: No 96 bit floating type on Darwin.

2023-01-04 Thread Gaius Mulley via Gcc-patches
Iain Sandoe writes: > Tested on x86_64 and aarch64 Darwin, > OK for master? > thanks > Iain > > --- 8< --- > > The realbitscast.mod is currently failing on x86_64 and aarch64 > Darwin since they do not have a 96b floating type. Disable the > type for all Darwin arches. > >

[committed] libstdc++: Fix std::array::data() to be a constant expression [PR108258]

2023-01-04 Thread Jonathan Wakely via Gcc-patches
Tested x86_64-linux. Pushed to trunk. -- >8 -- When I refactored the __array_traits helper I broke this. libstdc++-v3/ChangeLog: PR libstdc++/108258 * include/std/array (__array_traits::operator T*()): Add constexpr. *

Re: [PATCH] vrp: Handle pointers in maybe_set_nonzero_bits [PR108253]

2023-01-04 Thread Aldy Hernandez via Gcc-patches
OK. On Wed, Jan 4, 2023, 10:13 Jakub Jelinek wrote: > Hi! > > maybe_set_nonzero_bits calls set_nonzero_bits which asserts that > var doesn't have pointer type. While we could punt for those > cases, I think we can handle at least some easy cases. > Earlier in maybe_set_nonzero_bits we've

Re: [PATCH] rs6000: Don't use optimize_function_for_speed_p too early [PR108184]

2023-01-04 Thread Segher Boessenkool
On Wed, Jan 04, 2023 at 05:20:14PM +0800, Kewen.Lin wrote: > As Honza pointed out in [1], the current uses of function > optimize_function_for_speed_p in rs6000_option_override_internal > are too early, since the query results from the functions > optimize_function_for_{speed,size}_p could be

Re: [PATCH] docs: fix Var documentation for .opt files

2023-01-04 Thread Gerald Pfeifer
On Wed, 28 Dec 2022, Martin Liška wrote: > The Var documentation was somehow wrongly split into 2 pieces. > > PR middle-end/107966 And on top of that those two bits you are merging were not sorted in alphabetically - which your patch also addresses. :-) > gcc/ChangeLog: > > *

Re: [PATCH] generic-match-head: Don't assume GENERIC folding is done only early [PR108237]

2023-01-04 Thread Richard Biener via Gcc-patches
> Am 04.01.2023 um 10:22 schrieb Jakub Jelinek : > > Hi! > > We ICE on the following testcase, because a valid V2DImode > != comparison is folded into an unsupported V2DImode > comparison. > The match.pd pattern which does this looks like: > /* Transform comparisons of the form (X & Y) CMP 0

[PATCH] c++: Error recovery in merge_default_template_args [PR108206]

2023-01-04 Thread Jakub Jelinek via Gcc-patches
Hi! We ICE on the following testcase during error recovery, both new_parm and old_parm are error_mark_node, the ICE is on error ("redefinition of default argument for %q+#D", new_parm); inform (DECL_SOURCE_LOCATION (old_parm), "original definition appeared

[PATCH] generic-match-head: Don't assume GENERIC folding is done only early [PR108237]

2023-01-04 Thread Jakub Jelinek via Gcc-patches
Hi! We ICE on the following testcase, because a valid V2DImode != comparison is folded into an unsupported V2DImode > comparison. The match.pd pattern which does this looks like: /* Transform comparisons of the form (X & Y) CMP 0 to X CMP2 Z where ~Y + 1 == pow2 and Z = ~Y. */ (for cst

[PATCH] rs6000: Make P10_FUSION honour tuning setting

2023-01-04 Thread Kewen.Lin via Gcc-patches
Hi, We noticed this issue when Segher reviewed the patch for PR104024. When there is no explicit setting for option -mpower10-fusion, we enable OPTION_MASK_P10_FUSION for TARGET_POWER10. But it's not right, it should honour tuning setting instead. This patch is to fix it accordingly, it's

[PATCH] rs6000: Don't use optimize_function_for_speed_p too early [PR108184]

2023-01-04 Thread Kewen.Lin via Gcc-patches
Hi, As Honza pointed out in [1], the current uses of function optimize_function_for_speed_p in rs6000_option_override_internal are too early, since the query results from the functions optimize_function_for_{speed,size}_p could be changed later due to profile feedback and some function attributes

Re: [PATCH] ubsan: Avoid narrowing of multiply for -fsanitize=signed-integer-overflow [PR108256]

2023-01-04 Thread Richard Biener via Gcc-patches
> Am 04.01.2023 um 10:09 schrieb Jakub Jelinek via Gcc-patches > : > > Hi! > > We shouldn't narrow multiplications originally done in signed types, > because the original multiplication might overflow but the narrowed > one will be done in unsigned arithmetics and will never overflow. > >

[PATCH] vrp: Handle pointers in maybe_set_nonzero_bits [PR108253]

2023-01-04 Thread Jakub Jelinek via Gcc-patches
Hi! maybe_set_nonzero_bits calls set_nonzero_bits which asserts that var doesn't have pointer type. While we could punt for those cases, I think we can handle at least some easy cases. Earlier in maybe_set_nonzero_bits we've checked this is on (var & cst) == 0 edge and the other edge is

[PATCH] ubsan: Avoid narrowing of multiply for -fsanitize=signed-integer-overflow [PR108256]

2023-01-04 Thread Jakub Jelinek via Gcc-patches
Hi! We shouldn't narrow multiplications originally done in signed types, because the original multiplication might overflow but the narrowed one will be done in unsigned arithmetics and will never overflow. Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk? 2023-01-04 Jakub

Re: [PATCH] expr.cc: avoid unexpected side effects in expand_expr_divmod optimization

2023-01-04 Thread Jose E. Marchesi via Gcc-patches
ping. Would this be a good approach for fixing the issue? > Hi Jakub. > >> On Thu, Dec 08, 2022 at 02:02:36PM +0100, Jose E. Marchesi wrote: >>> So, I guess the right fix would be to call assemble_external_libcall >>> during final? The `.global FOO' directive would be generated >>> immediately

[PATCH] swap: Fix incorrect lane extraction by vec_extract() [PR106770]

2023-01-04 Thread Surya Kumari Jangala via Gcc-patches
swap: Fix incorrect lane extraction by vec_extract() [PR106770] In the routine rs6000_analyze_swaps(), special handling of swappable instructions is done even if the webs that contain the swappable instructions are not optimized, i.e., the webs do not contain any permuting load/store instructions