Re: [PING] [PATCH] AVX-512: Pacify -Wshift-overflow=2. [PR115409]

2024-06-22 Thread Hongtao Liu
On Sat, Jun 22, 2024 at 5:49 AM Collin Funk wrote: > > Hi Hongtao, > > I submitted a patch silencing -Wshift-overflow on a signed int > constant here: > > https://gcc.gnu.org/pipermail/gcc-patches/2024-June/654016.html > > You OK'd it here: > > https://gcc.gnu.org/pipermail/gcc-patches/202

Re: [PATCH 6/6] Add a late-combine pass [PR106594]

2024-06-22 Thread Takayuki 'January June' Suwa
Hi! On 2024/06/23 1:49, Richard Sandiford wrote: Takayuki 'January June' Suwa writes: On 2024/06/20 22:34, Richard Sandiford wrote: This patch adds a combine pass that runs late in the pipeline. There are two instances: one between combine and split1, and one after postreload. The pass curre

Re: [PATCH] RISC-V: Fix unresolved mcpu-[67].c tests

2024-06-22 Thread Jeff Law
On 6/21/24 5:31 AM, Craig Blackmore wrote: These tests check the sched2 dump, so skip them for optimization levels that do not enable sched2. gcc/testsuite/ChangeLog: * gcc.target/riscv/mcpu-6.c: Skip for -O0, -O1, -Og. * gcc.target/riscv/mcpu-7.c: Likewise. Thanks. I've pu

Re: [PATCH v2] RISC-V: Remove integer vector eqne pattern

2024-06-22 Thread Jeff Law
On 6/19/24 9:28 PM, demin.han wrote: We can unify eqne and other comparison operations. Tested on RV32 and RV64. gcc/ChangeLog: * config/riscv/predicates.md (comparison_except_eqge_operator): Only exclude ge (comparison_except_ge_operator): Ditto * config/risc

Re: [PATCH v2] RISC-V: Add dg-remove-option for z* extensions

2024-06-22 Thread Jeff Law
On 6/20/24 10:31 AM, Patrick O'Neill wrote: This introduces testsuite support infra for removing extensions. Since z* extensions don't have ordering requirements the logic for adding/removing those extensions has also been consolidated. This fixes RVWMO compile testcases failing on Ztso targe

[PATCH] Always -lntdll for all cygming targets [PR113501]

2024-06-22 Thread Shengdun Wang
From: Shengdun Wang The mcf thread has already linked to -lntdll, and it's confirmed that even Windows 95 includes ntdll.dll. Additionally, if users do not use any functions from ntdll directly, the inclusion of -lntdll does not result in linking to it. Therefore, I propose making it a default

[PATCH] libstdc++: Fix --disable-libstdcxx-verbose abi break [PR115585]

2024-06-22 Thread Shengdun Wang
__glibcxx_assert_fail is not defined when we disable the libstdcxx-verbose. This causes ABI break when a binary is compiled with verbose enabled. libstdc++-v3/ChangeLog: * src/c++11/assert_fail.cc: --- libstdc++-v3/src/c++11/assert_fail.cc | 13 + 1 file changed, 9 insertions

[PATCH] libstdc++: Fix --disable-libstdcxx-verbose abi break [PR115585]

2024-06-22 Thread Shengdun Wang
From: Shengdun Wang __glibcxx_assert_fail is not defined when we disable the libstdcxx-verbose. This causes ABI break when a binary is compiled with verbose enabled. libstdc++-v3/ChangeLog: * src/c++11/assert_fail.cc: --- libstdc++-v3/src/c++11/assert_fail.cc | 13 + 1 file

[PATCH] libstdc++: Fix --disable-libstdcxx-verbose abi break [PR115585]

2024-06-22 Thread Shengdun Wang
From: Shengdun Wang __glibcxx_assert_fail is not defined when we disable the libstdcxx-verbose. This causes ABI break when a binary is compiled with verbose enabled. libstdc++-v3/ChangeLog: * src/c++11/assert_fail.cc: --- libstdc++-v3/src/c++11/assert_fail.cc | 13 + 1 file

Re: [PATCH] MATCH: Simplify (vec CMP vec) eq/ne (vec CMP vec) [PR111150]

2024-06-22 Thread Andrew Pinski
On Fri, Jun 21, 2024 at 1:04 AM Richard Biener wrote: > > On Fri, Jun 21, 2024 at 9:12 AM Eikansh Gupta > wrote: > > > > We can optimize (vec_cond eq/ne vec_cond) when vec_cond is a > > result of (vec CMP vec). The optimization is because of the > > observation that in vec_cond, (-1 != 0) is tru

[PATCH v8 08/12] Give better error messages for musttail

2024-06-22 Thread Andi Kleen
When musttail is set, make tree-tailcall give error messages when it cannot handle a call. This avoids vague "other reasons" error messages later at expand time when it sees a musttail function not marked tail call. In various cases this requires delaying the error until the call is discovered. g

[PATCH v8 11/12] Dump reason for missing tail call into dump file

2024-06-22 Thread Andi Kleen
gcc/ChangeLog: * tree-tailcall.cc (maybe_error_musttail): Print reason to dump_file. (find_tail_calls): Print gimple stmt or other reasons that stop the search for tail calls into dump file. --- gcc/tree-tailcall.cc | 17 - 1 file changed, 16 insert

[PATCH v8 10/12] Add documentation for musttail attribute

2024-06-22 Thread Andi Kleen
gcc/ChangeLog: * doc/extend.texi: Document [[musttail]] --- gcc/doc/extend.texi | 25 +++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/gcc/doc/extend.texi b/gcc/doc/extend.texi index b2e41a581dd1..f83e643da19c 100644 --- a/gcc/doc/extend.texi +++ b/

[PATCH v8 09/12] Delay caller error reporting for musttail

2024-06-22 Thread Andi Kleen
Move the error reporting for caller attributes to be after the tail call discovery, so that we can give proper error messages tagged to the calls. gcc/ChangeLog: * tree-tailcall.cc (maybe_error_musttail): Declare. (suitable_for_tail_opt_p): Take call and report errors. (su

[PATCH v8 07/12] Enable musttail tail conversion even when not optimizing

2024-06-22 Thread Andi Kleen
Enable the tailcall optimization for non optimizing builds, but in this case only checks calls that have the musttail attribute set. This makes musttail work without optimization. This is done with a new late musttail pass that is only active when not optimizing. The new pass relies on tree-cfg to

[PATCH v8 06/12] Add tests for C/C++ musttail attributes

2024-06-22 Thread Andi Kleen
Some adopted from the existing C musttail plugin tests. gcc/testsuite/ChangeLog: * c-c++-common/musttail1.c: New test. * c-c++-common/musttail2.c: New test. * c-c++-common/musttail3.c: New test. * c-c++-common/musttail4.c: New test. * c-c++-common/musttail7

[PATCH v8 12/12] Mark expand musttail error messages for translation

2024-06-22 Thread Andi Kleen
The musttail error messages are reported to the user, so must be translated. gcc/ChangeLog: * calls.cc (initialize_argument_information): Mark messages for translation. (can_implement_as_sibling_call_p): Dito. (expand_call): Dito. --- gcc/calls.cc | 56 +++

[PATCH v8 04/12] C++: Support clang compatible [[musttail]] (PR83324)

2024-06-22 Thread Andi Kleen
This patch implements a clang compatible [[musttail]] attribute for returns. musttail is useful as an alternative to computed goto for interpreters. With computed goto the interpreter function usually ends up very big which causes problems with register allocation and other per function optimizati

[PATCH v8 05/12] C: Implement musttail attribute for returns

2024-06-22 Thread Andi Kleen
Implement a C23 clang compatible musttail attribute similar to the earlier C++ implementation in the C parser. PR83324 gcc/c/ChangeLog: * c-parser.cc (struct attr_state): Define with musttail_p. (c_parser_statement_after_labels): Handle [[musttail]] (c_parser_std_

[PATCH v8 02/12] Fix pro_and_epilogue for sibcalls at -O0

2024-06-22 Thread Andi Kleen
Some of the cfg fixups in pro_and_epilogue for sibcalls were dependent on "optimize". Make them check cfun->tail_call_marked instead to handle the -O0 musttail case. This fixes the musttail test cases on arm targets. PR115255 gcc/ChangeLog: * function.cc (thread_prologue_and_epi

Updated musttail patchkit

2024-06-22 Thread Andi Kleen
- Fix problems with encoding musttail in tree structure (Thanks Jakub and Jason) - Fixes a miscompilation that would break bootstrap with --enable-checking=release - Avoids a 0.8% compile time penalty at -O0 for the new musttail pass by using a cfun flag that is discovered by tree-cfg - Enables t

[PATCH v8 03/12] Add a musttail generic attribute to the c-attribs table

2024-06-22 Thread Andi Kleen
It does nothing currently since statement attributes are handled directly in the parser. gcc/c-family/ChangeLog: * c-attribs.cc (handle_musttail_attribute): Add. * c-common.h (handle_musttail_attribute): Add. --- gcc/c-family/c-attribs.cc | 15 +++ gcc/c-family/c-comm

[PATCH v8 01/12] Improve must tail in RTL backend

2024-06-22 Thread Andi Kleen
- Give error messages for all causes of non sibling call generation - When giving error messages clear the musttail flag to avoid ICEs - Error out when tree-tailcall failed to mark a must-tail call sibcall. In this case it doesn't know the true reason and only gives a vague message. PR8332

Re: [PATCH 6/6] Add a late-combine pass [PR106594]

2024-06-22 Thread Richard Sandiford
Takayuki 'January June' Suwa writes: > On 2024/06/20 22:34, Richard Sandiford wrote: >> This patch adds a combine pass that runs late in the pipeline. >> There are two instances: one between combine and split1, and one >> after postreload. >> >> The pass currently has a single objective: remove d

Re: [committed] [RISC-V] Fix wrong patch application

2024-06-22 Thread Jeff Law
On 6/19/24 9:43 PM, Christoph Müllner wrote: Hi Jeff, the test should probably also be skipped on -Oz: === gcc: Unexpected fails for rv64imafdc lp64d medlow === FAIL: gcc.target/riscv/zbs-ext-2.c -Oz scan-assembler-times andi\t 1 FAIL: gcc.target/riscv/zbs-ext-2.c -Oz

[PATCH] Ranger: Mark a few classes as final

2024-06-22 Thread Andrew Pinski
I noticed there was a warning from clang about int_range's dtor being marked as final saying the class cannot be inherited from. So let's mark the few ranger classes as final for those which we know will be final. Bootstrapped and tested on x86_64-linux-gnu. gcc/ChangeLog: * value-range.

Re: [committed] Fix testsuite fallout on stormy16 after IOR->PLUS change

2024-06-22 Thread Jeff Law
On 6/22/24 6:01 AM, Georg-Johann Lay wrote: Am 22.06.24 um 00:00 schrieb Jeff Law: More minor fallout from the IOR->PLUS change a little while ago.  This time on xstormy16. The pattern to swap nibbles actually tries to handle all the cases of IOR, XOR and PLUS.  But when we generate PLUS

[PATCH] tree-optimization/115579 - fix wrong code with store-motion

2024-06-22 Thread Richard Biener
The recent change to relax store motion for variables that cannot have store data races broke the optimization to share flag vars for stores that all happen in the same single BB. The following fixes this. Bootstrapped on x86_64-unknown-linux-gnu, testing in progress. Richard. PR tree-o

Re: [PATCH v1] Ifcvt: Add cond tree reconcile for truncated .SAT_SUB

2024-06-22 Thread Richard Biener
On Fri, Jun 21, 2024 at 4:45 PM Li, Pan2 wrote: > > Thanks Richard for suggestion, tried the (convert? with below gimple stmt but > got a miss def ice. > To double confirm, the *type_out should be the vector type of lhs, and we > only need to build > one cvt stmt from itype to otype here. Or jus

Re: [PATCH] Add param for bb limit to invoke fast_vrp.

2024-06-22 Thread Richard Biener
On Fri, Jun 21, 2024 at 3:02 PM Andrew MacLeod wrote: > > This patch adds > > --param=vrp-block-limit=N > > When the basic block counter for a function exceeded 'N' , VRP is > invoked with the new fast_vrp algorithm instead. This algorithm uses a > lot less memory and processing power, alth

[pushed] wwwdocs: news: Tweak MPFR link

2024-06-22 Thread Gerald Pfeifer
Pushed. Gerald --- htdocs/news.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/news.html b/htdocs/news.html index 471b31b7..e78abfc3 100644 --- a/htdocs/news.html +++ b/htdocs/news.html @@ -798,7 +798,7 @@ annual report for 2008 January 6, 2007 Kaveh Ghazi has

[pushed] libstdc++: Move gcc.gnu.org and sourceware.org links to https

2024-06-22 Thread Gerald Pfeifer
Pushed. Gerald libstdc++-v3: * doc/xml/manual/debug.xml: Move gcc.gnu.org link to https. Ditto for sourceware.org links. * doc/html/manual/debug.html: Regenerate. --- libstdc++-v3/doc/html/manual/debug.html | 10 +- libstdc++-v3/doc/xml/manual/debug.xml | 8 +++

[pushed] wwwdocs: contribute: Add a missing parenthesis

2024-06-22 Thread Gerald Pfeifer
Pushed. Gerald --- htdocs/contribute.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/contribute.html b/htdocs/contribute.html index 7d85d885..24f8d30b 100644 --- a/htdocs/contribute.html +++ b/htdocs/contribute.html @@ -270,7 +270,7 @@ characters. The classifier

Re: [committed] Fix testsuite fallout on stormy16 after IOR->PLUS change

2024-06-22 Thread Georg-Johann Lay
Am 22.06.24 um 00:00 schrieb Jeff Law: More minor fallout from the IOR->PLUS change a little while ago.  This time on xstormy16. The pattern to swap nibbles actually tries to handle all the cases of IOR, XOR and PLUS.  But when we generate PLUS earlier in the pipeline, the simplifications/

[pushed] wwwdocs: backends: Fix markup with overly long block

2024-06-22 Thread Gerald Pfeifer
An environment is in parallel to a environment and cannot be nested in the latter; in HTML 5 an instance of the former automatically ends the latter. Pushed. Gerald --- htdocs/backends.html | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/htdocs/backends.html b/htdocs/ba

Re: [pushed 2/2] testsuite: check that generated .sarif files validate against the SARIF schema [PR109360]

2024-06-22 Thread Dimitar Dimitrov
On Fri, Jun 21, 2024 at 08:55:36AM -0400, David Malcolm wrote: > This patch extends the dg directive verify-sarif-file so that if > the "jsonschema" tool is available, it will be used to validate the > generated .sarif file. > > Tested with jsonschema 3.2 with Python 3.8 Hi David, The new testca

[ARC PATCH] Improved SImode conditional moves (improves DImode shifts).

2024-06-22 Thread Roger Sayle
This patch adds an alternative to ARC's *movsicc_insn to improve register allocation by allowing the input operands to be swapped by reversing the condition of the conditional move. A example of the benefits can be seen in the expansion of DImode shifts, where x << y currently generates