Re: [PATCH v2 6/9] aarch64: Use symbols without offset to prevent relocation issues

2024-09-12 Thread Martin Storsjö
On Thu, 12 Sep 2024, Evgeny Karpov wrote: Thursday, September 12, 2024 Martin Storsjö wrote: This looks very reasonable - I presume this will make sure that you only use the other code form if the offset actually is larger than 1 MB. For the case when the offset actually is larger than 1 MB,

Re: [PATCH] JSON dumping for GENERIC trees

2024-09-12 Thread Thor Preimesberger
> There are three oddities I immediately notice: > > The PLUS_EXPR operands are in a array "operands" while the RETURN_EXPR > "operand" or "child pointer" is refered to from "return_expr". I think both > are > tcc_expression trees and the operands are in exp.operands. Ideally the > JSON would mo

[PATCH] Try fixing RISC-V .SELECT_VL with SLP

2024-09-12 Thread Richard Biener
The following simply removes a seemingly bogus guard. * tree-vect-loop.cc (vect_analyze_loop_1): Remove SLP guard from .SELECT_VL disabling. --- gcc/tree-vect-loop.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/tree-vect-loop.cc b/gcc/tree-vect-loop.cc

[PATCH v1] Match: Remove unnecessary types_match for case 1 of signed SAT_ADD

2024-09-12 Thread pan2 . li
From: Pan Li Given all commutative binary operators requires types matching for both operands. Remove the types_match check for case 1 of the signed SAT_ADD, because we have (bit_xor @0 @1), which ensure the operands have the correct TREE type. The below test suites are passed for this patch. *

[patch, teststuite, Fortran, committed] Fix endianness issue on test case

2024-09-12 Thread Thomas Koenig
I just committed the fix for PR 116653 as obvious. Unfortunately, I left out the description in the ChangeLog, I hope it is clear enough. Best regards Thomas https://gcc.gnu.org/g:5d9486c29938d79beb798dce1a5509da54fe8c9f commit r15-3619-g5d9486c29938d79beb798dce1a5509da54fe8c9f Author

[PATCH] s390: Fix TF to FPRX2 conversion [PR115860]

2024-09-12 Thread Stefan Schulze Frielinghaus
Bootstrapped and regtested on s390. Approved offlist and as also discussed offlist I went for removing format specifier %V. This fixes FAIL: g++.dg/cpp23/ext-floating14.C -std=gnu++23 execution test FAIL: g++.dg/cpp23/ext-floating14.C -std=gnu++26 execution test FAIL: c-c++-common/ubsan/float-

[PATCH] s390: Fix AQ and AR constraints

2024-09-12 Thread Stefan Schulze Frielinghaus
Ensure for AQ and AR constraints that the resulting displacement after adding any positive offset less than the size of the object being referenced is still valid. Bootstrapped and regtested on s390. As approved by https://gcc.gnu.org/pipermail/gcc-patches/2024-September/662865.html I will push s

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

2024-09-12 Thread pan2 . li
From: Pan Li This patch would like to add testcases of the signed scalar SAT_ADD for form 2. Aka: Form 2: #define DEF_SAT_S_ADD_FMT_2(T, UT, MIN, MAX) \ T __attribute__((noinline)) \ sat_s_add_##T##_fmt_2 (T x, T y) \ {

[PATCH v1] RISC-V: Fix signed SAT_ADD test case for int64_t

2024-09-12 Thread pan2 . li
From: Pan Li The int8_t test for signed SAT_ADD is sat_s_add-1.c, the sat_s_add-4.c should be for int64_t. Thus, update sat_s_add-4.c for int64_t type. gcc/testsuite/ChangeLog: * gcc.target/riscv/sat_s_add-4.c: Update test for int64_t instead of int8_t. Signed-off-by: Pan Li

[PATCH] testsuite: a few more hostedlib adjustments

2024-09-12 Thread Alexandre Oliva
On Sep 12, 2024, Mike Stump wrote: > On Sep 3, 2024, at 11:44 PM, Alexandre Oliva wrote: >> >> Here's an updated and refreshed version that gets trunk built with >> --disable-hosted-libstdcxx on x86_64-linux-gnu to not get any spurious >> fails during in-tree testing. Also bootstrapped on host

Ping: [PATCH] testsuite/gcc.dg/pr84877.c: Add machinery to stabilize stack aligmnent

2024-09-12 Thread Hans-Peter Nilsson
Ping... > From: Hans-Peter Nilsson > Date: Thu, 5 Sep 2024 17:44:52 +0200 > > Tested adding 0..more-than-four environment variables, > running cris-sim+cris-elf. I also checked that foo stays > the same generated code regardless of the new code: this is > not obviously true as foo is "just" noi

[PATCH v4 4/4] RISC-V: Fix vector SAT_ADD dump check due to middle-end change

2024-09-12 Thread pan2 . li
From: Pan Li This patch would like fix the dump check times of vector SAT_ADD. The middle-end change makes the match times from 2 to 4 times. The below test suites are passed for this patch. * The rv64gcv fully regression test. gcc/testsuite/ChangeLog: * gcc.target/riscv/rvv/autovec/b

[PATCH v4 3/4] Match: Support form 3 for scalar signed integer .SAT_ADD

2024-09-12 Thread pan2 . li
From: Pan Li This patch would like to support the form 3 of the scalar signed integer .SAT_ADD. Aka below example: Form 3: #define DEF_SAT_S_ADD_FMT_3(T, UT, MIN, MAX) \ T __attribute__((noinline))\ sat_s_add_##T##_fmt_3 (T x, T y)

[PATCH v4 2/4] Genmatch: Refine the gen_phi_on_cond by match_cond_with_binary_phi

2024-09-12 Thread pan2 . li
From: Pan Li This patch would like to leverage the match_cond_with_binary_phi to match the phi on cond, and get the true/false arg if matched. This helps a lot to simplify the implementation of gen_phi_on_cond. Before this patch: basic_block _b1 = gimple_bb (_a1); if (gimple_phi_num_args (_a1)

[PATCH v4 1/4] Match: Add interface match_cond_with_binary_phi for true/false arg

2024-09-12 Thread pan2 . li
From: Pan Li When matching the cond with 2 args phi node, we need to figure out which arg of phi node comes from the true edge of cond block, as well as the false edge. This patch would like to add interface to perform the action and return the true and false arg in TREE type. There will be som

Re: [PATCH v2] testsuite: introduce hostedlib effective target

2024-09-12 Thread Mike Stump
On Sep 3, 2024, at 11:44 PM, Alexandre Oliva wrote: > > Here's an updated and refreshed version that gets trunk built with > --disable-hosted-libstdcxx on x86_64-linux-gnu to not get any spurious > fails during in-tree testing. Also bootstrapped on hosted > x86_64-linux-gnu. Ok to install? Ok.

RE: [PATCH] aarch64: Improve vector constant generation using SVE INDEX instruction [PR113328]

2024-09-12 Thread Pengxuan Zheng (QUIC)
> > Pengxuan Zheng writes: > > > SVE's INDEX instruction can be used to populate vectors by values > > > starting from "base" and incremented by "step" for each subsequent > > > value. We can take advantage of it to generate vector constants if > > > TARGET_SVE is available and the base and step v

[PATCH v2 6/9] aarch64: Use symbols without offset to prevent relocation issues

2024-09-12 Thread Evgeny Karpov
Thursday, September 12, 2024 Martin Storsjö wrote: > This looks very reasonable - I presume this will make sure that you only > use the other code form if the offset actually is larger than 1 MB. > > For the case when the offset actually is larger than 1 MB, I guess this > also ends up generating

RE: [PATCH 1/2] aarch64: Improve vector constant generation using SVE INDEX instruction [PR113328]

2024-09-12 Thread Pengxuan Zheng (QUIC)
> On Thu, Sep 12, 2024 at 2:53 AM Pengxuan Zheng > wrote: > > > > SVE's INDEX instruction can be used to populate vectors by values > > starting from "base" and incremented by "step" for each subsequent > > value. We can take advantage of it to generate vector constants if > > TARGET_SVE is availa

[PATCH v2 2/2] aarch64: Improve part-variable vector initialization with SVE INDEX instruction [PR113328]

2024-09-12 Thread Pengxuan Zheng
We can still use SVE's INDEX instruction to construct vectors even if not all elements are constants. For example, { 0, x, 2, 3 } can be constructed by first using "INDEX #0, #1" to generate { 0, 1, 2, 3 }, and then set the elements which are non-constants separately. PR target/113328 gcc

[PATCH] libstdc++: Tweak localized formatting for floating-point types

2024-09-12 Thread Jonathan Wakely
This adds some comments to explain what this rather subtle code is doing. It also replaces string::copy with using char_traits::copy directly, because the bounds checks and length adjustments that string::copy does are redundant here - we already ensure the lengths are correct. Tested x86_64-linux

[PATCH RFC] libstdc++: add #pragma diagnostic

2024-09-12 Thread Jason Merrill
Tested x86_64-pc-linux-gnu. Thoughts about the remaining warnings discussed below? Any other comments? -- 8< -- The use of #pragma GCC system_header in libstdc++ has led to bugs going undetected for a while due to the silencing of compiler warnings that would have revealed them promptly, and al

[PATCH] libstdc++: Refactor loops in std::__platform_semaphore

2024-09-12 Thread Jonathan Wakely
You might notice that this removes handling of EINVAL from the call to sem_timedwait. That error can only happen with a negative ts_nsec value, which can only happen for a timestamp before the epoch. We should handle that properly, not just for the case where ts_nsec happens to be negative. I opene

[PATCH] libstdc++: Enable most of for freestanding

2024-09-12 Thread Jonathan Wakely
This restores support for most of with -ffreestanding. In case there are users who want a minimal freestanding implementation that only provides what the standard guarantees, there's a new macro that disables again. This can be used to write more portable freestanding code that doesn't rely on b

[PATCH 1/2 v2] c++: Make __builtin_launder reject invalid types [PR116673]

2024-09-12 Thread Jonathan Wakely
On Thu, 12 Sept 2024 at 16:02, Jason Merrill wrote: > > On 9/12/24 4:49 AM, Jonathan Wakely wrote: > > Tested x86_64-linux. OK for trunk? > > > > -- >8 -- > > > > The standard says that std::launder is ill-formed for function pointers > > and cv void pointers, so there's no reason for __builtin_lau

[committed] libstdc++: Remove unused alias template in std::optional

2024-09-12 Thread Jonathan Wakely
Tested x86_64-linux. Pushed to trunk. -- >8 -- I added this __is_bool alias template in r15-2309-g6d86486292acbe but it isn't actually used so can be removed. libstdc++-v3/ChangeLog: * include/std/optional (__is_bool): Remove. --- libstdc++-v3/include/std/optional | 2 -- 1 file change

[PATCH] libquadmath: Fix typos

2024-09-12 Thread Andrew Kreimer
Fix typos in documentation, comments, etc. Signed-off-by: Andrew Kreimer --- libquadmath/configure | 2 +- libquadmath/math/rem_pio2q.c | 2 +- libquadmath/printf/printf_fp.c | 2 +- libquadmath/update-quadmath.py | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/

[patch, fortran, committed] module support for UNSIGNED

2024-09-12 Thread Thomas Koenig
Hello world, I just pushed Steve's patch for module support to trunk as obvious, as https://gcc.gnu.org/g:2847a541c1f19b67ae84be8d0f6dc8e1f9371d16 . Best regards Thomas gcc/fortran/ChangeLog: * module.cc (bt_types): Add BT_UNSIGNED. gcc/testsuite/ChangeLog: * gfortra

Re: [PATCH 1/2] c++: Make __builtin_launder reject invalid types [PR116673]

2024-09-12 Thread Jonathan Wakely
On Thu, 12 Sept 2024 at 19:38, Patrick Palka wrote: > > On Thu, 12 Sep 2024, Jonathan Wakely wrote: > > > Tested x86_64-linux. OK for trunk? > > > > -- >8 -- > > > > The standard says that std::launder is ill-formed for function pointers > > and cv void pointers, so there's no reason for __builtin

[PATCH v3] c++: deleting explicitly-defaulted functions [PR116162]

2024-09-12 Thread Marek Polacek
On Wed, Sep 11, 2024 at 10:25:34PM -0400, Jason Merrill wrote: > On 9/11/24 4:08 PM, Marek Polacek wrote: > > @@ -6503,10 +6504,17 @@ check_bases_and_members (tree t) > > bool fn_const_p = (copy == 2); > > if (fn_const_p && !imp_const_p) > > - /* If the function is defaulted

[committed] i386: Implement SAT_ADD for signed vector integers

2024-09-12 Thread Uros Bizjak
Enable V4QI, V2QI and V2HI mode signed saturated arithmetic insn patterns and add a couple of testcases to test for PADDSB and PADDSW instructions. PR target/112600 gcc/ChangeLog: * config/i386/mmx.md (3): Rename from *3. gcc/testsuite/ChangeLog: * gcc.target/i386/pr112600-3a.c

Re: [PATCH 1/2] c++: Make __builtin_launder reject invalid types [PR116673]

2024-09-12 Thread Patrick Palka
On Thu, 12 Sep 2024, Jonathan Wakely wrote: > Tested x86_64-linux. OK for trunk? > > -- >8 -- > > The standard says that std::launder is ill-formed for function pointers > and cv void pointers, so there's no reason for __builtin_launder to > accept them. This change allows implementations of std

Re: [PATCH v2] c++: Fix constrained auto deduction templ parms resolution [PR114915, PR115030]

2024-09-12 Thread Patrick Palka
On Mon, 12 Aug 2024, Seyed Sajad Kahani wrote: > When deducing auto for `adc_return_type`, `adc_variable_type`, and > `adc_decomp_type` contexts (at the usage time), we try to resolve the > outermost > template arguments to be used for satisfaction. This is done by one of the > following, dependi

Re: [PATCH] c++/modules: Merge default arguments [PR99274]

2024-09-12 Thread Patrick Palka
On Fri, 23 Aug 2024, Nathaniel Shead wrote: > On Thu, Aug 22, 2024 at 02:20:14PM -0400, Patrick Palka wrote: > > On Mon, 12 Aug 2024, Nathaniel Shead wrote: > > > > > Bootstrapped and regtested on x86_64-pc-linux-gnu, OK for trunk? > > > > > > I tried to implement a remapping of the slots for TA

[PATCH] Fix factor_out_conditional_operation heuristics for constants

2024-09-12 Thread Andrew Pinski
While working on a different patch, I noticed the heuristics were not doing the right thing if there was statements before the NOP/PREDICTs. (LABELS don't have other statements before them). This fixes that oversight which was added in r15-3334-gceda727dafba6e. Bootstrapped and tested on x86_64-l

Re: [PATCH v2 6/9] aarch64: Use symbols without offset to prevent relocation issues

2024-09-12 Thread Martin Storsjö
On Thu, 12 Sep 2024, Evgeny Karpov wrote: The current binutils implementation does not support offset up to 4GB in IMAGE_REL_ARM64_PAGEBASE_REL21 relocation and is limited to 1MB. This is related to differences in ELF and COFF relocation records. Yes, I agree. But I would not consider this a

Re: [PATCH] c++: explicit spec of constrained member tmpl [PR107522]

2024-09-12 Thread Patrick Palka
(Sorry to resurrect this thread so late, I lost track of this patch...) On Fri, 2 Dec 2022, Jason Merrill wrote: > On 12/2/22 09:30, Patrick Palka wrote: > > On Thu, 1 Dec 2022, Jason Merrill wrote: > > > > > On 12/1/22 14:51, Patrick Palka wrote: > > > > On Thu, 1 Dec 2022, Jason Merrill wrote:

Re: [RFC 0/4] Hard Register Constraints

2024-09-12 Thread Stefan Schulze Frielinghaus
On Thu, Sep 12, 2024 at 04:03:33PM +0200, Georg-Johann Lay wrote: > > > Am 10.09.24 um 16:20 schrieb Stefan Schulze Frielinghaus: > > This series introduces hard register constraints. The first patch > > enables hard register constraints for asm statements and for > > machine descriptions. The

[Patch] Fortran: Fixes to OpenMP 'interop' directive parsing support

2024-09-12 Thread Tobias Burnus
This patch fixes a couple of issues, like a missing white-space gobbling after matching an expression. It also reorganizes some code to handle 'identifier_"string"' vs. 'identifier' better as there were some diagnostic issues. (OpenMP requires for 'fr' that the argument is either an identifie

Re: [PATCH] libcpp, v5: Add support for gnu::base64 #embed parameter

2024-09-12 Thread Joseph Myers
On Thu, 12 Sep 2024, Jakub Jelinek wrote: > On Wed, Sep 11, 2024 at 10:23:20PM +, Joseph Myers wrote: > > On Fri, 30 Aug 2024, Jakub Jelinek wrote: > > > > > +should be no newlines in the string literal and because this parameter > > > +is meant namely for use by the preprocessor itself, ther

[PATCH v2 7/9] aarch64: Disable the anchors

2024-09-12 Thread Evgeny Karpov
This patch is not needed anymore, more information here. https://gcc.gnu.org/pipermail/gcc-patches/2024-September/662903.html Regards, Evgeny

[PATCH v2 6/9] aarch64: Use symbols without offset to prevent relocation issues

2024-09-12 Thread Evgeny Karpov
The current binutils implementation does not support offset up to 4GB in IMAGE_REL_ARM64_PAGEBASE_REL21 relocation and is limited to 1MB. This is related to differences in ELF and COFF relocation records. There are ways to fix this. This work on relocation change will be extracted to a separate bin

Re: [PATCH] testsuite: Sanitize pacbti test cases for Cortex-M

2024-09-12 Thread Richard Earnshaw (lists)
On 03/09/2024 13:57, Christophe Lyon wrote: > Hi Torbjörn, > > > On 9/3/24 11:30, Torbjörn SVENSSON wrote: >> >> Ok for trunk and releases/gcc-14? >> >> -- >> >> Some of the test cases were scanning for "bti", but it would, >> incorrectly, match the ".arch_extenssion pacbti". >> Also, keep test

Re: [PATCH] libcpp: Implement clang -Wheader-guard warning [PR96842]

2024-09-12 Thread David Malcolm
On Thu, 2024-09-12 at 17:18 +0200, Jakub Jelinek wrote: > On Thu, Sep 12, 2024 at 11:12:26AM -0400, David Malcolm wrote: > > We were chatting on IRC about how it would be nice to be able to > > use > > %qs in libcppp diagnostics; here is an example (rather than using > > \"%s\"). > > Yeah, I'm wor

Re: [PATCH] libcpp: Implement clang -Wheader-guard warning [PR96842]

2024-09-12 Thread Jakub Jelinek
On Thu, Sep 12, 2024 at 11:12:26AM -0400, David Malcolm wrote: > We were chatting on IRC about how it would be nice to be able to use > %qs in libcppp diagnostics; here is an example (rather than using > \"%s\"). Yeah, I'm working on a patch for that. > Not a blocker, but it occurs to me that ide

[PATCH 2/2] arm: testsuite: make use of -mcpu=unset/-march=unset

2024-09-12 Thread Richard Earnshaw
This patch makes use of the new ability to unset the CPU or architecture flags on the command line to enable several more tests on Arm. It doesn't cover every case and it does enable some tests that now fail for different reasons when the tests are no-longer skipped; these were failing anyway for

[PATCH 1/2] arm: Allow -mcpu and -march options to be unset

2024-09-12 Thread Richard Earnshaw
The compiler will warn if the architectural specification derived from a -mcpu option is not the same as that specified by -march. This is because it was never intended that the two should be used at the same time: -mcpu= is supposed to be shorthand for -mtune= -march=arch-of(). Unfortunately, th

[PATCH 0/2] arm: Allow -mcpu and -march options to be unset

2024-09-12 Thread Richard Earnshaw
This short patch series adds the ability to unset the -mcpu and -march options on the Arm port. This helps to avoid ambiguities and warnings if, for some reason, the compiler flags need to be overridden. The main intent of this is to help improve the compatibility of tests in the testsuite. I ha

Re: [PATCH] libcpp: Implement clang -Wheader-guard warning [PR96842]

2024-09-12 Thread David Malcolm
On Wed, 2024-09-11 at 23:26 +0200, Jakub Jelinek wrote: > Hi! > > The following patch implements the clang -Wheader-guard warning, > which warns > if a valid multiple inclusion header guard's #ifndef/#if !defined > directive > is immediately (no other non-line directives nor other (non-comment) >

Re: [PATCH 1/2] c++: Make __builtin_launder reject invalid types [PR116673]

2024-09-12 Thread Jason Merrill
On 9/12/24 4:49 AM, Jonathan Wakely wrote: Tested x86_64-linux. OK for trunk? -- >8 -- The standard says that std::launder is ill-formed for function pointers and cv void pointers, so there's no reason for __builtin_launder to accept them. This change allows implementations of std::launder to d

Re: [RFC PATCH] Enable vectorization for unknown tripcount in very cheap cost model but disable epilog vectorization.

2024-09-12 Thread Hongtao Liu
On Wed, Sep 11, 2024 at 4:21 PM Hongtao Liu wrote: > > On Wed, Sep 11, 2024 at 4:04 PM Richard Biener > wrote: > > > > On Wed, Sep 11, 2024 at 4:17 AM liuhongt wrote: > > > > > > GCC12 enables vectorization for O2 with very cheap cost model which is > > > restricted > > > to constant tripcount.

Re: [PATCH v2] c++: Don't crash when mangling member with anonymous union or template types [PR100632, PR109790]

2024-09-12 Thread Jason Merrill
On 9/12/24 7:23 AM, Simon Martin wrote: Hi, While looking at more open PRs, I have discovered that the problem reported in PR109790 is very similar to that in PR100632, so I’m combining both in a single patch attached here. The fix is similar to the one I initially submitted, only more general

Re: [PATCH] libcpp: Implement clang -Wheader-guard warning [PR96842]

2024-09-12 Thread Eric Gallager
On Wed, Sep 11, 2024 at 5:28 PM Jakub Jelinek wrote: > > Hi! > > The following patch implements the clang -Wheader-guard warning, which warns > if a valid multiple inclusion header guard's #ifndef/#if !defined directive > is immediately (no other non-line directives nor other (non-comment) > token

Re: [PATCH] c++: Disable deprecated/unavailable diagnostics when creating thunks for methods with such attributes [PR116636]

2024-09-12 Thread Jason Merrill
On 9/12/24 10:23 AM, Marek Polacek wrote: On Wed, Sep 11, 2024 at 11:26:35PM +0200, Jakub Jelinek wrote: Hi! On the following testcase, we emit false positive warnings/errors about using the deprecated or unavailable methods when creating thunks for them, even when nothing (in the testcase so f

Re: [PATCH v1][GCC] aarch64: Add GCS build attributes support.

2024-09-12 Thread Eric Gallager
On Wed, Sep 11, 2024 at 11:51 AM Srinath Parvathaneni wrote: > > This patch adds support for aarch64 gcs build attributes. Hi, just wondering if you could clarify what "GCS" stands for in this context? When I see it, my first thought is "GNU Coding Standards", but I don't think that's right... >

Re: [PATCH] c++: Disable deprecated/unavailable diagnostics when creating thunks for methods with such attributes [PR116636]

2024-09-12 Thread Marek Polacek
On Wed, Sep 11, 2024 at 11:26:35PM +0200, Jakub Jelinek wrote: > Hi! > > On the following testcase, we emit false positive warnings/errors about using > the deprecated or unavailable methods when creating thunks for them, even > when nothing (in the testcase so far) actually used those. > > The f

Re: [RFC 0/4] Hard Register Constraints

2024-09-12 Thread Georg-Johann Lay
Am 10.09.24 um 16:20 schrieb Stefan Schulze Frielinghaus: This series introduces hard register constraints. The first patch enables hard register constraints for asm statements and for machine descriptions. The subsequent patch adds some basic error handling for asm statements. The third pa

Re: [PATCH] aarch64: Emit ADD X, Y, Y instead of SHL X, Y, #1 for SVE instructions

2024-09-12 Thread Richard Sandiford
Richard Biener writes: > On Thu, Sep 12, 2024 at 2:35 PM Richard Sandiford > wrote: >> >> Soumya AR writes: >> > On Neoverse V2, SVE ADD instructions have a throughput of 4, while shift >> > instructions like SHL have a throughput of 2. We can lean on that to emit >> > code >> > like: >> > add

[patch,avr] Rework avr_out_compare

2024-09-12 Thread Georg-Johann Lay
This patch reworks avr_out_compare: Use new convenient helper functions that may be useful in other output functions, too. Generalized some special cases that only work for EQ and NE comparisons. For example, with the patch ;; R24:SI == -1 (unused after) adiw r26,1 sbci r25,hi8

Re: [PATCH] aarch64: Emit ADD X, Y, Y instead of SHL X, Y, #1 for SVE instructions

2024-09-12 Thread Richard Biener
On Thu, Sep 12, 2024 at 2:35 PM Richard Sandiford wrote: > > Soumya AR writes: > > On Neoverse V2, SVE ADD instructions have a throughput of 4, while shift > > instructions like SHL have a throughput of 2. We can lean on that to emit > > code > > like: > > add z31.b, z31.b, z31.b > > instead o

Re: [PATCH] aarch64: Emit ADD X, Y, Y instead of SHL X, Y, #1 for SVE instructions

2024-09-12 Thread Richard Sandiford
Soumya AR writes: > On Neoverse V2, SVE ADD instructions have a throughput of 4, while shift > instructions like SHL have a throughput of 2. We can lean on that to emit code > like: > add z31.b, z31.b, z31.b > instead of: > lsl z31.b, z31.b, #1 > > The implementation of this change for SVE vec

Re: [PATCH] JSON dumping for GENERIC trees

2024-09-12 Thread Richard Biener
On Thu, Sep 12, 2024 at 12:51 PM David Malcolm wrote: > > On Wed, 2024-09-11 at 20:49 -0500, tcpreimesber...@gmail.com wrote: > > From: Thor C Preimesberger > > > > This patch allows the compiler to dump GENERIC trees as JSON objects. > > > > The dump flag -fdump-tree-original-json dumps each fnd

[r15-3596 Regression] FAIL: gcc.target/i386/part-vect-vec_cmpbf.c (test for excess errors) on Linux/x86_64

2024-09-12 Thread haochen.jiang
On Linux/x86_64, 89d50c45048e5d7230ddde9afc8fbc83143e34cb is the first bad commit commit 89d50c45048e5d7230ddde9afc8fbc83143e34cb Author: Levy Hsu Date: Wed Sep 4 16:34:04 2024 +0930 i386: Enable V2BF/V4BF vec_cmp with AVX10.2 vcmppbf16 caused FAIL: gcc.target/i386/part-vect-vec_cmpbf.c

Re: [PATCH] JSON dumping for GENERIC trees

2024-09-12 Thread Richard Biener
On Thu, Sep 12, 2024 at 4:04 AM Andrew Pinski wrote: > > On Wed, Sep 11, 2024 at 6:51 PM wrote: > > > > From: Thor C Preimesberger > > > > This patch allows the compiler to dump GENERIC trees as JSON objects. > > > > The dump flag -fdump-tree-original-json dumps each fndecl node in the > > C fro

[PATCH v2] c++: Don't crash when mangling member with anonymous union or template types [PR100632, PR109790]

2024-09-12 Thread Simon Martin
Hi, While looking at more open PRs, I have discovered that the problem reported in PR109790 is very similar to that in PR100632, so I’m combining both in a single patch attached here. The fix is similar to the one I initially submitted, only more general and I believe better. Successfully tes

[PATCH] Abort loop SLP analysis quicker

2024-09-12 Thread Richard Biener
As we can't cope with removed SLP instances during analysis there's no point in doing that or even continuing analysis of SLP instances after a failure. The following makes us abort early. Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed. * tree-vect-slp.cc (vect_slp_analyze_o

Re: [PATCH] JSON dumping for GENERIC trees

2024-09-12 Thread David Malcolm
On Wed, 2024-09-11 at 20:49 -0500, tcpreimesber...@gmail.com wrote: > From: Thor C Preimesberger > > This patch allows the compiler to dump GENERIC trees as JSON objects. > > The dump flag -fdump-tree-original-json dumps each fndecl node in the > C frontend's gimplifier as a JSON object and trav

[PATCH] libcpp, v5: Add support for gnu::base64 #embed parameter

2024-09-12 Thread Jakub Jelinek
On Wed, Sep 11, 2024 at 10:23:20PM +, Joseph Myers wrote: > On Fri, 30 Aug 2024, Jakub Jelinek wrote: > > > +should be no newlines in the string literal and because this parameter > > +is meant namely for use by the preprocessor itself, there is no support > > +for any escape sequences in the

[PATCH 2/2] libstdc++: Simplify std::launder definition

2024-09-12 Thread Jonathan Wakely
Tested x86_64-linux. Both GCC and Clang support the __is_function built-in, so we should get the static_assert here. For a compiler that doesn't support it, we rely on __builtin_launder to diagnose function pointers. That's true for Clang, and PATCH 1/2 makes it true for G++. We might want to con

[PATCH 1/2] c++: Make __builtin_launder reject invalid types [PR116673]

2024-09-12 Thread Jonathan Wakely
Tested x86_64-linux. OK for trunk? -- >8 -- The standard says that std::launder is ill-formed for function pointers and cv void pointers, so there's no reason for __builtin_launder to accept them. This change allows implementations of std::launder to defer to the built-in for error checking, alth

Re: [PATCH] c++: Don't ICE to build private access error message [PR116323]

2024-09-12 Thread Simon Martin
On 11 Sep 2024, at 20:57, Jason Merrill wrote: > On 9/11/24 7:26 AM, Simon Martin wrote: >> We currently ICE upon the following code while building the "[...] is >> private within this context" error message >> >> === cut here === >> class A { enum Enum{}; }; >> template class Alloc> >> class B :

Re: [PATCH v1][GCC] aarch64: Add GCS build attributes support.

2024-09-12 Thread Kyrylo Tkachov
Hi Srinath, Not a full review, just some things that popped out to me. > On 11 Sep 2024, at 17:50, Srinath Parvathaneni > wrote: > > External email: Use caution opening links or attachments > > > This patch adds support for aarch64 gcs build attributes. This support > includes generating two

[PATCH] Better recover from SLP reassociation fails during discovery

2024-09-12 Thread Richard Biener
When we decide to not process a association chain of size two and that would also mismatch with a different chain size on another lane we shouldn't fail discovery hard at this point. Instead let the regular discovery figure out matching lanes so the parent can decide to perform operand swapping or