Re: [PATCH] libstdc++: more #pragma diagnostic

2024-09-24 Thread Jonathan Wakely
On Tue, 24 Sept 2024, 21:43 Jason Merrill, wrote: > On 9/24/24 7:51 AM, Jason Merrill wrote: > > Tested x86_64-pc-linux-gnu. > > > > Is this the right fix, or do we want to stop using these deprecated > classes, > > here and in stl_function.h? > We can't stop using them in stl_function.h for ABI

Re: [PATCH] gfortran testsuite: Remove unit-files in files having open-statements, PR116701

2024-09-24 Thread Jerry D
On 9/23/24 11:21 PM, Hans-Peter Nilsson wrote: Here's a general approach to handle PR116701. I considered adding manual deletions as quoted below and mentioned in the PR, but seeing the handling of "integer 8" in fortran-torture-execute I decided to follow that example: better scan the source fo

Re: [PATCH] gfortran testsuite: Remove unit-files in files having open-statements, PR116701

2024-09-24 Thread Hans-Peter Nilsson
Thanks for the review! > Date: Tue, 24 Sep 2024 17:10:27 -0700 > Cc: Jerry D > From: Jerry D > On 9/23/24 11:21 PM, Hans-Peter Nilsson wrote: > > I hope the inclusion of gfortran-dg.exp in > > fortran-torture.exp is not controversial, but there's no > > fortran-specific testsuite file common to

[PATCH] libgcc, libstdc++: Make more entities no longer TU-local [PR115126]

2024-09-24 Thread Nathaniel Shead
I found that my previous minimal change to libstdc++ was only sufficient to pass regtest on x86_64-pc-linux-gnu; Linaro complained about ARM and aarch64. This patch removes the rest of the internal-linkage entities I could find exposed via libstdc++. The libgcc changes include some blocks specifi

[PATCH 11/10] c++/modules: Treat weakrefs as not TU-local [PR115126]

2024-09-24 Thread Nathaniel Shead
This follows up on some more test failures reported by Linaro on aarch64. The testcase also depends on the libgcc/libstdc++ patch here: https://gcc.gnu.org/pipermail/gcc-patches/2024-September/663749.html To avoid an intermediary state where aarch64 regtests fail I could include the module.cc ch

Re: [PATCH] [x86] Define VECTOR_STORE_FLAG_VALUE

2024-09-24 Thread Hongtao Liu
On Tue, Sep 24, 2024 at 5:46 PM Uros Bizjak wrote: > > On Tue, Sep 24, 2024 at 11:23 AM liuhongt wrote: > > > > Return constm1_rtx when GET_MODE_CLASS (MODE) == MODE_VECTOR_INT. > > Otherwise NULL_RTX. > > > > Bootstrapped and regtested on x86_64-pc-linux-gnu{-m32,}. > > Ready push to trunk. > >

Re: [PATCH] i386: Add GENERIC and GIMPLE folders of __builtin_ia32_{min,max}* [PR116738]

2024-09-24 Thread Hongtao Liu
On Wed, Sep 25, 2024 at 1:07 AM Jakub Jelinek wrote: > > Hi! > > The following patch adds GENERIC and GIMPLE folders for various > x86 min/max builtins. > As discussed, these builtins have effectively x < y ? x : y > (or x > y ? x : y) behavior. > The GENERIC folding is done if all the (relevant)

[PATCH v2] gfortran testsuite: Remove unit-files in files having open-statements, PR116701

2024-09-24 Thread Hans-Peter Nilsson
Changes since v1: - Rename gfortran-dg-rmunits to fortran-delete-unit-files. - Move it to lib/fortran-modules.exp. - Tweak commit message accordingly and mention cause of placement of the proc. - Tweak proc comment to mention why keeping removals unique despite comment. Here's a general approa

Re: libgomp: with USM, init 'link' variables with host address

2024-09-24 Thread Tobias Burnus
Now committed as r15-3836-g4cb20dc043cf70 Contrary to the originally posted patch, it also acts on the newer/newly added 'omp requires self_maps'. In the area of (unified-)shared memory/self maps, the next step seems to be to do still mapping for static variables – before moving to refinemen

[pushed] libgcc, Darwin: Drop the legacy library build for macOS >= 15 [PR116809].

2024-09-24 Thread Iain Sandoe
Tested on i686-darwin9, 17; x86_64-darwin17, 19, 21, 23 and my FX on x86_64 darwin24, pushed to trunk, thanks Iain --- 8< --- We have been building a legacy libgcc_s.1 DSO to support code that was built with older compilers. >From macOS 15, the unwinder no longer exports some of the symbols use

Re: [PATCH] c++, v2: Implement C++23 P2718R0 - Wording for P2644R1 Fix for Range-based for Loop [PR107637]

2024-09-24 Thread Jakub Jelinek
On Tue, Sep 24, 2024 at 01:34:44PM -0400, Jason Merrill wrote: > Let's also give an error for trying to disable it in C++23+. > Missing function comment, maybe just use the one below? > Please add a comment to this and range-for4 explaining that this is to get > the fix enabled in GNU modes. > > O

[PATCH] [x86] Define VECTOR_STORE_FLAG_VALUE

2024-09-24 Thread liuhongt
Return constm1_rtx when GET_MODE_CLASS (MODE) == MODE_VECTOR_INT. Otherwise NULL_RTX. Bootstrapped and regtested on x86_64-pc-linux-gnu{-m32,}. Ready push to trunk. gcc/ChangeLog: * config/i386/i386.h (VECTOR_STORE_FLAG_VALUE): New macro. gcc/testsuite/ChangeLog: * gcc.dg/rtl/x8

[PATCH] c++, v2: Implement C++23 P2718R0 - Wording for P2644R1 Fix for Range-based for Loop [PR107637]

2024-09-24 Thread Jakub Jelinek
On Mon, Sep 23, 2024 at 03:46:36PM -0400, Jason Merrill wrote: > > -frange-based-for-ext-temps > > or do you have better suggestion? > > I'd probably drop "based", "range-for" seems enough. > > > Shall we allow also disabling it in C++23 or later modes, or override > > user choice unconditionally

[committed] i386: Fix comment typo

2024-09-24 Thread Jakub Jelinek
Hi! Found a comment typo, fixed as obvious. Bootstrapped/regtested on x86_64-linux and i686-linux, committed to trunk. 2024-09-24 Jakub Jelinek * config/i386/i386-expand.cc (ix86_expand_round_builtin): Fix comment typo, insead -> instead. --- gcc/config/i386/i386-expand.cc.j

[PATCH] i386: Add GENERIC and GIMPLE folders of __builtin_ia32_{min,max}* [PR116738]

2024-09-24 Thread Jakub Jelinek
Hi! The following patch adds GENERIC and GIMPLE folders for various x86 min/max builtins. As discussed, these builtins have effectively x < y ? x : y (or x > y ? x : y) behavior. The GENERIC folding is done if all the (relevant) arguments are constants (such as VECTOR_CST for vectors) and is done

[PATCH] libcpp: Add -Wleading-whitespace= warning

2024-09-24 Thread Jakub Jelinek
Hi! The following patch on top of the https://gcc.gnu.org/pipermail/gcc-patches/2024-September/663388.html patch adds -Wleading-whitespace= warning option. This warning doesn't care how much one actually indents which line in the source (that is something that can't be easily done in the preproces

Re: [PATCH] c++, v2: Implement C++23 P2718R0 - Wording for P2644R1 Fix for Range-based for Loop [PR107637]

2024-09-24 Thread Jason Merrill
On 9/24/24 12:53 PM, Jakub Jelinek wrote: On Mon, Sep 23, 2024 at 03:46:36PM -0400, Jason Merrill wrote: -frange-based-for-ext-temps or do you have better suggestion? I'd probably drop "based", "range-for" seems enough. Shall we allow also disabling it in C++23 or later modes, or override us

Re: [PATCH 02/10] c++: Update decl_linkage for C++11

2024-09-24 Thread Jason Merrill
On 9/23/24 7:43 PM, Nathaniel Shead wrote: This patch intends no change in functionality apart from the mangling difference noted; more tests are in patch 4 of this series, which adds a way to actually check what the linkage of decl_linkage provides more directly. Bootstrapped and regtested on x

Re: [PATCH] libstdc++: more #pragma diagnostic

2024-09-24 Thread Jason Merrill
On 9/24/24 7:51 AM, Jason Merrill wrote: Tested x86_64-pc-linux-gnu. Is this the right fix, or do we want to stop using these deprecated classes, here and in stl_function.h? Oops, adding libstdc++ CC. -- 8< -- The CI saw failures on 17_intro/headers/c++2011/parallel_mode.cc due to -Wdepreca

[PATCH v1 1/3] Match: Support form 1 for scalar signed integer SAT_SUB

2024-09-24 Thread pan2 . li
From: Pan Li This patch would like to support the form 1 of the scalar signed integer SAT_SUB. Aka below example: Form 1: #define DEF_SAT_S_SUB_FMT_1(T, UT, MIN, MAX) \ T __attribute__((noinline)) \ sat_s_sub_##T##_fmt_1 (T x, T y) \ {

[PATCH v1 2/3] RISC-V: Implement scalar SAT_SUB for signed integer

2024-09-24 Thread pan2 . li
From: Pan Li This patch would like to implement the sssub form 1. Aka: Form 1: #define DEF_SAT_S_SUB_FMT_1(T, UT, MIN, MAX) \ T __attribute__((noinline)) \ sat_s_sub_##T##_fmt_1 (T x, T y) \ {\ T minus = (UT)x

[PATCH v1 3/3] RISC-V: Add testcases for form 1 of scalar signed SAT_SUB

2024-09-24 Thread pan2 . li
From: Pan Li Form 1: #define DEF_SAT_S_SUB_FMT_1(T, UT, MIN, MAX) \ T __attribute__((noinline)) \ sat_s_sub_##T##_fmt_1 (T x, T y) \ {\ T minus = (UT)x - (UT)y; \ return (x ^ y) >= 0

Re: [r15-3834 Regression] FAIL: c-c++-common/gomp/declare-variant-duplicates.c (test for excess errors) on Linux/x86_64

2024-09-24 Thread Sandra Loosemore
On 9/24/24 14:08, haochen.jiang wrote: On Linux/x86_64, 96246bff0bcd9e5cdec9e6cf811ee3db4997f6d4 is the first bad commit commit 96246bff0bcd9e5cdec9e6cf811ee3db4997f6d4 Author: Sandra Loosemore Date: Fri Sep 6 20:58:13 2024 + OpenMP: Check additional restrictions on context selector

Re: [PATCH] c++: compile time evaluation of prvalues [PR116416]

2024-09-24 Thread Marek Polacek
On Fri, Sep 20, 2024 at 06:39:52PM -0400, Jason Merrill wrote: > On 9/20/24 12:18 AM, Marek Polacek wrote: > > Bootstrapped/regtested on x86_64-pc-linux-gnu, ok for trunk? > > > > -- >8 -- > > This PR reports a missed optimization. When we have: > > > >Str str{"Test"}; > >callback(str);

Re: [PATCH] c++: compile time evaluation of prvalues [PR116416]

2024-09-24 Thread Marek Polacek
On Sat, Sep 21, 2024 at 05:00:51PM +0200, Jakub Jelinek wrote: > On Fri, Sep 20, 2024 at 07:03:45PM -0400, Jason Merrill wrote: > > > The CALL_EXPR case in cp_fold uses !flag_no_inline instead, that makes > > > more > > > sense to me. > > > Because checking "noinline" attribute (which means don't

[Patch] OpenMP: Update OMP_REQUIRES_TARGET_USED for declare_target + interop

2024-09-24 Thread Tobias Burnus
OpenMP mandates that when certain clauses are used with 'omp requires' that in all compilation units this requires clause appears. Those clauses influence the offloading behavior (+ potentially codegen); hence, the must requires must match for those claues when device code is involved. That's

Re: [PATCH] ltmain.sh: allow more flags at link-time

2024-09-24 Thread Alan Modra
On Thu, Sep 19, 2024 at 11:52:48PM +0100, Sam James wrote: > Sam James writes: > > > Sam James writes: > > > >> libtool defaults to filtering flags passed at link-time. > >> > >> This brings the filtering in GCC's 'fork' of libtool into sync with > >> upstream libtool commit 22a7e547e9857fc94fe5

[r15-3841 Regression] FAIL: gfortran.dg/unsigned_25.f90 -Os (test for excess errors) on Linux/x86_64

2024-09-24 Thread haochen.jiang
On Linux/x86_64, 5d98fe096b5d17021875806ffc32ba41ea0e87b0 is the first bad commit commit 5d98fe096b5d17021875806ffc32ba41ea0e87b0 Author: Thomas Koenig Date: Tue Sep 24 21:51:42 2024 +0200 Implement MATMUL and DOT_PRODUCT for unsigned. caused FAIL: gfortran.dg/unsigned_25.f90 -O0 (tes

[PATCH] tree-optimization/116819 - SLP with !STMT_VINFO_RELEVANT representative

2024-09-24 Thread Richard Biener
Under some circumstances we can end up picking a not relevant stmt as representative of a SLP node. Instead of skipping stmt analysis and declaring success we have to either ignore relevancy throughout the code base or fail SLP operation verification. The following does the latter. Bootstrapped

RE: [PATCH v1 2/2] RISC-V: Add testcases for form 3 of signed vector SAT_ADD

2024-09-24 Thread Li, Pan2
Thanks Robin, this depends on [PATCH 1/2] of match.pd change, will commit it after that. Pan -Original Message- From: Robin Dapp Sent: Tuesday, September 24, 2024 8:40 PM To: Li, Pan2 ; gcc-patches@gcc.gnu.org Cc: richard.guent...@gmail.com; tamar.christ...@arm.com; juzhe.zh...@rivai.a

Re: [PATCH] Update email in MAINTAINERS file.

2024-09-24 Thread Filip Kastl
On Mon 2024-09-23 09:43:28, Aldy Hernandez wrote: > From: Aldy Hernandez > > ChangeLog: > > * MAINTAINERS: Update email and add myself to DCO. > --- > MAINTAINERS | 9 + > 1 file changed, 5 insertions(+), 4 deletions(-) > > diff --git a/MAINTAINERS b/MAINTAINERS > index cfd96c9f3

[PATCH] RISC-V: Fix FIXED_REGISTERS comment missing return address register

2024-09-24 Thread chenyixuan
From: Yixuan Chen gcc/config/ChangeLog: 2024-09-24 Yixuan Chen * riscv/riscv.h: Fix FIXED_REGISTERS comment missing return address register. --- gcc/config/riscv/riscv.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/config/riscv/riscv.h b/gcc/config/riscv/

Re: [PATCH] MATCH: add abs support for half float

2024-09-24 Thread Richard Biener
On Mon, Sep 23, 2024 at 10:52 AM Kugan Vivekanandarajah wrote: > > Hi Richard, > > > On 20 Sep 2024, at 8:11 pm, Richard Biener > > wrote: > > > > External email: Use caution opening links or attachments > > > > > > On Fri, Sep 20, 2024 at 10:23 AM Kugan Vivekanandarajah > > wrote: > >> > >> Hi

Re: [RFC][PATCH] AArch64: Remove AARCH64_EXTRA_TUNE_USE_NEW_VECTOR_COSTS

2024-09-24 Thread Jennifer Schmitz
> On 28 Aug 2024, at 14:56, Kyrylo Tkachov wrote: > > > >> On 28 Aug 2024, at 10:27, Tamar Christina wrote: >> >> External email: Use caution opening links or attachments >> >> >>> -Original Message- >>> From: Kyrylo Tkachov >>> Sent: Wednesday, August 28, 2024 8:55 AM >>> To: Ta

Re: [committed] arc: Remove mlra option [PR113954]

2024-09-24 Thread Claudiu Zissulescu Ianculescu
I'll include your comment in my second patch where I clean some patterns used by reload. Thank you, claudiu On Mon, Sep 23, 2024 at 5:05 PM Andreas Schwab wrote: > > On Sep 23 2024, Claudiu Zissulescu wrote: > > > diff --git a/gcc/config/arc/arc.cc b/gcc/config/arc/arc.cc > > index c800226b179..

SVE intrinsics: Fold constant operands for svlsl.

2024-09-24 Thread Soumya AR
This patch implements constant folding for svlsl. Test cases have been added to check for the following cases: Zero, merge, and don't care predication. Shift by 0. Shift by register width. Overflow shift on signed and unsigned integers. Shift on a negative integer. Maximum possible shift, eg. shif

[PATCH] Testsuite, darwin: account for macOS 15

2024-09-24 Thread FX Coudert
I’ve pushed the attached patch as obvious, taking into account the newly released macOS 15 (darwin24). It makes the test pass. FX 0001-Testsuite-darwin-account-for-macOS-15.patch Description: Binary data

[PATCH] tree-optimization/114855 - more update_ssa speedup

2024-09-24 Thread Richard Biener
The following tackles another source of slow bitmap operations, namely populating blocks_to_update. We already have that in tree view around PHI insertion but also the initial population is slow. There's unfortunately a conditional inbetween list view requirement and the bitmap API doesn't allow

Re: [PATCH v3] Widening-Mul: Fix one ICE for SAT_SUB matching operand checking

2024-09-24 Thread Richard Biener
On Tue, Sep 24, 2024 at 12:29 PM wrote: > > From: Pan Li > > This patch would like to fix the following ICE for -O2 -m32 of x86_64. > > during RTL pass: expand > JackMidiAsyncWaitQueue.cpp.cpp: In function 'void DequeueEvent(unsigned > int)': > JackMidiAsyncWaitQueue.cpp.cpp:3:6: internal compile

[PATCH] libstdc++: more #pragma diagnostic

2024-09-24 Thread Jason Merrill
Tested x86_64-pc-linux-gnu. Is this the right fix, or do we want to stop using these deprecated classes, here and in stl_function.h? -- 8< -- The CI saw failures on 17_intro/headers/c++2011/parallel_mode.cc due to -Wdeprecated-declarations warnings in some parallel/ headers. libstdc++-v3/Change

Re: [Fortran, Patch, PR101100, v1] Fix ICE when compiling with caf-lib and using proc_pointer component.

2024-09-24 Thread Andre Vehreschild
Hi Harald, thanks for the review. Committed as gcc-15-3827-g0c0d79c783f Thanks again, Andre On Mon, 23 Sep 2024 21:25:55 +0200 Harald Anlauf wrote: > Hi Andre, > > Am 19.09.24 um 14:19 schrieb Andre Vehreschild: > > Hi all, > > > > the attached patch fixes an ICE when compiling with -f

[PATCH 2/2] Disable add_store_equivs when -fno-expensive-optimizations

2024-09-24 Thread Richard Biener
IRAs add_store_equivs is quadratic in the size of the function worst case, disable it when -fno-expensive-optimizations which means at -O1 and -Og. Bootstrap and regtest running on x86_64-unknown-linux-gnu. OK? Thanks, Richard. * ira.cc (ira): Gate add_store_equivs on flag_expensive_opt

[PATCH 1/2] rtl-optimization/114855 - slow add_store_equivs in IRA

2024-09-24 Thread Richard Biener
For the testcase in PR114855 at -O1 add_store_equivs shows up as the main sink for bitmap_set_bit because it uses a bitmap to mark all seen insns by UID to make sure the forward walk in memref_used_between_p will find the insn in question. Given we do have a CFG here the functions operation is que

Re: [PATCH v3 1/4] tree-optimization/116024 - simplify C1-X cmp C2 for UB-on-overflow types

2024-09-24 Thread Artemiy Volkov
On 9/24/2024 12:16 AM, Jeff Law wrote: > > > On 9/23/24 2:32 AM, Artemiy Volkov wrote: >> Implement a match.pd pattern for C1 - X cmp C2, where C1 and C2 are >> integer constants and X is of a UB-on-overflow type.  The pattern is >> simplified to X rcmp C1 - C2 by moving X and C2 to the other sid

Re: [PATCH v1 2/2] RISC-V: Add testcases for form 3 of signed vector SAT_ADD

2024-09-24 Thread Robin Dapp
LGTM (in case you haven't committed it yet). -- Regards Robin

Re: [PATCH v1 2/2] RISC-V: Add testcases for form 2 of signed vector SAT_ADD

2024-09-24 Thread Robin Dapp
LGTM. -- Regards Robin

Re: [PATCH] Update email in MAINTAINERS file.

2024-09-24 Thread Aldy Hernandez
Pushed attached patch. Thanks. Aldy On Tue, Sep 24, 2024 at 10:09 AM Filip Kastl wrote: > On Mon 2024-09-23 09:43:28, Aldy Hernandez wrote: > > From: Aldy Hernandez > > > > ChangeLog: > > > > * MAINTAINERS: Update email and add myself to DCO. > > --- > > MAINTAINERS | 9 + > > 1

Re: [PATCH] [x86] Define VECTOR_STORE_FLAG_VALUE

2024-09-24 Thread Uros Bizjak
On Tue, Sep 24, 2024 at 11:23 AM liuhongt wrote: > > Return constm1_rtx when GET_MODE_CLASS (MODE) == MODE_VECTOR_INT. > Otherwise NULL_RTX. > > Bootstrapped and regtested on x86_64-pc-linux-gnu{-m32,}. > Ready push to trunk. > > gcc/ChangeLog: > > * config/i386/i386.h (VECTOR_STORE_FLAG_V

Re: [PATCH] Update email in MAINTAINERS file.

2024-09-24 Thread Filip Kastl
On Tue 2024-09-24 11:43:47, Aldy Hernandez wrote: > Pushed attached patch. > > Thanks. > Aldy > Nice. Thanks! Filip > On Tue, Sep 24, 2024 at 10:09 AM Filip Kastl wrote: > > > On Mon 2024-09-23 09:43:28, Aldy Hernandez wrote: > > > From: Aldy Hernandez > > > > > > ChangeLog: > > > > > >

[PATCH] tree-optimization/114855 - slow VRP due to equiv oracle queries

2024-09-24 Thread Richard Biener
For the testcase in PR114855 VRP takes 320.41s (23%) (after mitigating backwards threader slowness). This is mostly due to the bitmap check in equiv_oracle::find_equiv_dom. The following turns this bitmap to tree view, trading the linear search for a O(log N) one which improves VRP time to 54.54s

Re: [patch, fortran] Matmul and dot_product for unsigned

2024-09-24 Thread Andre Vehreschild
Hi Thomas, thanks for your answers. I am ok with the patch. - Andre On Mon, 23 Sep 2024 15:07:31 +0200 Thomas Koenig wrote: > Hello Andre and everybody else? > > Any more comments on the matmul patch? The other ones depend on > it, so I would like to commit (unless there are further > question

RE: [PATCH v2] Widening-Mul: Fix one ICE for SAT_SUB matching operand checking

2024-09-24 Thread Li, Pan2
Thanks Richard for comments. > Since you're creating the call with op_0/op_1 shouldn't you _only_ check > support > for op_type operation and not lhs_type? Yes, your are right. Checking operand makes much more sense to me. Let me update in v3. Pan -Original Message- From: Richard Bien

Re: [Fortran, Patch, PR84870, v1] Fix ICE and allocated memory not assigned correctly.

2024-09-24 Thread Andre Vehreschild
Hi Harald, thanks for the review. Committed as gcc-15-3825-gf5035d7d015 Thanks again, Andre On Mon, 23 Sep 2024 21:19:40 +0200 Harald Anlauf wrote: > Hi Andre, > > Am 19.09.24 um 16:01 schrieb Andre Vehreschild: > > Hi all, > > > > in PR84870 an ICE was reported, that has been fixed in

[PATCH v2] Widening-Mul: Fix one ICE for SAT_SUB matching operand checking

2024-09-24 Thread pan2 . li
From: Pan Li This patch would like to fix the following ICE for -O2 -m32 of x86_64. during RTL pass: expand JackMidiAsyncWaitQueue.cpp.cpp: In function 'void DequeueEvent(unsigned int)': JackMidiAsyncWaitQueue.cpp.cpp:3:6: internal compiler error: in expand_fn_using_insn, at internal-fn.cc:263

Re: [PATCH]middle-end: check explicitly for external or constants when checking for loop invariant [PR116817]

2024-09-24 Thread Richard Biener
On Tue, 24 Sep 2024, Tamar Christina wrote: > > Can you explain how you get to see constant/external defs with > > astmt_vec_info? That's somehow a violation of some inherentinvariant in > > the vectorizer. > > I'm not sure I actually get any. It could be the condition is never hit > with a s

[PATCH v3] Widening-Mul: Fix one ICE for SAT_SUB matching operand checking

2024-09-24 Thread pan2 . li
From: Pan Li This patch would like to fix the following ICE for -O2 -m32 of x86_64. during RTL pass: expand JackMidiAsyncWaitQueue.cpp.cpp: In function 'void DequeueEvent(unsigned int)': JackMidiAsyncWaitQueue.cpp.cpp:3:6: internal compiler error: in expand_fn_using_insn, at internal-fn.cc:263

[PATCH] Fix bogus SLP nvector compute in check_load_store_for_partial_vectors

2024-09-24 Thread Richard Biener
We have a new overload for vect_get_num_copies that handles both SLP and non-SLP. Use it. Bootstrap and regtest running on x86_64-unknown-linux-gnu. * tree-vect-stmts.cc (check_load_store_for_partial_vectors): Use the new vect_get_num_copies overload. --- gcc/tree-vect-stmts.cc

[PATCH] MATCH: Simplify `(trunc)copysign ((extend)x, CST)` to `copysign (x, -1.0/1.0)` [PR112472]

2024-09-24 Thread Eikansh Gupta
This patch simplify `(trunc)copysign ((extend)x, CST)` to `copysign (x, -1.0/1.0)` depending on the sign of CST. Previously, it was simplified to `copysign (x, CST)`. It can be optimized as the sign of the CST matters, not the value. The patch also simplify `(trunc)abs (extend x)` to `abs (x)`.

Re: [Patch] OpenMP: Add support for 'self_maps' to the 'require' directive

2024-09-24 Thread Tobias Burnus
Hi all, now committed as r15-3822-gb752eed3e3f2f2, see attachment. I fixed on C/C++ test issue (missing 's') and added the Fortran module check. Tobias PS: I noticed that 'declare target' does not add the target-used flag. At least TR13 is very clear that it counts, but currently GCC does n

Re: [PATCH v2] Widening-Mul: Fix one ICE for SAT_SUB matching operand checking

2024-09-24 Thread Richard Biener
On Tue, Sep 24, 2024 at 9:13 AM wrote: > > From: Pan Li > > This patch would like to fix the following ICE for -O2 -m32 of x86_64. > > during RTL pass: expand > JackMidiAsyncWaitQueue.cpp.cpp: In function 'void DequeueEvent(unsigned > int)': > JackMidiAsyncWaitQueue.cpp.cpp:3:6: internal compiler

[PATCH] Simplify range-op shift mask generation

2024-09-24 Thread Richard Biener
The following reduces the number of wide_ints built which show up in the profile for PR114855 as the largest remaining bit at -O1. Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed. * range-op.cc (operator_rshift::op1_range): Use wi::mask instead of shift and not. --- g

[PATCH 3/3] phiprop: VOP phi confuses phiprop [PR116824]

2024-09-24 Thread Andrew Pinski
Another small phiprop improvement, in some cases we could have a vop defining statement be a phi which might be the same bb as the load happens. This is ok since the phi here is not a store so we can just accept it. Bootstrapped and tested on x86_64-linux-gnu. PR tree-optimization/116824

[PATCH 1/3] Add an alternative testcase for PR 70740

2024-09-24 Thread Andrew Pinski
While looking into improving phiprop, I noticed that the current pr70740.c testcase was being optimized almost all the way before phiprop because the addresses were considered the same; the arrays were all zero in size. This adds an alternative testcase which changes the array sizes to be 1 and ph

[PATCH 2/3] phiprop: Skip over clobbers [PR116823]

2024-09-24 Thread Andrew Pinski
In C++ code the clobber gets in the way of phiprop. E.g. ``` if (lr_bitpos.2401_412 < rr_bitpos.2402_413) goto ; [INV] else goto ; [INV] : : MEM[(struct poly_int *)&D.192544] ={v} {CLOBBER(bob)}; _1060 = MEM[(const long int &)iftmp.2400_515]; ``` The above comes from fold-c

[r15-3834 Regression] FAIL: c-c++-common/gomp/declare-variant-duplicates.c (test for excess errors) on Linux/x86_64

2024-09-24 Thread haochen.jiang
On Linux/x86_64, 96246bff0bcd9e5cdec9e6cf811ee3db4997f6d4 is the first bad commit commit 96246bff0bcd9e5cdec9e6cf811ee3db4997f6d4 Author: Sandra Loosemore Date: Fri Sep 6 20:58:13 2024 + OpenMP: Check additional restrictions on context selector properties caused FAIL: c-c++-common/go

Re: [PATCH 03/10] c++/modules: Use decl_linkage in maybe_record_mergeable_decl

2024-09-24 Thread Jason Merrill
On 9/23/24 7:44 PM, Nathaniel Shead wrote: I don't currently have any testcases where this changes something, but I felt it to be a valuable cleanup. Bootstrapped and regtested on x86_64-pc-linux-gnu, OK for trunk? OK. -- >8 -- This avoids any possible inconsistencies (current or future) ab

Re: [PATCH] Simplify range-op shift mask generation

2024-09-24 Thread Aldy Hernandez
Richard Biener writes: > The following reduces the number of wide_ints built which show up > in the profile for PR114855 as the largest remaining bit at -O1. > > Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed. Thanks.

Re: [PATCH] RISC-V: Fix FIXED_REGISTERS comment missing return address register

2024-09-24 Thread Jeff Law
On 9/24/24 2:11 AM, chenyix...@iscas.ac.cn wrote: From: Yixuan Chen gcc/config/ChangeLog: 2024-09-24 Yixuan Chen * riscv/riscv.h: Fix FIXED_REGISTERS comment missing return address register. Thanks. I made minor fixes to the ChangeLog entry and pushed this to the trunk. jef

Re: [PATCH] c++/contracts: ICE in build_contract_condition_function [PR116490]

2024-09-24 Thread Jason Merrill
On 8/30/24 8:49 AM, Nina Dinka Ranns wrote: We currently do not expect comdat group of the guarded function to be set at the time of generating pre and post check function. However, in the case of an explicit instantiation, the guarded function has been added to a comdat group before generating c

Re: [PATCH 1/2] rtl-optimization/114855 - slow add_store_equivs in IRA

2024-09-24 Thread Jeff Law
On 9/24/24 6:34 AM, Richard Biener wrote: For the testcase in PR114855 at -O1 add_store_equivs shows up as the main sink for bitmap_set_bit because it uses a bitmap to mark all seen insns by UID to make sure the forward walk in memref_used_between_p will find the insn in question. Given we do

Re: [PATCH RFA] libstdc++: #ifdef out #pragma GCC system_header

2024-09-24 Thread Jonathan Wakely
On 23/09/24 11:06 -0400, Jason Merrill wrote: Tested x86_64-pc-linux-gnu, OK for trunk? Yes please, I've wanted this for years, but it wasn't practical until you changed some of the warnings recently. Thanks!

Re: [PATCH] tree-optimization/114855 - slow VRP due to equiv oracle queries

2024-09-24 Thread Andrew MacLeod
Absolutely ok. Thanks! Andrew On 9/24/24 05:52, Richard Biener wrote: For the testcase in PR114855 VRP takes 320.41s (23%) (after mitigating backwards threader slowness). This is mostly due to the bitmap check in equiv_oracle::find_equiv_dom. The following turns this bitmap to tree view, tra

Re: [PATCH 2/2] Disable add_store_equivs when -fno-expensive-optimizations

2024-09-24 Thread Jeff Law
On 9/24/24 6:35 AM, Richard Biener wrote: IRAs add_store_equivs is quadratic in the size of the function worst case, disable it when -fno-expensive-optimizations which means at -O1 and -Og. Bootstrap and regtest running on x86_64-unknown-linux-gnu. OK? Thanks, Richard. * ira.cc (ir

[PATCH v1 1/3] RISC-V: Refine the testcase of vector SAT_ADD

2024-09-24 Thread pan2 . li
From: Pan Li Take scan-assembler-times for vsadd insn check instead of function body, as we only care about if we can generate the fixed point insn vsadd. The below test are passed for this patch. * The rv64gcv fully regression test. It is test only patch and obvious up to a point, will commit

Re: [PATCH v1 3/3] RISC-V: Refine the testcase of vector SAT_TRUNC

2024-09-24 Thread 钟居哲
LGTM juzhe.zh...@rivai.ai From: pan2.li Date: 2024-09-25 14:45 To: gcc-patches CC: juzhe.zhong; kito.cheng; jeffreyalaw; rdapp.gcc; Pan Li Subject: [PATCH v1 3/3] RISC-V: Refine the testcase of vector SAT_TRUNC From: Pan Li Take scan-assembler-times for vsadd insn check instead of function

[PATCH v1 2/3] RISC-V: Refine the testcase of vector SAT_SUB

2024-09-24 Thread pan2 . li
From: Pan Li Take scan-assembler-times for vsadd insn check instead of function body, as we only care about if we can generate the fixed point insn vssub. The below test are passed for this patch. * The rv64gcv fully regression test. It is test only patch and obvious up to a point, will commit

[PATCH v1 3/3] RISC-V: Refine the testcase of vector SAT_TRUNC

2024-09-24 Thread pan2 . li
From: Pan Li Take scan-assembler-times for vsadd insn check instead of function body, as we only care about if we can generate the fixed point insn vnclip. The below test are passed for this patch. * The rv64gcv fully regression test. It is test only patch and obvious up to a point, will commit

RE: [PATCH v1] Widening-Mul: Fix one ICE for SAT_SUB matching operand promotion

2024-09-24 Thread Li, Pan2
Got it, thanks a lot. Pan -Original Message- From: Uros Bizjak Sent: Tuesday, September 24, 2024 3:29 PM To: Li, Pan2 Cc: gcc-patches@gcc.gnu.org; richard.guent...@gmail.com; tamar.christ...@arm.com; juzhe.zh...@rivai.ai; kito.ch...@gmail.com; jeffreya...@gmail.com; rdapp@gmail.c

Re: [PATCH v1] Widening-Mul: Fix one ICE for SAT_SUB matching operand promotion

2024-09-24 Thread Uros Bizjak
On Tue, Sep 24, 2024 at 8:53 AM Li, Pan2 wrote: > > Got it and thanks, let me rerun to make sure it works well as expected. For reference, this is documented in: https://gcc.gnu.org/wiki/Testing_GCC https://gcc-newbies-guide.readthedocs.io/en/latest/working-with-the-testsuite.html https://gcc.gn

Re: [Patch, fortran] PR116733: Generic processing of assumed rank objects (f202y)

2024-09-24 Thread Andre Vehreschild
Hi Paul, in addition to Thomas' remarks (which I second to), I have the following: > diff --git a/gcc/fortran/intrinsic.cc b/gcc/fortran/intrinsic.cc > index 0a6be215825..d95f35145b5 100644 > --- a/gcc/fortran/intrinsic.cc > +++ b/gcc/fortran/intrinsic.cc > @@ -293,11 +293,15 @@ do_ts29113_check

[PATCH] x86/{,V}AES: adjust when to force EVEX encoding

2024-09-24 Thread Jan Beulich
Commit a79d13a01f8c ("i386: Fix aes/vaes patterns [PR114576]") correctly said "..., but we need to emit {evex} prefix in the assembly if AES ISA is not enabled". Yet it did so only for the TARGET_AES insns. Going from the alternative chosen in the TARGET_VAES insns is wrong for two reasons: - if, w