Re: [PATCH 14/17] testsuite: arm: Use -march=unset for pr69175.C test

2024-11-20 Thread Torbjorn SVENSSON
On 2024-11-19 18:36, Richard Earnshaw (lists) wrote: On 19/11/2024 10:24, Torbjörn SVENSSON wrote: Update test cases to use -mcpu=unset/-march=unset feature introduced in r15-3606-g7d6c6a0d15c. gcc/testsuite/ChangeLog: * g++.dg/opt/pr69175.C: Added option "-mcpu=unset". Signed-off-

Re: [PATCH 13/17] testsuite: arm: Use -march=unset for cortex-m55* tests

2024-11-20 Thread Torbjorn SVENSSON
On 2024-11-19 18:33, Richard Earnshaw (lists) wrote: On 19/11/2024 10:24, Torbjörn SVENSSON wrote: Update test cases to use -mcpu=unset/-march=unset feature introduced in r15-3606-g7d6c6a0d15c. gcc/testsuite/ChangeLog: * gcc.target/arm/cortex-m55-nodsp-flag-hard.c: Added option

Re: [PATCH 10/17] testsuite: arm: Use effective target for pr57735.C test

2024-11-20 Thread Torbjorn SVENSSON
On 2024-11-19 17:50, Richard Earnshaw (lists) wrote: On 19/11/2024 10:24, Torbjörn SVENSSON wrote: Update test cases to use -mcpu=unset/-march=unset feature introduced in r15-3606-g7d6c6a0d15c. gcc/testsuite/ChangeLog: * g++.dg/ext/pr57735.C: Use effective-target arm_cpu_xscale_arm.

Re: [PATCH 08/17] testsuite: arm: Use effective-target for vect-early-break-cbranch test

2024-11-20 Thread Torbjorn SVENSSON
On 2024-11-19 17:41, Richard Earnshaw (lists) wrote: On 19/11/2024 10:23, Torbjörn SVENSSON wrote: Update test cases to use -mcpu=unset/-march=unset feature introduced in r15-3606-g7d6c6a0d15c. gcc/testsuite/ChangeLog: * gcc.target/arm/vect-early-break-cbranch.c: Use effecti

Re: [PATCH 06/17] testsuite: arm: Use effective-target for thumb2-slow-flash-data* tests

2024-11-20 Thread Torbjorn SVENSSON
On 2024-11-19 16:49, Richard Earnshaw (lists) wrote: On 19/11/2024 10:23, Torbjörn SVENSSON wrote: Update test cases to use -mcpu=unset/-march=unset feature introduced in r15-3606-g7d6c6a0d15c. gcc/testsuite/ChangeLog: * gcc.target/arm/thumb2-slow-flash-data-2.c: Use effecti

Re: [PATCH 07/17] testsuite: arm: Use effective-target for {gcc, g++}.target/arm/ tests

2024-11-20 Thread Torbjorn SVENSSON
On 2024-11-19 17:24, Richard Earnshaw (lists) wrote: On 19/11/2024 10:23, Torbjörn SVENSSON wrote: Update test cases to use -mcpu=unset/-march=unset feature introduced in r15-3606-g7d6c6a0d15c. gcc/testsuite/ChangeLog: * g++.target/arm/pr103676.C: Use effective-target arm_cp

Re: [PATCH 05/17] testsuite: arm: Use effective-target for small-multiply-m* tests

2024-11-20 Thread Torbjorn SVENSSON
On 2024-11-19 16:45, Richard Earnshaw (lists) wrote: On 19/11/2024 10:23, Torbjörn SVENSSON wrote: Update test cases to use -mcpu=unset/-march=unset feature introduced in r15-3606-g7d6c6a0d15c. gcc/testsuite/ChangeLog: * gcc.target/arm/small-multiply-m0-1.c: Use effective-target

Re: [PATCH 04/17] testsuite: arm: Use effective-target for pure-code/* tests

2024-11-20 Thread Torbjorn SVENSSON
On 2024-11-19 16:36, Richard Earnshaw (lists) wrote: On 19/11/2024 10:23, Torbjörn SVENSSON wrote: Update test cases to use -mcpu=unset/-march=unset feature introduced in r15-3606-g7d6c6a0d15c. gcc/testsuite/ChangeLog: * gcc.target/arm/pure-code/no-literal-pool-m0.c: Use eff

Re: [PATCH 03/17] testsuite: arm: Use effective-target for crc_hf_1.c test

2024-11-20 Thread Torbjorn SVENSSON
On 2024-11-19 16:16, Richard Earnshaw (lists) wrote: On 19/11/2024 10:23, Torbjörn SVENSSON wrote: Update test cases to use -mcpu=unset/-march=unset feature introduced in r15-3606-g7d6c6a0d15c. gcc/testsuite/ChangeLog: * gcc.target/arm/acle/crc_hf_1.c: Use effective-target a

Re: [PATCH 02/17] testsuite: arm: Use effective-target for pacbti-m-predef* tests

2024-11-20 Thread Torbjorn SVENSSON
On 2024-11-19 16:08, Richard Earnshaw (lists) wrote: On 19/11/2024 10:23, Torbjörn SVENSSON wrote: Update test cases to use -mcpu=unset/-march=unset feature introduced in r15-3606-g7d6c6a0d15c. gcc/testsuite/ChangeLog: * gcc.target/arm/acle/pacbti-m-predef-1.c: Use effective-target

Re: [PATCH 01/17] testsuite: arm: Use effective-target for bti* and pac* tests

2024-11-20 Thread Torbjorn SVENSSON
On 2024-11-19 15:52, Richard Earnshaw (lists) wrote: On 19/11/2024 10:23, Torbjörn SVENSSON wrote: Update test cases to use -mcpu=unset/-march=unset feature introduced in r15-3606-g7d6c6a0d15c. gcc/testsuite/ChangeLog: * gcc.target/arm/pac-1.c: Use effective-target arm_arch_

[PATCH v4 3/7] Use incoming small integer argument type if possible

2024-11-20 Thread H.J. Lu
For targets, like x86, which define TARGET_PROMOTE_PROTOTYPES to return true, all integer arguments smaller than int are passed as int: [hjl@gnu-tgl-3 pr14907]$ cat x.c extern int baz (char c1); int foo (char c1) { return baz (c1); } [hjl@gnu-tgl-3 pr14907]$ gcc -S -O2 -m32 x.c [hjl@gnu-tgl-3 p

Re: [PATCH] i386/testsuite: Enhance AVX10.2 vmovd/w testcases

2024-11-20 Thread Hongtao Liu
On Thu, Nov 21, 2024 at 2:40 PM Haochen Jiang wrote: > > Hi all, > > Under -fno-omit-frame-pointer, %ebp will be used, which is the > Solaris/x86 default. Both check %ebp and %esp to avoid error on that. > > Tested under -m32 w/ and w/o -fno-omit-frame-pointer. Ok for trunk? Ok. > > Thx, > Haochen

[PATCH v1 2/7] RISC-V: Refactor the testcases for vector SAT_SUB

2024-11-20 Thread pan2 . li
From: Pan Li This patch would like to refactor the testcases of vector SAT_SUB after move to rvv/autovec/sat folder. Includes: * Refine the include header files. * Remove unnecessary optimization options. * Adjust dg-final by any-opts and/or no-opts if the rtl dump changes on different optimi

[PATCH v1 5/7] RISC-V: Rearrange the test files for all other vector SAT ALU [NFC]

2024-11-20 Thread pan2 . li
From: Pan Li Move all other test files of SAT ALU to riscv/rvv/autovec/sat/. It is test only patch and obvious up to a point, will commit it directly if no comments in next 48H. gcc/testsuite/ChangeLog: * gcc.target/riscv/rvv/autovec/binop/vec_sat_s_sub-1-i16.c: Move to... * gc

[PATCH v1 3/7] RISC-V: Rearrange the test files for vector SAT_TRUNC [NFC]

2024-11-20 Thread pan2 . li
From: Pan Li The test files of vector SAT_TRUNC only has numbers as the suffix. Rearrange the file name to -{form number}-{target-type}. For example, test form 3 for uint32_t SAT_TRUNC will have -3-u32.c for asm check and -run-3-u32.c for the run test. Meanwhile, moved all related test files to

[PATCH v1 7/7] RISC-V: Refine the vector stride load/store testcases

2024-11-20 Thread pan2 . li
From: Pan Li The rtl expand dump for IFN check of stride load/store testcase is different between O2 and O3. It it reasonable to leverage target no-opts/any-opts to filte out, instead of the xfail. The below test suites are passed for this patch. * The rv64gcv fully regression test. It is test

[PATCH v1 4/7] RISC-V: Refactor the testcases for vector SAT_TRUNC

2024-11-20 Thread pan2 . li
From: Pan Li This patch would like to refactor the testcases of vector SAT_TRUNC after move to rvv/autovec/sat folder. Includes: * Refine the include header files. * Remove unnecessary optimization options. The below test suites are passed for this patch. * The rv64gcv fully regression test.

[PATCH v4 7/7] ssa-fre-4.c: Enable for all targets and adjust scan match

2024-11-20 Thread H.J. Lu
Since the C frontend no longer promotes char argument, enable ssa-fre-4.c for all targets and adjust scan match. PR middle-end/14907 * gcc.dg/tree-ssa/ssa-fre-4.c: Enable for all targets and adjust scan match. Signed-off-by: H.J. Lu --- gcc/testsuite/gcc.dg/tree-ssa/ssa-

[PATCH v4 1/7] Honor TARGET_PROMOTE_PROTOTYPES during RTL expand

2024-11-20 Thread H.J. Lu
Promote integer arguments smaller than int if TARGET_PROMOTE_PROTOTYPES returns true. PR middle-end/14907 * calls.c (initialize_argument_information): Promote small integer arguments if TARGET_PROMOTE_PROTOTYPES returns true. Signed-off-by: H.J. Lu --- gcc/calls.cc | 9 +

[PATCH v4 0/7] Improve outgoing integer argument promotion

2024-11-20 Thread H.J. Lu
Changes from v3: 1. Split improvement of outgoing integer argument promotion into 3 patches. 2. Drop the expand_promote_outgoing_argument change. The bug https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117547 should be fixed differently in the x86 backend. 3. Update testcase adjustments. -- For

[PATCH v4 5/7] vect-simd-clone-1[6-8][cd].c: Expect in-branch clones for x86

2024-11-20 Thread H.J. Lu
Since the C frontend no longer promotes char and short arguments, expect in-branch clones for x86. PR middle-end/14907 * gcc.dg/vect/vect-simd-clone-16c.c: Expect in-branch clones for x86. * gcc.dg/vect/vect-simd-clone-16d.c: Likewise. * gcc.dg/vect/vect-sim

[PATCH v4 2/7] Drop targetm.promote_prototypes from C, C++ and Ada frontends

2024-11-20 Thread H.J. Lu
Remove the targetm.calls.promote_prototypes call from C, C++ and Ada frontends. gcc/ PR middle-end/14907 * gimple.cc (gimple_builtin_call_types_compatible_p): Remove the targetm.calls.promote_prototypes call. * tree.cc (tree_builtin_call_types_compatible_p): Likewi

[PATCH v4 4/7] i386: Adjust apx-ndd.c for frontend promotion removal

2024-11-20 Thread H.J. Lu
Since the C frontend no longer promotes integer argument smaller than int, the apx-ndd.c codgen is slightly different: --- apx-ndd.s (original)2024-11-10 06:07:09.894876973 +0800 +++ apx-ndd.s (updated) 2024-11-10 06:06:59.371860565 +0800 @@ -17,7 +17,7 @@ foo_add_char: foo1_add_c

[PATCH v4 6/7] scev-cast.c: Enable for all targets and adjust scan matches

2024-11-20 Thread H.J. Lu
Since the C frontend no longer promotes char argument, enable scev-cast.c for all targets and adjust scan matches. PR middle-end/14907 * gcc.dg/tree-ssa/scev-cast.c: Enable for all targets and adjust scan match. Signed-off-by: H.J. Lu --- gcc/testsuite/gcc.dg/tree-ssa/sc

Re: [PATCH v2 01/14] Support for 64-bit location_t: libcpp part 1

2024-11-20 Thread Lewis Hyatt
On Wed, Nov 20, 2024 at 11:58:30AM +0100, Richard Biener wrote: > On Sun, Nov 17, 2024 at 4:24 AM Lewis Hyatt wrote: > > > > Prepare libcpp to support 64-bit location_t, without yet making > > any functional changes, by adding new typedefs that enable code to be > > written such that it works with

Re: [PATCH v4 1/2] [APX CFCMOV] Support APX CFCMOV in if_convert pass

2024-11-20 Thread Hongyu Wang
Gently ping, it would be appreciate if anyone can help review this. We hope this patch will not miss GCC15 for complete support on APX. Kong, Lingling 于2024年11月14日周四 09:50写道: > > Hi, > > Many thanks to Richard for the suggestion that conditional load is like a > scalar instance of maskload_opta

Re: testsuite: m68k: Fix tests for C23

2024-11-20 Thread Jeff Law
On 11/19/24 2:17 AM, Andreas Schwab wrote: * gcc.target/m68k/crash1.c (seq_printf): Add prototype. * gcc.target/m68k/pr63347.c (oof): Add missing parameter. OK. And similar changes elsewhere are pre-approved. Though I'd like to think we're near the point of catching all the

Re: PING Re: [PATCH] testsuite: add print-stack.exp

2024-11-20 Thread Mike Stump
On Nov 18, 2024, at 1:25 PM, David Malcolm wrote: > > Ping for this testsuite patch; I've occasionally found it *very* > helpful when debugging DejaGnu. Ok. Do put a comment that this is for debugging so no one removes it.

Re: [PATCH v3 1/7] Improve outgoing integer argument promotion

2024-11-20 Thread H.J. Lu
On Wed, Nov 20, 2024 at 10:05 PM Richard Biener wrote: > On Sun, Nov 10, 2024 at 1:55 PM H.J. Lu wrote: > > > > For targets, like x86, which define TARGET_PROMOTE_PROTOTYPES to return > > true, all integer arguments smaller than int are passed as int: > > > > [hjl@gnu-tgl-3 pr14907]$ cat x.c > >

Re: [PATCH v3 6/7] scev-cast.c: Adjusted

2024-11-20 Thread H.J. Lu
On Wed, Nov 20, 2024 at 10:24 PM Richard Biener wrote: > On Sun, Nov 10, 2024 at 1:56 PM H.J. Lu wrote: > > > > Since the C frontend no longer promotes char argument, adjust > scev-cast.c. > > I wonder whether the adjusted testcase would pass now already for > !PROMOTE_PROTOTYPE > targets and th

[PATCH] testsuite: i386: Fix gcc.target/i386/pr117232-1.c etc. with Solaris as

2024-11-20 Thread Rainer Orth
Two tests FAIL on Solaris/x86 with the native assembler: FAIL: gcc.target/i386/pr117232-1.c scan-assembler-times (?n)cmovn?c 7 FAIL: gcc.target/i386/pr117232-apx-1.c scan-assembler-times (?n)cmovn?c 7 The problem is that as expects a slightly different insn syntax, e.g. cmovl.nc%

Re: [PATCH] doc/cpp: Document __has_include_next

2024-11-20 Thread Joseph Myers
On Fri, 18 Oct 2024, Arsen Arsenović wrote: > -The @code{__has_include} operator by itself, without any @var{operand} or > -parentheses, acts as a predefined macro so that support for it can be tested > -in portable code. Thus, the recommended use of the operator is as follows: > +The @code{__has

Re: [PATCH] libcpp: Fix ICE lexing invalid raw string in a deferred pragma [PR117118]

2024-11-20 Thread Joseph Myers
On Wed, 16 Oct 2024, Lewis Hyatt wrote: > Hello- > > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117118 > > This fixes an old regression from GCC 11. Is it OK for trunk and all > backports please? Bootstrap + regtested all languages on x86-64 Linux. > Thanks! > > -Lewis > > -- >8 -- > > The

Re: [PATCH] c: Add u{,l,ll,imax}abs builtins [PR117024]

2024-11-20 Thread Joseph Myers
On Wed, 16 Oct 2024, Jakub Jelinek wrote: > Hi! > > The following patch adds u{,l,ll,imax}abs builtins, which just fold > to ABSU_EXPR, similarly to how {,l,ll,imax}abs builtins fold to > ABS_EXPR. > > Tested on x86_64-linux, ok for trunk if it passes full bootstrap/regtest > on x86_64-linux and

Re: [PATCH] expr, c, gimplify, v3: Don't clear whole unions [PR116416]

2024-11-20 Thread Joseph Myers
On Wed, 20 Nov 2024, Jakub Jelinek wrote: > On Tue, Nov 19, 2024 at 11:08:03PM +, Joseph Myers wrote: > > > --- gcc/testsuite/gcc.dg/gnu11-empty-init-1.c.jj 2024-10-15 > > > 16:14:23.411063701 +0200 > > > +++ gcc/testsuite/gcc.dg/gnu11-empty-init-1.c 2024-10-15 > > > 16:31:02.302984714

Re: [PATCH v5] forwprop: Try to blend two isomorphic VEC_PERM sequences

2024-11-20 Thread Christoph Müllner
On Tue, Nov 19, 2024 at 2:35 PM Richard Biener wrote: > > On Sat, Nov 16, 2024 at 12:00 AM Christoph Müllner > wrote: > > > > This extends forwprop by yet another VEC_PERM optimization: > > It attempts to blend two isomorphic vector sequences by using the > > redundancy in the lane utilization in

[PATCH v6] forwprop: Try to blend two isomorphic VEC_PERM sequences

2024-11-20 Thread Christoph Müllner
This extends forwprop by yet another VEC_PERM optimization: It attempts to blend two isomorphic vector sequences by using the redundancy in the lane utilization in these sequences. This redundancy in lane utilization comes from the way how specific scalar statements end up vectorized: two VEC_PERMs

Re: [PATCH v2 2/3] cfgexpand: Rewrite add_scope_conflicts_2 to use cache and look back further [PR111422]

2024-11-20 Thread Richard Biener
On Sat, Nov 16, 2024 at 5:25 AM Andrew Pinski wrote: > > After fixing loop-im to do the correct overflow rewriting > for pointer types too. We end up with code like: > ``` > _9 = (unsigned long) &g; > _84 = _9 + 18446744073709551615; > _11 = _42 + _84; > _44 = (signed char *) _11; > ... > *_44 = 1

Re: [PATCH] bitintlower: Handle EXACT_DIV_EXPR like TRUNC_DIV_EXPR in bitint lowering [PR117571]

2024-11-20 Thread Richard Biener
On Tue, 19 Nov 2024, Jakub Jelinek wrote: > Hi! > > r15-4601 added match.pd simplification of some TRUNC_DIV_EXPR expressions > into EXACT_DIV_EXPR, so bitintlower can now encounter even those. > From bitint lowering POV the fact that the division will be exact > doesn't matter, we still need to

Re: [PATCH] v2: Add -f{, no-}assume-sane-operators-new-delete options [PR110137]

2024-11-20 Thread Jan Hubicka
> On Tue, Nov 19, 2024 at 11:23:31AM +0100, Jakub Jelinek wrote: > > On Tue, Nov 19, 2024 at 10:25:16AM +0100, Richard Biener wrote: > > > I think it's pretty clear and easy to describe to users what "m " and > > > what "mC" do. But with "pure" this is an odd intermediate state. For > > > both

Re: [PATCH] sibcall: Adjust BLKmode argument size for alignment padding

2024-11-20 Thread H.J. Lu
On Wed, Nov 20, 2024 at 9:55 PM Richard Sandiford wrote: > "H.J. Lu" writes: > > On Wed, Nov 20, 2024 at 2:12 AM Richard Sandiford > > wrote: > >> > >> "H.J. Lu" writes: > >> > Adjust BLKmode argument size for parameter alignment for sibcall > check. > >> > > >> > gcc/ > >> > > >> > PR middle-

Re: [PATCH] json parsing: avoid relying on floating point equality [PR117677]

2024-11-20 Thread H.J. Lu
On Thu, Nov 21, 2024 at 4:52 AM David Malcolm wrote: > Sorry about the breakage. > > I wasn't able to reproduce the failures myself, but the following > patch seems plausible as a fix; does it fix the affected > configurations? > It fixed bootstrap on Linux/i686 for me. Thanks. > > gcc/Change

Re: [PATCH] libgccjit: Add support for machine-dependent builtins

2024-11-20 Thread Mark Wielaard
Hi Antoni, On Wed, Nov 20, 2024 at 11:11:01AM -0500, Antoni Boucher wrote: > From what I understand, pull requests on forge.sourceware.org can be > removed at any time, so I could lose track of the status of my > patches. It is an experiment, and the experiment could fail for various reasons. At

Re: [PATCH v3 2/7] Add expand_promote_outgoing_argument

2024-11-20 Thread H.J. Lu
On Wed, Nov 20, 2024 at 10:18 PM Richard Biener wrote: > On Sun, Nov 10, 2024 at 1:55 PM H.J. Lu wrote: > > > > Since the C/C++/Ada frontends no longer promote integer argument smaller > > than int, add expand_promote_outgoing_argument to promote it when > expanding > > builtin functions. > > I

Re: [PATCH v3 7/7] ssa-fre-4.c: Skip for all targets

2024-11-20 Thread H.J. Lu
On Wed, Nov 20, 2024 at 10:27 PM Richard Biener wrote: > On Sun, Nov 10, 2024 at 1:56 PM H.J. Lu wrote: > > > > Since the C frontend no longer promotes char argument, ssa-fre-4.c will > > fail for all targets. Skip it for all targets. > > Maybe instead do > > /* { dg-final { scan-tree-dump-not

Re: [PATCH] Fortran: fix checking of protected variables in submodules [PR83135]

2024-11-20 Thread Harald Anlauf
Am 20.11.24 um 22:36 schrieb Jerry D: On 11/20/24 1:08 PM, Harald Anlauf wrote: Dear all, the attached, actually rather straightforward patch fixes the checking of protected variables in submodules.  When a variable was use-associated in an ancestor module, we failed to properly diagnose this.

[pushed] libstdc++: remove JSON comment.

2024-11-20 Thread Jason Merrill
Tested x86_64-pc-linux-gnu, applying to trunk. -- 8< -- Standard JSON doesn't have comments, and it seems this file needs to be conforming, not the common JSON-with-comments dialect. libstdc++-v3/ChangeLog: * src/c++23/libstdc++.modules.json.in: Remove C++ comment. --- libstdc++-v3/src

[PATCH] arm, mve: Fix arm_mve_dlstp_check_dec_counter's use of single_pred

2024-11-20 Thread Andre Vieira (lists)
Hi, Looks like single_pred ICEs if the basic-block does not have a single predecessor rather than return NULL, which was what this snippet of code relied on. This feels like borderline obvious to me as a fix, but I thought I'd get it checked by one more person. Call 'single_pred_p' before 's

Re: [PATCH] Fortran: fix checking of protected variables in submodules [PR83135]

2024-11-20 Thread Jerry D
On 11/20/24 1:08 PM, Harald Anlauf wrote: Dear all, the attached, actually rather straightforward patch fixes the checking of protected variables in submodules. When a variable was use-associated in an ancestor module, we failed to properly diagnose this. Regtested on x86_64-pc-linux-gnu. OK

[committed] c: Diagnose compound literal for empty array [PR114266]

2024-11-20 Thread Joseph Myers
As reported in bug 114266, GCC fails to pedwarn for a compound literal, whose type is an array of unknown size, initialized with an empty initializer. This case is disallowed by C23 (which doesn't have zero-size objects); the case of a named object is diagnosed as expected, but not that for compou

Re: [PATCH] rs6000: Inefficient vector splat of small V2DI constants [PR107757]

2024-11-20 Thread Peter Bergner
On 11/20/24 4:53 AM, Surya Kumari Jangala wrote: > +++ b/gcc/testsuite/gcc.target/powerpc/pr107757-1.c > @@ -0,0 +1,14 @@ > +/* { dg-do compile } */ > +/* { dg-options "-mdejagnu-cpu=power8 -mvsx -O2" } */ > +/* { dg-require-effective-target powerpc_vsx } */ The -mvsx option is implied by -mcpu=po

[PATCH] Fortran: fix checking of protected variables in submodules [PR83135]

2024-11-20 Thread Harald Anlauf
Dear all, the attached, actually rather straightforward patch fixes the checking of protected variables in submodules. When a variable was use-associated in an ancestor module, we failed to properly diagnose this. Regtested on x86_64-pc-linux-gnu. OK for mainline? Thanks, Harald From 05bc3abf

[PATCH] simplify-rtx: Limit number of elts in when encoding.

2024-11-20 Thread Robin Dapp
Hi, this came up when testing even/odd permutes on riscv (https://gcc.gnu.org/pipermail/gcc-patches/2024-November/669181.html). I didn't yet continue with the patch but it's clear it exposes an issue with encoding vector masks. When we encode a vector mask with a constant number of elements and f

[PATCH] json parsing: avoid relying on floating point equality [PR117677]

2024-11-20 Thread David Malcolm
Sorry about the breakage. I wasn't able to reproduce the failures myself, but the following patch seems plausible as a fix; does it fix the affected configurations? gcc/ChangeLog: PR bootstrap/117677 * json-parsing.cc (selftest::test_parse_number): Replace ASSERT_EQ of 'do

Re: [PATCH] testsuite: Require C99 for pow-to-ldexp.c

2024-11-20 Thread Jeff Law
On 11/19/24 2:03 AM, Soumya AR wrote: pow-to-ldexp.c checks for calls to __builtin_ldexpf and __builtin_ldexpl, which will only be performed when the compiler knows the target has a C99 libm available. Modified the test to add a C99 runtime requirement. This fixes the failure on arm-eabi tar

Re: Should -fsanitize=bounds support counted-by attribute for pointers inside a structure?

2024-11-20 Thread Qing Zhao
> On Nov 20, 2024, at 14:23, Martin Uecker wrote: > > Am Mittwoch, dem 20.11.2024 um 17:37 + schrieb Qing Zhao: >> Hi, Martin, >> >> Thanks a lot for pointing this out. >> >> This does look like a problem we need avoid for the pointer arrays. >> >> Does the same problem exist in the la

Re: [PATCH] doc: mention STAGE1_CFLAGS

2024-11-20 Thread Sam James
Sam James writes: > STAGE1_CFLAGS can be used to accelerate the just-built stage1 compiler > which especially improves its performance on some of the large generated > files during bootstrap. It defaults to nothing (i.e. -O0). > > The downside is that if the native compiler is buggy, there's a gr

Re: [PATCH v1 2/4] aarch64: Add stdcall and cdecl attributes

2024-11-20 Thread Richard Sandiford
Evgeny Karpov writes: > This patch adds stdcall and cdecl attributes, which might be used for > DLL export/import in MinGW. If that's the main use case, did you consider putting the attributes in the #if TARGET_DLLIMPORT_DECL_ATTRIBUTES block? Or is that not appropriate? (Genuine question, in c

[PATCH] tree-optimization/117355: object size for PHI nodes with negative offsets

2024-11-20 Thread Siddhesh Poyarekar
When the object size estimate is returned for a PHI node, it is the maximum possible value, which is fine in isolation. When combined with negative offsets however, it may sometimes end up in zero size because the resultant size was larger than the wholesize, leading size_for_offset to conclude th

Re: [PATCH v1 3/4] Rename SEH functions for reuse in AArch64

2024-11-20 Thread Richard Sandiford
Evgeny Karpov writes: > From 4274d1126a1aa60d16dca1cbf7dde1c5ee344bf7 Mon Sep 17 00:00:00 2001 > From: Evgeny Karpov > Date: Fri, 15 Nov 2024 13:36:41 +0100 > Subject: [PATCH v1 3/4] Rename SEH functions for reuse in AArch64 > > This patch renames functions related to SEH functionality. These > f

[pushed][PR116587][LRA]: Fix last chance reload pseudo allocation

2024-11-20 Thread Vladimir Makarov
The following patch fixes https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116587 The patch was successfully tested and bootstrapped on x86-64, ppc64le, aarch64. commit 56fc6a6d9edc9f9170285ef31c7f312608fad88c Author: Vladimir N. Makarov Date: Wed Nov 20 14:25:41 2024 -0500 [PR116587][LRA

Re: Should -fsanitize=bounds support counted-by attribute for pointers inside a structure?

2024-11-20 Thread Martin Uecker
Am Mittwoch, dem 20.11.2024 um 17:37 + schrieb Qing Zhao: > Hi, Martin, > > Thanks a lot for pointing this out. > > This does look like a problem we need avoid for the pointer arrays. > > Does the same problem exist in the language extension too if the n is > allowed to be changed after i

Re: [PATCH] aarch64: Fix aarch64 after moving to C23

2024-11-20 Thread Andrew Pinski
On Wed, Nov 20, 2024 at 10:09 AM Richard Sandiford wrote: > > Andrew Pinski writes: > > This fixes a few aarch64 specific testcases after the move to default to > > GNU C23. > > For the SME testcases, I decided to add a new one for the GNU C23 case as > > `()` changing > > to mean `(void)` inst

[PATCH 00/17] testsuite: arm: Leverage -mcpu=unset/-march=unset

2024-11-20 Thread Torbjörn SVENSSON
Hi, This patch set tries to reduce the number of failed test cases for ARM based targets by leveraging the -mcpu=unset/-march=unset feature introduced in r15-3606-g7d6c6a0d15c. With the patch set applied, the test cases listed below will be reported as "regressions", but it's really that the te

Re: [PATCH v2 5/8] c: Fix constructor bounds checking for VLA and construct VLA vector constants

2024-11-20 Thread Marek Polacek
On Mon, Nov 18, 2024 at 02:12:21PM +0530, Tejas Belagod wrote: > This patch adds support for checking bounds of SVE ACLE vector initialization > constructors. It also adds support to construct vector constant from init > constructors. > > gcc/ChangeLog: > > * c/c-typeck.cc (process_init_el

Re: [PATCH htdocs] bugs: mention ASAN too

2024-11-20 Thread Gerald Pfeifer
On Mon, 11 Nov 2024, Sam James wrote: > Request that reporters try `-fsanitize=address,undefined` rather than > just `-fsanitize=undefined` when reporting bugs. We get invalid bug > reports which ASAN would've caught sometimes, even if it's less often > than where UBSAN would help. I don't have a

Re: Should -fsanitize=bounds support counted-by attribute for pointers inside a structure?

2024-11-20 Thread Kees Cook
On Tue, Nov 19, 2024 at 05:41:13PM +0100, Martin Uecker wrote: > Am Dienstag, dem 19.11.2024 um 10:47 -0500 schrieb Marek Polacek: > > On Mon, Nov 18, 2024 at 07:10:35PM +0100, Martin Uecker wrote: > > > Am Montag, dem 18.11.2024 um 17:55 + schrieb Qing Zhao: > > > > Hi, > > > > > > > > I am w

Re: [PATCH 2/2] RISC-V: Use dynamic shadow offset

2024-11-20 Thread Jeff Law
On 11/14/24 9:14 PM, Kito Cheng wrote: Switch to dynamic offset so that we can support Sv39, Sv48, and Sv57 at the same time without building multiple libasan versions! [1] https://github.com/llvm/llvm-project/commit/da0c8b275564f814a53a5c19497669ae2d99538d gcc/ChangeLog: * config/

Re: [PATCH htdocs] bugs: mention ASAN too

2024-11-20 Thread Sam James
Sam James writes: > Request that reporters try `-fsanitize=address,undefined` rather than > just `-fsanitize=undefined` when reporting bugs. We get invalid bug > reports which ASAN would've caught sometimes, even if it's less often > than where UBSAN would help. > --- > OK? Ping. > > htdocs/bu

Re: [PATCH] aarch64: Fix aarch64 after moving to C23

2024-11-20 Thread Richard Sandiford
Andrew Pinski writes: > This fixes a few aarch64 specific testcases after the move to default to GNU > C23. > For the SME testcases, I decided to add a new one for the GNU C23 case as > `()` changing > to mean `(void)` instead of a non-prototype declaration and add `-std=gnu17` > to the old one

Re: [Committed] RISC-V: testsuite: restrict big endian test to non vector

2024-11-20 Thread Edwin Lu
Pushed. Edwin On 11/19/2024 1:11 PM, Jeff Law wrote: On 11/19/24 2:08 PM, Edwin Lu wrote: RISC-V vector currently does not support big endian so the postcommit was getting the sorry, not implemented error on vector targets. Restrict the testcase to non-vector targets gcc/testsuite/ChangeLog

Re: [PATCH] rtl-reader: Disable reuse_rtx support for generator building

2024-11-20 Thread Richard Sandiford
Andrew Pinski writes: > reuse_rtx is not documented nor the format to use it is ever documented. > So it should not be supported for the .md files. > > This also fixes the problem if an invalid index is supplied for reuse_rtx, > instead of ICEing, put out a real error message. Note since this cod

Re: [PATCH] tree-optimization/117698 - SLP vectorization and alignment

2024-11-20 Thread Richard Biener
On Wed, 20 Nov 2024, Richard Biener wrote: > When SLP vectorizing we fail to mark the general alignment check > as irrelevant when using VMAT_STRIDED_SLP (the implementation checks > for itself) and when VMAT_INVARIANT the override isn't effective. > > This results in extra FAILs on sparc which t

Re: Should -fsanitize=bounds support counted-by attribute for pointers inside a structure?

2024-11-20 Thread Qing Zhao
Hi, Martin, Thanks a lot for pointing this out. This does look like a problem we need avoid for the pointer arrays. Does the same problem exist in the language extension too if the n is allowed to be changed after initialization? If so, for the future language extension, is there any propose

Re: [PATCH] phiopt: Improve spaceship_replacement for HONOR_NANS [PR117612]

2024-11-20 Thread Richard Biener
On Wed, 20 Nov 2024, Jakub Jelinek wrote: > Hi! > > The following patch optimizes spaceship followed by comparisons of the > spaceship value even for floating point spaceship when NaNs can appear. > operator<=> for this emits roughly > signed char c; if (i == j) c = 0; else if (i < j) c = -1; els

Re: [PATCH] phiopt: Fix a pasto in spaceship_replacement [PR117612]

2024-11-20 Thread Richard Biener
On Wed, 20 Nov 2024, Jakub Jelinek wrote: > Hi! > > When working on the PR117612 fix, I've noticed a pasto in > tree-ssa-phiopt.cc (spaceship_replacement). > The code is > if (absu_hwi (tree_to_shwi (arg2)) != 1) > return false; > if (e1->flags & EDGE_TRUE_VALUE) > { >

[PATCH] phiopt: Improve spaceship_replacement for HONOR_NANS [PR117612]

2024-11-20 Thread Jakub Jelinek
Hi! The following patch optimizes spaceship followed by comparisons of the spaceship value even for floating point spaceship when NaNs can appear. operator<=> for this emits roughly signed char c; if (i == j) c = 0; else if (i < j) c = -1; else if (i > j) c = 1; else c = 2; and I believe the /*

[PATCH] phiopt: Fix a pasto in spaceship_replacement [PR117612]

2024-11-20 Thread Jakub Jelinek
Hi! When working on the PR117612 fix, I've noticed a pasto in tree-ssa-phiopt.cc (spaceship_replacement). The code is if (absu_hwi (tree_to_shwi (arg2)) != 1) return false; if (e1->flags & EDGE_TRUE_VALUE) { if (tree_to_shwi (arg0) != 2 || absu_h

Re: [PATCH] testsuite: arm: Check that a far jump is used in thumb1-far-jump-2.c

2024-11-20 Thread Richard Earnshaw (lists)
On 08/11/2024 18:29, Christophe Lyon wrote: > On Fri, 8 Nov 2024 at 19:20, Torbjörn SVENSSON > wrote: >> >> Ok for trunk? >> >> -- >> >> With the changes in r15-1579-g792f97b44ff, the code used as "padding" in >> the test case is optimized way. Prevent this optimization by forcing a >> read of the

Re: [PATCH] c-family, docs: Adjust descriptions/documentation for C23 publication

2024-11-20 Thread Joseph Myers
On Wed, 20 Nov 2024, Jakub Jelinek wrote: > --- gcc/c-family/c.opt.jj 2024-11-20 14:45:02.092732924 +0100 > +++ gcc/c-family/c.opt2024-11-20 17:08:03.230401954 +0100 > @@ -2609,7 +2609,7 @@ Conform to the ISO 2017 C standard (publ > > std=c23 > C ObjC > -Conform to the ISO 2023 C s

Re: [PATCH v4 6/8] gcn: Add else operand to masked loads.

2024-11-20 Thread Andrew Stubbs
On 11/7/24 18:02, Andrew Stubbs wrote: On 07/11/2024 17:57, Robin Dapp wrote: From: Robin Dapp This patch adds an undefined else operand to the masked loads. gcc/ChangeLog: * config/gcn/predicates.md (maskload_else_operand): New predicate. * config/gcn/gcn-valu.md: Use new predic

[PATCH] c-family, docs: Adjust descriptions/documentation for C23 publication

2024-11-20 Thread Jakub Jelinek
Hi! As C23 has been published already https://www.iso.org/standard/82075.html we don't need to say that it is expected to be published etc. Furthermore, standards.texi was still documenting that -std=gnu17 is the default. Ok for trunk? 2024-11-20 Jakub Jelinek gcc/ * doc/invoke.texi

[PATCH] tree-optimization/117709 - bogus offset for gather load

2024-11-20 Thread Richard Biener
When diverting to VMAT_GATHER_SCATTER we fail to zero *poffset which was previously set if a load was classified as VMAT_CONTIGUOUS_REVERSE. The following refactors get_group_load_store_type a bit to avoid this but this all needs some serious TLC. Bootstrapped on x86_64-unknown-linux-gnu, testing

Re: [PATCH] libgccjit: Add support for machine-dependent builtins

2024-11-20 Thread David Malcolm
On Tue, 2024-11-19 at 21:45 +0100, Mark Wielaard wrote: > Hi, > > Random request... > > On Tue, Nov 19, 2024 at 11:14:38AM -0500, David Malcolm wrote: > > > Here's the updated patch and answers below. > > > > > > (GitHub link if you find it easier for review: > > > https://github.com/antoyo/lib

Re: [PATCH] libgccjit: Add support for machine-dependent builtins

2024-11-20 Thread Antoni Boucher
Hi Mark. I've been following this forge experiment with great interest; thanks for doing this. I first created this GitHub repo as a way to keep track of the different status of my patches. From what I understand, pull requests on forge.sourceware.org can be removed at any time, so I could l

Re: [PATCH 17/17] testsuite: arm: Use effective-target for pr96939 test

2024-11-20 Thread Richard Earnshaw (lists)
On 20/11/2024 15:04, Torbjorn SVENSSON wrote: > > > On 2024-11-20 15:53, Richard Earnshaw (lists) wrote: >> On 20/11/2024 13:00, Torbjorn SVENSSON wrote: >>> >>> >>> On 2024-11-19 18:57, Richard Earnshaw (lists) wrote: On 19/11/2024 10:24, Torbjörn SVENSSON wrote: > Update test case to u

Re: [PATCH] libgccjit: Allow sending a const pointer as argument

2024-11-20 Thread David Malcolm
On Thu, 2023-12-21 at 11:59 -0500, Antoni Boucher wrote: > Hi. > This patch adds the ability to send const pointer as argument to a > function. > Thanks for the review. Sorry for the long delay in responding to this. I'm a bit worried that this might break some type-safety within libgccjit, or th

Re: Should -fsanitize=bounds support counted-by attribute for pointers inside a structure?

2024-11-20 Thread Martin Uecker
Am Mittwoch, dem 20.11.2024 um 15:27 + schrieb Qing Zhao: > > > On Nov 19, 2024, at 10:47, Marek Polacek wrote: > > > > On Mon, Nov 18, 2024 at 07:10:35PM +0100, Martin Uecker wrote: > > > Am Montag, dem 18.11.2024 um 17:55 + schrieb Qing Zhao: > > > > Hi, > .. Hi Qing, > Per our disc

Re: [PATCH] libgccjit: Allow comparing aligned int types

2024-11-20 Thread David Malcolm
On Thu, 2024-02-22 at 12:40 -0500, Antoni Boucher wrote: > Thanks for the review. > Here's the updated patch. Thanks; the updated patch is good for trunk. Dave > > On Wed, 2024-01-24 at 12:18 -0500, David Malcolm wrote: > > On Thu, 2023-12-21 at 08:33 -0500, Antoni Boucher wrote: > > > Hi. > >

Re: Should -fsanitize=bounds support counted-by attribute for pointers inside a structure?

2024-11-20 Thread Qing Zhao
> On Nov 19, 2024, at 12:18, Kees Cook wrote: > > On Tue, Nov 19, 2024 at 05:41:13PM +0100, Martin Uecker wrote: >> Am Dienstag, dem 19.11.2024 um 10:47 -0500 schrieb Marek Polacek: >>> On Mon, Nov 18, 2024 at 07:10:35PM +0100, Martin Uecker wrote: Am Montag, dem 18.11.2024 um 17:55 +

Re: [PATCH v3 5/7] vect-simd-clone-1[6-8][cd].c: Expect in-branch clones for x86

2024-11-20 Thread Richard Biener
On Sun, Nov 10, 2024 at 1:56 PM H.J. Lu wrote: > > Since the C frontend no longer promotes char and short arguments, expect > in-branch clones for x86. This is OK once the prerequisites are approved. Richard. > PR middle-end/14907 > * gcc.dg/vect/vect-simd-clone-16c.c: Expect in

Re: Should -fsanitize=bounds support counted-by attribute for pointers inside a structure?

2024-11-20 Thread Qing Zhao
> On Nov 19, 2024, at 10:47, Marek Polacek wrote: > > On Mon, Nov 18, 2024 at 07:10:35PM +0100, Martin Uecker wrote: >> Am Montag, dem 18.11.2024 um 17:55 + schrieb Qing Zhao: >>> Hi, >>> >>> I am working on extending “counted_by” attribute to pointers inside a >>> structure per our previ

Re: Should -fsanitize=bounds support counted-by attribute for pointers inside a structure?

2024-11-20 Thread Qing Zhao
> On Nov 19, 2024, at 16:36, Martin Uecker wrote: > > Am Montag, dem 18.11.2024 um 21:31 + schrieb Qing Zhao: >> >>> On Nov 18, 2024, at 13:10, Martin Uecker wrote: >> > ... >> So, I guess that the more accurate question is, for the following: >> >> struct annotated { >> int b; >> int

Backported to gcc 14 (7 patches mostly relating to diagnostics, SARIF, analyzer)

2024-11-20 Thread David Malcolm
I've backported the following 7 patches from trunk to releases/gcc-14: * testsuite: fix analyzer C++ failures on Solaris [PR111475] https://gcc.gnu.org/pipermail/gcc-patches/2024-May/650629.html * Trunk: r15-131-g5219414f3cde3c * gcc 14: r14-10951-g156051d083d91f * regenerate-opt-urls.py: f

Re: [PATCH 11/17] testsuite: arm: Use effective-target for pr56184.C and pr59985.C

2024-11-20 Thread Richard Earnshaw
On 20/11/2024 10:49, Richard Earnshaw (lists) wrote: > On 20/11/2024 07:58, Torbjorn SVENSSON wrote: >> >> >> On 11/19/24 18:08, Richard Earnshaw (lists) wrote: >>> On 19/11/2024 10:24, Torbjörn SVENSSON wrote: Update test cases to use -mcpu=unset/-march=unset feature introduced in r15-36

Re: [PATCH 17/17] testsuite: arm: Use effective-target for pr96939 test

2024-11-20 Thread Torbjorn SVENSSON
On 2024-11-20 15:53, Richard Earnshaw (lists) wrote: On 20/11/2024 13:00, Torbjorn SVENSSON wrote: On 2024-11-19 18:57, Richard Earnshaw (lists) wrote: On 19/11/2024 10:24, Torbjörn SVENSSON wrote: Update test case to use -mcpu=unset/-march=unset feature introduced in r15-3606-g7d6c6a0d15

[PATCH] testsuite: Require C99 for pow-to-ldexp.c

2024-11-20 Thread Soumya AR
pow-to-ldexp.c checks for calls to __builtin_ldexpf and __builtin_ldexpl, which will only be performed when the compiler knows the target has a C99 libm available. Modified the test to add a C99 runtime requirement. This fixes the failure on arm-eabi targets for this test case. Committed as obvi

Re: [patch,avr] PR84211: Add a new post reload optimization pass

2024-11-20 Thread Andreas Schwab
../../gcc/config/avr/avr-passes.cc: In member function ‘void {anonymous}::memento_t::apply_insn1(rtx_insn*, bool)’: ../../gcc/config/avr/avr-passes.cc:2119:9: error: no match for ‘operator&=’ (operand types are ‘{anonymous}::gprmask_t’ {aka ‘unsigned int’} and ‘HARD_REG_SET’) 2119 | known &=

Re: [PATCH v3 6/7] scev-cast.c: Adjusted

2024-11-20 Thread Richard Biener
On Sun, Nov 10, 2024 at 1:56 PM H.J. Lu wrote: > > Since the C frontend no longer promotes char argument, adjust scev-cast.c. I wonder whether the adjusted testcase would pass now already for !PROMOTE_PROTOTYPE targets and thus whether the { target i?86-*-* x86_64-*-* } is still necessary after t

  1   2   >