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: 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: 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: [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-

[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] 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] 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] 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] 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] 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 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

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.

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] 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 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 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

[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 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 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: 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 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 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

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] 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

[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] 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

[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 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: [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

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: 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] 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

[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

[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] 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

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

2024-11-20 Thread Richard Sandiford
"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-end/117098 >> > * calls.cc (store_one_arg): Adjust BLKmode argument size for >> >

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: 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: [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] 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: [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 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

[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: 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

[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: [PATCH] libgccjit: Support signed char flag

2024-11-20 Thread David Malcolm
On Thu, 2024-02-22 at 15:29 -0500, Antoni Boucher wrote: > Thanks for the review and idea. Thanks for the updated patch; sorry about the delay in reviewing. > > Here's the updated patch. I added a test, but I could not set - > fsigned- > char as this is not an option accepted by the jit frontend

Re: [PATCH v2 04/14] tree-phinodes: Use 4 instead of 2 as the minimum number of phi args

2024-11-20 Thread Richard Biener
On Tue, Nov 19, 2024 at 5:46 PM Lewis Hyatt wrote: > > On Tue, Nov 19, 2024 at 9:59 AM Richard Biener > wrote: > > > > On Sun, Nov 17, 2024 at 4:28 AM Lewis Hyatt wrote: > > > > > > Currently, when we allocate a gphi object, we round up the capacity for > > > the > > > trailing arguments array

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

2024-11-20 Thread Richard Biener
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 any size location_t. Update the usage of > line maps within libcpp accord

Re: [PATCH v2 1/3] cfgexpand: Factor out getting the stack decl index

2024-11-20 Thread Richard Biener
On Sat, Nov 16, 2024 at 5:27 AM Andrew Pinski wrote: > > This is the first patch in improving this code. > Since there are a few places which get the index and they > check the same thing, let's factor that out into one function. > > Bootstrapped and tested on x86_64-linux-gnu. OK. Thanks, Richa

Re: [PATCH v2 06/14] Support for 64-bit location_t: Frontend parts

2024-11-20 Thread Richard Biener
On Sun, Nov 17, 2024 at 4:29 AM Lewis Hyatt wrote: > > The C/C++ frontend code contains a couple instances where a callback > receiving a "location_t" argument is prototyped to take "unsigned int" > instead. This will make a difference once location_t can be configured to a > different type, so ad

Re: [PATCH 02/15] libcpp: Fix potential unaligned access in cpp_buffer

2024-11-20 Thread Richard Biener
On Sun, Nov 3, 2024 at 11:23 PM Lewis Hyatt wrote: > > libcpp makes use of the cpp_buffer pfile->a_buff to store things while it is > handling macros. It uses it to store pointers (cpp_hashnode*, for macro > arguments) and cpp_macro objects. This works fine because a cpp_hashnode* > and a cpp_macr

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

2024-11-20 Thread Surya Kumari Jangala
rs6000: Inefficient vector splat of small V2DI constants [PR107757] On P8, for vector splat of double word constants, specifically -1 and 1, gcc generates inefficient code. For -1, gcc generates two instructions (vspltisw and vupkhsw) whereas only one instruction (vspltisw) is sufficient. For cons

Re: [PATCH v2 10/14] Support for 64-bit location_t: gimple parts

2024-11-20 Thread Richard Biener
On Tue, Nov 19, 2024 at 4:43 PM Lewis Hyatt wrote: > > On Tue, Nov 19, 2024 at 10:06 AM Richard Biener > wrote: > > > > On Sun, Nov 17, 2024 at 4:30 AM Lewis Hyatt wrote: > > > > > > The size of struct gimple increases by 8 bytes with the change in size of > > > location_t from 32- to 64-bit; ad

Re: [PATCH v2] Fix MV clones can not redirect to specific target on some targets

2024-11-20 Thread Andrew Carlotti
On Sun, Oct 27, 2024 at 04:00:43PM +, Yangyu Chen wrote: > Following the implementation of commit b8ce8129a5 ("Redirect call > within specific target attribute among MV clones (PR ipa/82625)"), > we can now optimize calls by invoking a versioned function callee > from a caller that shares the s

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

2024-11-20 Thread Christophe Lyon
On Tue, 19 Nov 2024 at 15:00, Andre Vieira (lists) wrote: > > 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

Re: [PATCH v2 3/3] cfgexpand: Handle integral vector types and constructors for scope conflicts [PR105769]

2024-11-20 Thread Richard Biener
On Sat, Nov 16, 2024 at 5:24 AM Andrew Pinski wrote: > > This is an expansion of the last patch to also track pointers via vector > types and the > constructor that are used with vector types. > In this case we had: > ``` > _15 = (long unsigned int) &bias; > _10 = (long unsigned int) &cov_jn; > _

[PATCH]middle-end: Pass along SLP node when costing vector loads/stores

2024-11-20 Thread Tamar Christina
Hi All, With the support to SLP only we now pass the VMAT through the SLP node, however the majority of the costing calls inside vectorizable_load and vectorizable_store do no pass the SLP node along. Due to this the backend costing never sees the VMAT for these cases anymore. Additionally the

Re: [RFC PATCH 1/5] vect: Force alignment peeling to vectorize more early break loops

2024-11-20 Thread Richard Sandiford
Sorry for the slow review. Finally catching up on backlog. Richard Biener writes: > On Mon, 28 Oct 2024, Alex Coplan wrote: > >> This allows us to vectorize more loops with early exits by forcing >> peeling for alignment to make sure that we're guaranteed to be able to >> safely read an entire v

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

2024-11-20 Thread Sam James
Martin Uecker writes: > 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 previous discussion. >> >> I need advice on the following question: >> >> Should -fsantize=bounds suppor

Re: [patch,avr] Adjust comment headers

2024-11-20 Thread Georg-Johann Lay
Am 18.11.24 um 09:03 schrieb Georg-Johann Lay: Am 16.11.24 um 13:19 schrieb Gerald Pfeifer: On Mon, 2 Sep 2024, Georg-Johann Lay wrote: Atmel is no more the AVR manufacturer.  This patch removes the manufacturer from the file headers. We also have    AVR    Manufacturer: Atmel    href="https

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

2024-11-20 Thread 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 working on extending “counted_by” attribute to pointers inside a > > structure per our previous discussion. > > > > I need advice on the following qu

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

2024-11-20 Thread Richard Earnshaw (lists)
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 > effective-target arm_arch_v8a_hard. > > Signed-off-by:

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

2024-11-20 Thread Torbjorn SVENSSON
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-g7d6c6a0d15c. gcc/testsuite/ChangeLog: * gcc.target/arm/lto/pr96939_0.c: Use effective-target ar

[r15-5489 Regression] FAIL: gcc.target/i386/pr116174.c check-function-bodies foo on Linux/x86_64

2024-11-20 Thread haochen.jiang
On Linux/x86_64, 6350e956d1a74963a62bedabef3d4a1a3f2d4852 is the first bad commit commit 6350e956d1a74963a62bedabef3d4a1a3f2d4852 Author: MayShao-oc Date: Thu Nov 7 10:57:02 2024 +0800 Add microarchtecture tunable for pass_align_tight_loops [PR117438] caused FAIL: gcc.target/i386/pr11617

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

2024-11-20 Thread Torbjorn SVENSSON
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-3606-g7d6c6a0d15c. gcc/testsuite/ChangeLog: * g++.dg/other/pr56184.C: Use effective-target arm_arch_v7

[PATCH v1 2/3] RISC-V: Introduce riscv/rvv/autovec/sat folder to rvv.exp testsuite

2024-11-20 Thread pan2 . li
From: Pan Li After we move vector SAT_ADD testcases into a isolated folder, aka riscv/rvv/autovec/sat. We would like to add the folder as one of the test items of the rvv.exp testsuite. The below test suites are passed for this patch. * The rv64gcv fully regression test. It is test only patch

Re: [PATCH] SVE intrinsics: Fold svmul and svdiv by -1 to svneg for unsigned types

2024-11-20 Thread Jennifer Schmitz
> On 13 Nov 2024, at 12:54, Richard Sandiford wrote: > > External email: Use caution opening links or attachments > > > Jennifer Schmitz writes: >> As follow-up to >> https://gcc.gnu.org/pipermail/gcc-patches/2024-October/665472.html, >> this patch implements folding of svmul and svdiv by -1

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

2024-11-20 Thread Richard Earnshaw (lists)
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-by: Torbjörn SVENSSON > --- > gcc/testsuite

Re: [PATCH v2 08/14] Support for 64-bit location_t: Analyzer parts

2024-11-20 Thread Richard Biener
On Sun, Nov 17, 2024 at 4:28 AM Lewis Hyatt wrote: > > The analyzer occasionally prints internal location_t values for debugging; > adjust those parts so they will work if location_t is 64-bit. For > simplicity, to avoid hassling with the printf format string, just convert to > (unsigned long long

Re: [PATCH v2 12/14] Support for 64-bit location_t: Backend parts

2024-11-20 Thread Richard Biener
On Sun, Nov 17, 2024 at 4:30 AM Lewis Hyatt wrote: > > A few targets have been using "unsigned int" function arguments that need to > receive a "location_t". Change to "location_t" to prepare for the > possibility that location_t can be configured to be a different type. I guess the point was tha

Re: [PATCH v2 07/14] Support for 64-bit location_t: toplev parts

2024-11-20 Thread Richard Biener
On Sun, Nov 17, 2024 at 4:28 AM Lewis Hyatt wrote: > > With the move from 32-bit to 64-bit location_t, the recommended number of > range bits will change from 5 to 7. line-map.h now exports the recommended > setting, so use that instead of hard-coding 5. > > Also silently ignore -flarge-source-fil

Re: [PATCH] i386: Remove workaround for Solaris ld 64-bit TLS IE limitation

2024-11-20 Thread Uros Bizjak
On Wed, Nov 20, 2024 at 11:44 AM Rainer Orth wrote: > > As detailed in PR target/43309, the Solaris linker initially took the > 64-bit x86 TLS IE code sequence literally, assuming that the spec only > allowed %rax as target register. > > A workaround has been in place for more than a decade, but i

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

2024-11-20 Thread Richard Earnshaw (lists)
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-3606-g7d6c6a0d15c. >>> >>> gcc/testsuite/ChangeLog: >>> >>>  

[PATCH] i386: Remove workaround for Solaris ld 64-bit TLS IE limitation

2024-11-20 Thread Rainer Orth
As detailed in PR target/43309, the Solaris linker initially took the 64-bit x86 TLS IE code sequence literally, assuming that the spec only allowed %rax as target register. A workaround has been in place for more than a decade, but is no longer necessary. The bug had already been fixed for Solar

Re: [PATCH 11/15] Support for 64-bit location_t: RTL parts

2024-11-20 Thread Richard Biener
On Sun, Nov 3, 2024 at 11:27 PM Lewis Hyatt wrote: > > Some RTL objects need to store a location_t. Currently, they store it in the > rt_int field of union rtunion, but in a world where location_t could be > 64-bit, they need to store it in a larger variable. Unfortunately, rtunion > does not curr

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

2024-11-20 Thread Richard Biener
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 the following fixes. Bootstrap and regtest running on

Re: [PATCH] SVE intrinsics: Fold svmul and svdiv by -1 to svneg for unsigned types

2024-11-20 Thread Richard Sandiford
Jennifer Schmitz writes: >> On 13 Nov 2024, at 12:54, Richard Sandiford >> wrote: >> >> External email: Use caution opening links or attachments >> >> >> Jennifer Schmitz writes: >>> As follow-up to >>> https://gcc.gnu.org/pipermail/gcc-patches/2024-October/665472.html, >>> this patch implem

Re: [PATCH v2 1/4] aarch64: return scalar fp8 values in fp registers

2024-11-20 Thread Claudio Bantaloukas
On 19/11/2024 17:01, Andrew Pinski wrote: On Fri, Nov 8, 2024 at 8:11 AM Claudio Bantaloukas wrote: According to the aapcs64: If the argument is an 8-bit (...) precision Floating-point or short vector type and the NSRN is less than 8, then the argument is allocated to the least significant b

[PATCH] Use decl size in Solaris ASM_DECLARE_OBJECT_NAME [PR102296]

2024-11-20 Thread Rainer Orth
Solaris has modified versions of ASM_DECLARE_OBJECT_NAME on both i386 and sparc. When commit ce597aedd79e646c4a5517505088d380239cbfa5 Author: Ilya Enkovich Date: Thu Aug 7 08:04:55 2014 + elfos.h (ASM_DECLARE_OBJECT_NAME): Use decl size instead of type size. was applied, those were m

[PATCH] Optimize 128-bit vector permutation with pand, pandn and por.

2024-11-20 Thread Cui, Lili
Hi, all This patch aims to handle certain vector shuffle operations using pand, pandn and por more efficiently. Bootstrapped and regtested on x86_64-pc-linux-gnu, OK for trunk? Regards, Lili. This patch introduces a new subroutine in ix86_expand_vec_perm_const_1. On x86, use mixed constant pe

Re: [PATCH v2 05/14] gimple: Handle tail padding when computing gimple_ops_offset

2024-11-20 Thread Richard Biener
On Tue, Nov 19, 2024 at 4:37 PM Lewis Hyatt wrote: > > On Tue, Nov 19, 2024 at 9:55 AM Richard Biener > wrote: > > > > On Sun, Nov 17, 2024 at 4:25 AM Lewis Hyatt wrote: > > > > > > The array gimple_ops_offset_[], which is used to find the trailing op[] > > > array for a given gimple struct, is

Re: [PATCH 16/17] testsuite: arm: Use effective-target for its.c test [PR94531]

2024-11-20 Thread Torbjorn SVENSSON
On 2024-11-19 18:51, Richard Earnshaw (lists) wrote: On 19/11/2024 10:24, Torbjörn SVENSSON wrote: The test case gcc.target/arm/its.c was created together with restriction of IT blocks for Cortex-M7. As the test case fails on all tunes that does not match Cortex-M7, explicitly test it for Cor

Re: [PATCH] tree-optimization/117574 - bougs niter lt-to-ne

2024-11-20 Thread Richard Biener
On Fri, 15 Nov 2024, Richard Biener wrote: > When trying to change a IV from IV0 < IV1 to IV0' != IV1' we apply > fancy adjustments to the may_be_zero condition we compute rather > than using the obvious IV0->base >= IV1->base expression (to be > able to use > instead of >=?). This doesn't seem t

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

2024-11-20 Thread Richard Biener
On Wed, Nov 20, 2024 at 11:24 AM Rainer Orth wrote: > > 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

Re: [PATCH 00/15] Fix data races with sub-longword accesses on Alpha

2024-11-20 Thread John Paul Adrian Glaubitz
Hi Maciej On Mon, 2024-11-18 at 02:59 +, Maciej W. Rozycki wrote: > This has come out of a discussion[1] around the removal of non-BWX Alpha > support from the Linux kernel due to data races affecting RCU algorithms. > (...) > Comments, questions, voices of concern or appreciation, all ver

Re: [PATCH 03/15] tree-cfg: Fix call to next_discriminator_for_locus()

2024-11-20 Thread Richard Biener
On Sun, Nov 3, 2024 at 11:23 PM Lewis Hyatt wrote: > > While testing 64-bit location_t support, I ran into an -fcompare-debug issue > that was traced back here. Despite the name, next_discriminator_for_locus() > is meant to take an integer line number argument, not a location_t. There is > one cal

Re: [PATCH 16/17] testsuite: arm: Use effective-target for its.c test [PR94531]

2024-11-20 Thread Richard Earnshaw (lists)
On 20/11/2024 10:11, Torbjorn SVENSSON wrote: > > > On 2024-11-19 18:51, Richard Earnshaw (lists) wrote: >> On 19/11/2024 10:24, Torbjörn SVENSSON wrote: >>> The test case gcc.target/arm/its.c was created together with restriction >>> of IT blocks for Cortex-M7. As the test case fails on all tune

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

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

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

2024-11-20 Thread Andrew Pinski
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 code still uses atoi, an invalid in

[PATCH v1 3/3] RISC-V: Refine the rtl dump expand check for vector SAT_ADD

2024-11-20 Thread pan2 . li
From: Pan Li This patch would like to remove the unnecessary option for the vector SAT_ADD testcases at first. And the different optimization option like O2 and O3 will be passed to the test files for rtl expand dump check. If there are different dump check times for different optimization opti

Re: [PATCH v3 2/7] Add expand_promote_outgoing_argument

2024-11-20 Thread Richard Biener
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 wonder if we should instead handle this in the generic builtin expansion

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

[to-be-committed][RISC-V][PR target/116590] Avoid emitting multiple instructions from fmacc patterns

2024-11-20 Thread Jeff Law
So much like my patch from last week, this removes alternatives that create multiple instructions that we really should have never needed. In this case it fixes one of two bugs in pr116590. In particular we don't want vmvNr instructions for thead-vector. Those instructions were emitted as pa

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:30, Martin Uecker wrote: > > Am Dienstag, dem 19.11.2024 um 09:18 -0800 schrieb 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 +01

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

  1   2   >