[PATCH] ipa: Remove assertion in dump_possible_polymorphic_call_targets [PR107044]

2025-07-14 Thread Feng Xue OS
Type inheritance graph built for one translation unit with build_type_inheritance_graph() might be incomplete, in that vtable would not be emitted for a class by frontend, if its key virtual method is just a declaration. Therefore, given a virtual call, some of all its possible target set might be

[COMMITED] fortran: Fix indentation

2025-07-14 Thread Filip Kastl
Move a block of code two spaces to the left. Commiting as obvious. gcc/fortran/ChangeLog: * resolve.cc (resolve_select_type): Fix indentation. Signed-off-by: Filip Kastl --- gcc/fortran/resolve.cc | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git

Re: [PATCH 2/2] libstdc++: Ensure std::make_unsigned works for 128-bit enum

2025-07-14 Thread Tomasz Kaminski
On Mon, Jul 14, 2025 at 10:35 PM Jonathan Wakely wrote: > libstdc++-v3/ChangeLog: > > * include/std/type_traits (__make_unsigned_selector): Add > unsigned __int128 to type list. > * testsuite/20_util/make_unsigned/int128.cc: New test. > --- > > Tested x86_64-linux. > LGTM.

Re: [PATCH 1/2] libstdc++: Ensure std::hash<__int128> is defined [PR96710]

2025-07-14 Thread Tomasz Kaminski
On Mon, Jul 14, 2025 at 10:34 PM Jonathan Wakely wrote: > This is a follow-up to r16-2190-g4faa42ac0dee2c which ensures that > std::hash is always enabled for signed and unsigned __int128. The > standard requires std::hash to be enabled for all arithmetic types. > > libstdc++-v3/ChangeLog: > >

[PATCH] i386: Decouple AMX-AVX512 from AVX10.2 and imply AVX512F

2025-07-14 Thread Haochen Jiang
Hi all, In ISE058, the AVX10.2 imply is removed from AMX-AVX512. This leads to re-consideration on the imply for AMX-AVX512. Since it is using zmm register and using zmm register only, we need to at least imply AVX512F. AVX512VL is not needed. On the other hand, if we imply AVX10.1 for AMX-AVX51

Re: ACCESS_WITH_SIZE for pointers Re: [PATCH] tree-optimization/120929: Limit MEM_REF handling to .ACCESS_WITH_SIZE

2025-07-14 Thread Richard Biener
On Mon, Jul 14, 2025 at 10:58 PM Qing Zhao wrote: > > > > On Jul 7, 2025, at 13:07, Qing Zhao wrote: > > > > As I mentioned in the latest email I replied to the thread, the original > > implementation of the counted_by for pointer was implemented without the > > additional indirection. > > But

Ping: [PATCH, V3] Add -mcpu=future to the PowerPC

2025-07-14 Thread Michael Meissner
Ping patch: | Date: Tue, 1 Jul 2025 12:14:32 -0400 | From: Michael Meissner | Subject: [PATCH, V3] Add -mcpu=future to the PowerPC | Message-ID: https://gcc.gnu.org/pipermail/gcc-patches/2025-July/688251.html -- Michael Meissner, IBM PO Box 98, Ayer, Massachusetts, USA, 01432 email: meiss...@l

Re: [PATCH v2] gcc-16/changes.html: Add --enable-x86-64-mfentry

2025-07-14 Thread Uros Bizjak
On Mon, Jul 14, 2025 at 9:39 PM H.J. Lu wrote: > > > OK to install? > > > > This should at least say that the new option is enabled by default > > with glibc targets. > > > > Uros. > > Like this? LGTM for content, but let's ask Gerald to proofread the entry. Thanks, Uros.

Re: [PATCH] x86: Convert MMX integer loads from constant vector pool

2025-07-14 Thread Uros Bizjak
On Tue, Jul 15, 2025 at 3:43 AM H.J. Lu wrote: > > For MMX 16-bit, 32-bit and 64-bit constant vector loads from constant > vector pool: > > (insn 6 2 7 2 (set (reg:V1SI 5 di) > (mem/u/c:V1SI (symbol_ref/u:DI ("*.LC0") [flags 0x2]) [0 S4 A32])) > "pr1 > 21062-2.c":10:3 2036 {*movv1si_inte

[RFC PATCH] libstdc++: Provide ABI compatibility for _GLIBCXX_HAVE_TLS

2025-07-14 Thread Keno Fischer
The _GLIBCXX_HAVE_TLS flag is an ABI-breaking flag - setting it removes the definitions for `set_lock_ptr` (as well as the comptability symbols for even older ABIs). Try to improve this situation by changing the flag to retain the old symbols, falling back to the previous behavior if __once_call is

[PATCH v5] RISC-V: Mips P8700 Conditional Move Support.

2025-07-14 Thread Umesh Kalappa
Updated the test for rv32 accordingly and no regress found for runs like "runtest --tool gcc --target_board='riscv-sim/-march=rv32gc_zba_zbb_zbc_zbs/-mabi=ilp32d/-mcmodel=medlow' riscv.exp" and "runtest --tool gcc --target_board='riscv-sim/-march=rv64gc_zba_zbb_zbc_zbs/-mabi=lp64d/-mcmodel=med

Re: [PATCH] crc: Error out on non-constant poly arguments for the crc builtins [PR120709]

2025-07-14 Thread Andrew Pinski
On Sun, Jul 6, 2025 at 2:23 PM Andrew Pinski wrote: > > These builtins requires a constant integer for the third argument but > currently > there is assert rather than error. This fixes that and updates the > documentation too. > Uses the same terms as was being used for the __builtin_prefetch a

[PATCH] LoongArch: Fix wrong code generated by TARGET_VECTORIZE_VEC_PERM_CONST [PR121064]

2025-07-14 Thread Xi Ruoyao
When TARGET_VECTORIZE_VEC_PERM_CONST is called, target may be the same pseudo as op0 and/or op1. Loading the selector into target would clobber the input, producing wrong code like vld $vr0, $t0 vshuf.w $vr0, $vr0, $vr1 So don't load the selector into d->target, use a new pseudo to h

Re: [PATCH] c, c++: Extend -Wunused-but-set-* warnings [PR44677]

2025-07-14 Thread Jason Merrill
On 7/11/25 9:09 AM, Jakub Jelinek wrote: On Thu, Jul 10, 2025 at 04:35:49PM -0400, Jason Merrill wrote: @@ -211,8 +211,27 @@ mark_use (tree expr, bool rvalue_p, bool } return expr; } - gcc_fallthrough(); + gcc_fallthrough (); CASE_CONVERT: + if

[PATCH 2/2] libstdc++: Conditionalize LWG 3569 changes to join_view

2025-07-14 Thread Patrick Palka
Tested on x86_64-pc-linux-gnu, does this look OK for trunk only (since it impacts ABI)? -- >8 -- LWG 3569 adjusted join_view's iterator to handle adapting non-default-constructible (input) iterators by wrapping the corresponding data member with std::optional, and we followed suit in r13-2649-g7a

[PATCH 1/2] libstdc++: Add missing initializers for __maybe_present_t members [PR119962]

2025-07-14 Thread Patrick Palka
Tested on x86_64-pc-linux-gnu, does this look OK for trunk and perhaps 15? Not sure if this corner case is worth backporting any further. Can we just use direct-list-initialization via {} instead of '= T()' here? I wasn't sure so I went with the latter to more closely mirror the standard. -- >8

[PATCH v2] RISC-V: Support RVVDImode for avg3_floor auto vect

2025-07-14 Thread pan2 . li
From: Pan Li The avg3_floor pattern leverage the add and shift rtl with the DOUBLE_TRUNC mode iterator. Aka, RVVDImode iterator will generate avg3rvvsimode_floor, only the element size QI, HI and SI are allowed. Thus, this patch would like to support the DImode by the standard name, with the it

RE: [PATCH v1] RISC-V: Support RVVDImode for avg3_floor auto vect

2025-07-14 Thread Li, Pan2
Seems the test is not that correct for DImode, will send v2 for this change. /gcc/testsuite/gcc.target/riscv/rvv/autovec/avg_floor-run-1-i8-from-i128.c Pan -Original Message- From: Li, Pan2 Sent: Tuesday, July 15, 2025 10:45 AM To: gcc-patches@gcc.gnu.org Cc: juzhe.zh...@rivai.ai; kito

[PATCH] builtins.cc (fold_builtin_bit_query): Don't consider MAX_FIXED_MODE_SIZE, [PR120935]

2025-07-14 Thread Hans-Peter Nilsson
Tested to fix build for MMIX (and to fix a few type-generic-builtin test-cases; c-c++-common/pr111309-1.c, gcc.dg/torture/pr116480-1.c). Also regtested cris-elf and native x86_64-pc-linux-gnu. Ok for master and gcc-15? -- >8 -- MMIX uses the default definition of MAX_FIXED_MODE_SIZE, which is GET

[PATCH v1] RISC-V: Support RVVDImode for avg3_floor auto vect

2025-07-14 Thread pan2 . li
From: Pan Li The avg3_floor pattern leverage the add and shift rtl with the DOUBLE_TRUNC mode iterator. Aka, RVVDImode iterator will generate avg3rvvsimode_floor, only the element size QI, HI and SI are allowed. Thus, this patch would like to support the DImode by the standard name, with the it

Re: [PATCH] mmix: Define MAX_FIXED_MODE_SIZE [PR120935]

2025-07-14 Thread Hans-Peter Nilsson
NAK, sorry. IMO it's either the use in fold_builtin_bit_query or the default that's wrong. (Also, for future reference, that comment seems copy-pasted.) On Thu, 3 Jul 2025, Pietro Monteiro wrote: > Use TImode instead of the default DImode. Fixes ICE when building libstc++. > > Additionally,

[PATCH] x86: Convert MMX integer loads from constant vector pool

2025-07-14 Thread H.J. Lu
For MMX 16-bit, 32-bit and 64-bit constant vector loads from constant vector pool: (insn 6 2 7 2 (set (reg:V1SI 5 di) (mem/u/c:V1SI (symbol_ref/u:DI ("*.LC0") [flags 0x2]) [0 S4 A32])) "pr1 21062-2.c":10:3 2036 {*movv1si_internal} (expr_list:REG_EQUAL (const_vector:V1SI [

Re: [PATCH] c, c++: Fix unused result for empty types [PR82134]

2025-07-14 Thread Jeremy Rifkin
Hi Jason, Thank you so much for taking a look! > This is OK, but I wonder about making do_warn_unused_result ignore empty > types in general; if there's no data in the type, what does it matter if > we ignore the empty box? I'm not strongly opinionated and I think there are good arguments both wa

Re: [PATCH 17/17] Ignore more clang warnings in contrib/filter-clang-warnings.py

2025-07-14 Thread Hans-Peter Nilsson
(I'm *this* far behind on reading the lists, slowly catching up...) On Wed, 25 Jun 2025, Martin Jambor wrote: > Since I don't think anyone else uses the script, I'm would like to > declare these changes "obvious" in the sense that they are obviously > useful for me and obviously nobody else will

[PATCH v5 2/6] dwarf: create annotation DIEs for btf tags

2025-07-14 Thread David Faust
The btf_decl_tag and btf_type_tag attributes provide a means to annotate declarations and types respectively with arbitrary user provided strings. These strings are recorded in debug information for post-compilation uses, and despite the name they are meant to be recorded in DWARF as well as BTF.

[PATCH v5 4/6] btf: generate and output DECL_TAG and TYPE_TAG records

2025-07-14 Thread David Faust
Support the btf_decl_tag and btf_type_tag attributes in BTF by creating and emitting BTF_KIND_DECL_TAG and BTF_KIND_TYPE_TAG records, respectively, for them. Some care is required when -gprune-btf is in effect to avoid emitting decl or type tags for declarations or types which have been pruned and

[PATCH v5 5/6] doc: document btf_type_tag and btf_decl_tag attributes

2025-07-14 Thread David Faust
gcc/ * doc/extend.texi (Common Function Attributes) (Common Variable Attributes): Document btf_decl_tag attribute. (Common Type Attributes): Document btf_type_tag attribute. --- gcc/doc/extend.texi | 79 + 1 file changed, 79 inser

[PATCH v5 6/6] bpf: add tests for CO-RE and BTF tag interaction

2025-07-14 Thread David Faust
Add a couple of tests to ensure that BTF type/decl tags do not interfere with generation of BPF CO-RE relocations. gcc/testsuite/ * gcc.target/bpf/core-btf-tag-1.c: New test. * gcc.target/bpf/core-btf-tag-2.c: New test. --- gcc/testsuite/gcc.target/bpf/core-btf-tag-1.c | 23 ++

[PATCH v5 3/6] ctf: translate annotation DIEs to internal ctf

2025-07-14 Thread David Faust
Translate DW_TAG_GNU_annotation DIEs created for C attributes btf_decl_tag and btf_type_tag into an in-memory representation in the CTF/BTF container. They will be output in BTF as BTF_KIND_DECL_TAG and BTF_KIND_TYPE_TAG records. The new CTF kinds used to represent these annotations, CTF_K_DECL_T

[PATCH v5 0/6] c, dwarf, btf: Add btf_decl_tag and btf_type_tag C attributes

2025-07-14 Thread David Faust
[v4: https://gcc.gnu.org/pipermail/gcc-patches/2025-June/686373.html Changes from v4: - (Changes only in patches 1 and 2, based on Richard's reviews and following discussion.) - Update the attribute hanlder for btf_type_tag, to ensure a variant type is always created, if not ATTR_FLAG_TYP

[PATCH v5 1/6] c-family: add btf_type_tag and btf_decl_tag attributes

2025-07-14 Thread David Faust
Add two new c-family attributes, "btf_type_tag" and "btf_decl_tag" along with attribute handlers for them. gcc/c-family/ * c-attribs.cc (c_common_attribute_table): Add btf_decl_tag and btf_type_tag attributes. (handle_btf_decl_tag_attribute): New handler for btf_decl_tag.

[PATCH 1/1] aarch64: testsuite: Keep -mtune=generic when specifying -moverride

2025-07-14 Thread Spencer Abson
gcc/testsuite/ChangeLog: * lib/gcc-defs.exp (aarch64-arg-dg-options): Split add_tune into add_tune and add_override, so that specifying -moverride does not change the baseline which it is overriding from the testuite's default (generic). --- gcc/testsuite/lib/gcc-

[PATCH 0/1] aarch64: testsuite: Keep -mtune=generic when specifying -moverride

2025-07-14 Thread Spencer Abson
Hi all, Currently, using '-moverride' in the testsuite will reset the baseline tuning model from 'generic' to the default tuning for the architecture level. Since 'generic' is the tuning model relied upon by most of aarch64's regression suite, we would expect that, given no other model was suppli

Re: [PATCH] libstdc++: Format %a/%A/%b/%h/%B/%p without using locale::classic [PR110739]

2025-07-14 Thread Jonathan Wakely
On Mon, 7 Jul 2025 at 16:06, Tomasz Kamiński wrote: > > With changes r16-2063-g8ad5968a8dcb47 the _M_a_A, _M_b_B and _M_p functions > are called only if the locale is equal to the locale::classic(), for which > the behavior is know. This patch changes they implementation, so instead of > reffering

[committed] cobol: Eliminate cppcheck warnings in gcc/cobol .cc files.

2025-07-14 Thread Robert Dubner
Subject: [PATCH] cobol: Eliminate cppcheck warnings in gcc/cobol .cc files. These changes eliminate various cppcheck warnings, mostly involving C-Style casting and applying "const" to various variables and formal parameters. Some tab characters were eliminated, and some lines were trimmed to seven

[PATCH 1/2] ifconv: Remove unused array predicated

2025-07-14 Thread Andrew Pinski
While starting to improve if-conv, I noticed that predicated was only being set once inside a loop and accessed right below. This became this way due to r14-8869-g8636c538b68068 and before it was needed since it was accessed via 2 loops but now it is only set and then accessed in the next statement

[PATCH 2/2] ifconv: Small improvement to fold_build_cond_expr; lhs and rhs being the same.

2025-07-14 Thread Andrew Pinski
This is a small compile time optimization, as match and simplify will generate the same thing but with rhs and lhs being the same we can return early instead of having to go through match and simplify. This might not show up that much at this point but can/will show up after my patch for PR 119920

ACCESS_WITH_SIZE for pointers Re: [PATCH] tree-optimization/120929: Limit MEM_REF handling to .ACCESS_WITH_SIZE

2025-07-14 Thread Qing Zhao
> On Jul 7, 2025, at 13:07, Qing Zhao wrote: > > As I mentioned in the latest email I replied to the thread, the original > implementation of the counted_by for pointer was implemented without the > additional indirection. > But that implementation has a fundamental bug during testing. then

[committed] libstdc++: Add comments to deleted std::swap overloads for LWG 2766

2025-07-14 Thread Jonathan Wakely
We pre-emptively implemented part of LWG 2766, which still hasn't been approved. Add comments to the deleted swap overloads saying why they're there, because the standard doesn't require them. libstdc++-v3/ChangeLog: * include/bits/stl_pair.h (swap): Add comment to deleted overloa

[PATCH] libstdc++: Define std::nothrow as inline variable

2025-07-14 Thread Jonathan Wakely
This makes it possible to use `new(std::nothrow) X` without linking to libsupc++ or libstdc++. To ensure we still export the symbol from the library we need to suppress the inline variable in libsupc++/new_handler.cc which is done by defining a macro. libstdc++-v3/ChangeLog: * libsupc++/

[PATCH] libstdc++: Ensure that ranges::destroy destroys in constexpr [PR121024]

2025-07-14 Thread Jonathan Wakely
The new test is currently marked as XFAIL because PR c++/102284 means that GCC doesn't notice that the lifetimes have ended. libstdc++-v3/ChangeLog: PR libstdc++/121024 * include/bits/ranges_uninitialized.h (ranges::destroy): Do not optimize away trivial destructors during

[PATCH] libstdc++: Make ranges::advance(it, n, bound) follow standard more strictly

2025-07-14 Thread Jonathan Wakely
The standard specifies some of the effects of ranges::advance in terms of "Equivalent to:" and it's observable that our current implementation deviates from the precise specification in the standard. This was causing some failures in the libc++ testsuite. For the sized_sentinel_for case I optimiz

[PATCH] libstdc++: Constrain std::swap using concepts in C++20

2025-07-14 Thread Jonathan Wakely
This is a minor compile-time optimization for C++20. libstdc++-v3/ChangeLog: * include/bits/move.h (swap): Replace enable_if with concepts when available, and with __enable_if_t alias otherwise. --- Tested powerpc64le-linux. libstdc++-v3/include/bits/move.h | 30 +++

[PATCH 2/2] libstdc++: Ensure std::make_unsigned works for 128-bit enum

2025-07-14 Thread Jonathan Wakely
libstdc++-v3/ChangeLog: * include/std/type_traits (__make_unsigned_selector): Add unsigned __int128 to type list. * testsuite/20_util/make_unsigned/int128.cc: New test. --- Tested x86_64-linux. libstdc++-v3/include/std/type_traits | 7 ++- .../testsuit

[PATCH 1/2] libstdc++: Ensure std::hash<__int128> is defined [PR96710]

2025-07-14 Thread Jonathan Wakely
This is a follow-up to r16-2190-g4faa42ac0dee2c which ensures that std::hash is always enabled for signed and unsigned __int128. The standard requires std::hash to be enabled for all arithmetic types. libstdc++-v3/ChangeLog: PR libstdc++/96710 * include/bits/functional_hash.h (has

Re: [PATCH] arm: avoid gcc_s dependency

2025-07-14 Thread Sam James
Kyrylo Tkachov writes: > + arm maintainers. > > Hi Pierre, > >> On 14 Jul 2025, at 14:07, Pierre Ossman wrote: >> >> Suggested fix for this issue: >> >> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60428 >> >> Did not get any response there, so seeing if this is a better forum for >> suggest

Re: [PATCH 0/3] fortran: Reallocation on assignment tweaks

2025-07-14 Thread Harald Anlauf
Hi Mikael, Am 10.07.25 um 22:01 schrieb Mikael Morin: From: Mikael Morin Hello, here are three patches as follow-up to this message. These started as an attempt to remove the PR fortran/108889 workaround, which I didn't understand. I had to keep it in the end but this is what I could save fro

[PATCH v2] gcc-16/changes.html: Add --enable-x86-64-mfentry

2025-07-14 Thread H.J. Lu
On Mon, Jul 14, 2025 at 9:44 PM Uros Bizjak wrote: > > On Mon, Jul 14, 2025 at 2:34 PM H.J. Lu wrote: > > > > OK to install? > > This should at least say that the new option is enabled by default > with glibc targets. > > Uros. Like this? -- H.J. From c3f9d5d1040b08751e949d3fdbd2b5f7909157cb M

Re: [PATCH] aarch64: Enable selective LDAPUR generation for cores with RCPC2

2025-07-14 Thread Soumya AR
> On 10 Jul 2025, at 5:20 PM, Richard Sandiford > wrote: > > External email: Use caution opening links or attachments > > > Soumya AR writes: >>> On 10 Jul 2025, at 3:15 PM, Richard Sandiford >>> wrote: >>> >>> External email: Use caution opening links or attachments >>> >>> >>> Soumya

Re: [PATCH 1/1] aarch64: AND/BIC combines for unpacked SVE FP comparisons

2025-07-14 Thread Richard Sandiford
Spencer Abson writes: > This patch extends the splitting patterns for combining FP comparisons > with predicated logical operations such that they cover all of SVE_F. > > gcc/ChangeLog: > > * config/aarch64/aarch64-sve.md (*fcm_and_combine): > Extend from SVE_FULL_F to SVE_F. > (

Re: [PATCH] tree-optimization/121059 - record loop mask when required

2025-07-14 Thread Richard Sandiford
Richard Biener writes: > On Mon, 14 Jul 2025, Richard Sandiford wrote: > >> Richard Biener writes: >> > For loop masking we need to mask a mask AND operation with the loop >> > mask. The following makes sure we have a corresponding mask >> > available. There's no good way to distinguish loop ma

Re: [PATCH v3 1/1] aarch64: Fold builtins with highpart args to highpart equivalent [PR117850]

2025-07-14 Thread Richard Sandiford
Spencer Abson writes: > [...] > +/* If REF describes the high half of a 128-bit vector, return this > + vector. Otherwise, return NULL_TREE. */ > +static tree > +aarch64_v128_highpart_ref (const_tree ref) > +{ > + if (TREE_CODE (ref) != SSA_NAME) > +return NULL_TREE; > + > + gassign *stm

[PATCH] ifconv: simple factor out operators while doing ifcvt [PR119920]

2025-07-14 Thread Andrew Pinski
For possible reductions, ifconv currently handles if the addition is on one side of the if. But in the case of PR 119920, the reduction addition is on both sides of the if. E.g. ``` if (_27 == 0) goto ; [50.00%] else goto ; [50.00%] a_29 = b_14(D) + a_17; goto ; [100.00%]

Re: [PATCH v2] c++: P2036R3 - Change scope of lambda trailing-return-type [PR102610]

2025-07-14 Thread Jason Merrill
On 7/11/25 5:49 PM, Marek Polacek wrote: On Thu, Jul 10, 2025 at 02:13:06PM -0400, Jason Merrill wrote: On 7/9/25 4:27 PM, Marek Polacek wrote: On Tue, Jul 08, 2025 at 12:15:03PM -0400, Jason Merrill wrote: On 7/7/25 4:52 PM, Marek Polacek wrote: Bootstrapped/regtested on x86_64-pc-linux-gnu,

Re: [PATCH] expand: ICE if asked to expand RDIV with non-float type.

2025-07-14 Thread Andrew Pinski
On Mon, Jul 14, 2025 at 2:10 AM Andrew Pinski wrote: > > > > On Mon, Jul 14, 2025, 1:28 AM Robin Dapp wrote: >> >> For the record, the Linaro CI notified me that this caused regressions: >> >> Produces 2 regressions: >> | >> | regressions.sum: >> | Running gcc:gcc.dg/dg.exp ... >> | FAIL:

Re: [PATCH] libstdc++: Implement std::chrono::current_zone() for Windows

2025-07-14 Thread Jonathan Wakely
On Mon, 14 Jul 2025 at 16:52, Tomasz Kaminski wrote: > > > > On Mon, Jul 14, 2025 at 1:47 PM Jonathan Wakely wrote: >> >> On Mon, 14 Jul 2025 at 11:10, Jonathan Wakely wrote: >> > >> > On Mon, 14 Jul 2025 at 11:08, Björn Schäpers wrote: >> > > >> > > Am 14.07.2025 um 10:20 schrieb Tomasz Kamins

Re: [PATCH v3 2/9] opts: use uint64_t for sanitizer flags

2025-07-14 Thread Andrew Pinski
On Mon, Jul 14, 2025 at 2:57 AM Claudiu Zissulescu-Ianculescu wrote: > > > I see it now from Richard B.. Also I noticed you missed Richard S.'s > > suggestion of using a typedef which will definitely help in the future > > where we could even replace this with an enum class and overload the > > bi

Re: [PATCH] libstdc++: Implement std::chrono::current_zone() for Windows

2025-07-14 Thread Tomasz Kaminski
On Mon, Jul 14, 2025 at 1:47 PM Jonathan Wakely wrote: > On Mon, 14 Jul 2025 at 11:10, Jonathan Wakely wrote: > > > > On Mon, 14 Jul 2025 at 11:08, Björn Schäpers wrote: > > > > > > Am 14.07.2025 um 10:20 schrieb Tomasz Kaminski: > > > > > > > > > > > > On Tue, Jul 8, 2025 at 10:48 PM Björn Sch

[PATCH] c, c++, v2: Extend -Wunused-but-set-* warnings [PR44677]

2025-07-14 Thread Jakub Jelinek
On Fri, Jul 11, 2025 at 02:34:24PM -0400, Jason Merrill wrote: > > That would be wrong. > > The goal of the patch is to just add some extra exceptions which aren't > > counted as uses. > > If a MODIFY_EXPR is say > > op0 = foo (op0); > > then we shouldn't clear DECL_READ_P, the call does or could r

Re: [PATCH] [aarch64] Stop using sys/ifunc.h header in libatomic and libgcc

2025-07-14 Thread Andrew Pinski
On Mon, Jul 14, 2025 at 5:32 AM Yury Khrustalev wrote: > > This optional header is used to bring in the definition of the > struct __ifunc_arg_t type. Since it has been added to glibc only > recently, the previous implementation had to check whether this > header is present and, if not, it provide

[committed] amdgcn: fix vec_ucmp infinite recursion

2025-07-14 Thread Andrew Stubbs
I suppose this pattern doesn't get used much! The unsigned compare was meant to be defined using the signed compare pattern, but actually ended up trying to recursively call itself. This patch fixes the issue in the obvious way. gcc/ChangeLog: * config/gcn/gcn-valu.md (vec_cmpudi_exec):

[PATCH v4] RISC-V: Mips P8700 Conditional Move Support.

2025-07-14 Thread Umesh Kalappa
Fixed the testcase for the commandline typo error and no regress found for "runtest --tool gcc --target_board='riscv-sim/-mtune=mips-p8700 ' riscv.exp" run. gcc/ChangeLog: *config/riscv/riscv-cores.def(RISCV_CORE): Updated the supported march. *config/riscv/riscv-ext-mips.def(DEF

Re: [PATCH] tree-optimization/121059 - record loop mask when required

2025-07-14 Thread Richard Biener
On Mon, 14 Jul 2025, Richard Sandiford wrote: > Richard Biener writes: > > For loop masking we need to mask a mask AND operation with the loop > > mask. The following makes sure we have a corresponding mask > > available. There's no good way to distinguish loop masking from > > len masking here

Re: [PATCH v3] RISC-V: Mips P8700 Conditional Move Support.

2025-07-14 Thread Umesh Kalappa
Hi Jeff and others , Sent the latest update patch and the issue with testcase for the types like long long and unsigned long long . Please pass your comments and the suggestions . Thank you ~U On Mon, Jul 14, 2025 at 5:42 PM Umesh Kalappa wrote: > Thank you Jeff and let us verify from our end

Re: [PATCH] libstdc++: library side of C++26 P2786R13 - Trivial Relocatability [PR119064]

2025-07-14 Thread Tomasz Kaminski
I have tried using array inside unanimous union instead of local char buffer, but was blocked by following issue: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121068 The idea here, would be to have a function: template void star_array_lifetime(T(&arr)[N]) { new(arr) T[N]; for (int i = 0; i <

[PATCH v4] RISC-V: Mips P8700 Conditional Move Support.

2025-07-14 Thread Umesh Kalappa
Please ignore the previous changes and Jeff thank you for the info and issue with the testcase. Updated testcase(long long is not supported in C90) and lint warnings. gcc/ChangeLog: *config/riscv/riscv-cores.def(RISCV_CORE): Updated the supported march. *config/riscv/riscv-ext-

[PATCH v4] RISC-V: Mips P8700 Conditional Move Support.

2025-07-14 Thread Umesh Kalappa
Jeff thank you for the info and issue with the testcase. Updated testcase(long long is not supported in C90) and lint warnings. gcc/ChangeLog: *config/riscv/riscv-cores.def(RISCV_CORE): Updated the supported march. *config/riscv/riscv-ext-mips.def(DEFINE_RISCV_EXT): New f

Re: [PATCH] aarch64: Support unpacked SVE integer division

2025-07-14 Thread Remi Machet
On 7/14/25 06:35, Spencer Abson wrote: > External email: Use caution opening links or attachments > > > On Fri, Jul 11, 2025 at 02:40:46PM +, Remi Machet wrote: >> On 7/11/25 08:21, Spencer Abson wrote: >> >> External email: Use caution opening links or attachments >> >> >> This patch extends

Re: [PATCH v5 16/24] c/c++: Add target_[version/clones] to decl diagnostics formatting.

2025-07-14 Thread Alfie Richards
On 09/07/2025 18:00, Jason Merrill wrote: On 5/29/25 8:52 AM, Alfie Richards wrote: Adds the target_version and target_clones attributes to diagnostic messages for target_version semantics. This is because the target_version/target_clones attributes affect the identity of the decls, so need

Re: [PATCH] tree-optimization/121059 - record loop mask when required

2025-07-14 Thread Richard Sandiford
Richard Biener writes: > For loop masking we need to mask a mask AND operation with the loop > mask. The following makes sure we have a corresponding mask > available. There's no good way to distinguish loop masking from > len masking here, so assume we have recorded a mask for the operands > ma

[committed] amdgcn: Don't clobber VCC if we don't need to

2025-07-14 Thread Andrew Stubbs
This is a hold-over from GCN3 where v_add always wrote to the condition register, whether you wanted it or not. This hasn't been true since GCN5, and we dropped support for GCN3 a little while ago, so let's fix it. There was actually a latent bug here because some other post-reload splitters were

[PATCH] RISC-V: Fix vsetvl merge rule.

2025-07-14 Thread Robin Dapp
Hi, In PR120297 we fuse vsetvl e8,mf2,... vsetvl e64,m1,... into vsetvl e64,m4,... Individually, that's ok but we also change the new vsetvl's demand to "SEW only" even though the first original one demanded SEW >= 8 and ratio = 16. As we forget the ratio after the merge we find that the vse

Re: [PATCH] gcc-16/changes.html: Add --enable-x86-64-mfentry

2025-07-14 Thread Uros Bizjak
On Mon, Jul 14, 2025 at 2:34 PM H.J. Lu wrote: > > OK to install? This should at least say that the new option is enabled by default with glibc targets. Uros.

Re: [PATCH] libstdc++: library side of C++26 P2786R13 - Trivial Relocatability [PR119064]

2025-07-14 Thread Tomasz Kaminski
On Tue, Jun 17, 2025 at 1:15 PM Jakub Jelinek wrote: > Hi! > > Here is a new version of the library side of the C++26 P2786R13 paper. > For if constexpr the patch uses __builtin_constant_p trick to figure > out if __result is non-equality comparable with __first, it adds recursion > for the is_ar

Re: [PATCH] arm: avoid gcc_s dependency

2025-07-14 Thread Kyrylo Tkachov
+ arm maintainers. Hi Pierre, > On 14 Jul 2025, at 14:07, Pierre Ossman wrote: > > Suggested fix for this issue: > > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60428 > > Did not get any response there, so seeing if this is a better forum for > suggested changes. > > We've been using this

Re: [PATCH 1/2] s390: Remove min-vect-loop-bound override

2025-07-14 Thread Stefan Schulze Frielinghaus
On Thu, Jul 10, 2025 at 09:14:23AM +0200, Juergen Christ wrote: > The default setting of s390 for the parameter min-vect-loop-bound was > set to 2 to prevent certain epilogue loop vectorizations in the past. > Reevaluation of this parameter shows that this setting now is not > needed anymore and so

Re: [PATCH 2/2] s390: Implement reduction optabs

2025-07-14 Thread Stefan Schulze Frielinghaus
On Thu, Jul 10, 2025 at 09:14:24AM +0200, Juergen Christ wrote: > Implementation and tests for the standard reduction optabs. > > Bootstrapped and regtested on s390. Ok for trunk? > > Signed-off-by: Juergen Christ > > gcc/ChangeLog: > > * config/s390/vector.md (reduc_plus_scal_): Implem

RE: [PATCH v1] RISC-V: Refine the scalar SAT_* test cases

2025-07-14 Thread Li, Pan2
> Just to make sure I understand. We're switching to a check that we've > got a branchless sequence, right? That seems like a good idea, > particularly when mated with the pre-existing test that we've got the > appropriate SAT IFN in the .optimized dump. Yes, if hit the SAT IFN code-gen, ther

Re: [PATCH v1] RISC-V: Refine the scalar SAT_* test cases

2025-07-14 Thread Jeff Law
On 7/12/25 8:26 AM, pan2...@intel.com wrote: From: Pan Li Per previous discuss with Jeff, we don't do complicated asm check like scalar saturation alu. It is somehow not easy to maintain, as well as fragile. Thus, we remove these function-body check, and introduce the jmp label asm check i

[PATCH] gcc-16/changes.html: Add --enable-x86-64-mfentry

2025-07-14 Thread H.J. Lu
OK to install? -- H.J. From ba8825b15df0172f1c95fd46526fb734ec7a6646 Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Mon, 14 Jul 2025 20:32:11 +0800 Subject: [PATCH] gcc-16/changes.html: Add --enable-x86-64-mfentry Signed-off-by: H.J. Lu --- htdocs/gcc-16/changes.html | 6 ++ 1 file change

[PATCH] [aarch64] Stop using sys/ifunc.h header in libatomic and libgcc

2025-07-14 Thread Yury Khrustalev
This optional header is used to bring in the definition of the struct __ifunc_arg_t type. Since it has been added to glibc only recently, the previous implementation had to check whether this header is present and, if not, it provide its own definition. This creates dead code because either one of

Re: [PATCH v2] x86-64: Add --enable-x86-64-mfentry

2025-07-14 Thread Uros Bizjak
On Mon, Jul 14, 2025 at 1:16 PM Uros Bizjak wrote: > > On Sun, Jul 13, 2025 at 12:16 AM Sam James wrote: > > > > "H.J. Lu" writes: > > > > > On Sat, Jul 12, 2025 at 6:58 AM Siddhesh Poyarekar > > > wrote: > > >> > > >> On 2025-07-11 15:28, Uros Bizjak wrote: > > >> >> Why not just switch over

[PATCH] tree-optimization/121059 - record loop mask when required

2025-07-14 Thread Richard Biener
For loop masking we need to mask a mask AND operation with the loop mask. The following makes sure we have a corresponding mask available. There's no good way to distinguish loop masking from len masking here, so assume we have recorded a mask for the operands mask producers. Bootstrap and regt

Re: [PATCH v2 2/2] RISC-V: Add testcase for rv32 SAT_MUL from uint64

2025-07-14 Thread Jeff Law
On 7/12/25 2:58 AM, pan2...@intel.com wrote: From: Pan Li Add the run and asm testcase for rv32 SAT_MUL, widen mul from uint8_t, uint16_t, uint32_t to uint64_t. gcc/testsuite/ChangeLog: * gcc.target/riscv/sat/sat_u_mul-1-u16-from-u64.c: New test. * gcc.target/riscv/sat/sat_

Re: [PATCH v2] RISC-V: Vector-scalar widening multiply-(subtract-)accumulate [PR119100]

2025-07-14 Thread Jeff Law
On 7/14/25 2:52 AM, Robin Dapp wrote: This pattern enables the combine pass (or late-combine, depending on the case) to merge a float_extend'ed vec_duplicate into a plus-mult or minus- mult RTL instruction. Before this patch, we have three instructions, e.g.:   fcvt.s.h   fa5,fa5   vfmv

Re: [PATCH v3] RISC-V: Mips P8700 Conditional Move Support.

2025-07-14 Thread Umesh Kalappa
Thank you Jeff and let us verify from our end and come back . ~U On Mon, Jul 14, 2025 at 5:36 PM Jeff Law wrote: > > > On 7/14/25 5:58 AM, Umesh Kalappa wrote: > > Hi Jeff and Marco, > > > > Please pass your comments on the below changes and do needful. > The changes fail pre-commit tsting: > >

Re: [PATCH v2] RISC-V: Vector-scalar widening multiply-(subtract-)accumulate [PR119100]

2025-07-14 Thread Jeff Law
On 7/14/25 2:52 AM, Robin Dapp wrote: This pattern enables the combine pass (or late-combine, depending on the case) to merge a float_extend'ed vec_duplicate into a plus-mult or minus- mult RTL instruction. Before this patch, we have three instructions, e.g.:   fcvt.s.h   fa5,fa5   vfmv

[PATCH] arm: avoid gcc_s dependency

2025-07-14 Thread Pierre Ossman
Suggested fix for this issue: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60428 Did not get any response there, so seeing if this is a better forum for suggested changes. We've been using this patch for years without any known issues. Regards, -- Pierre Ossman Software Development

Re: [PATCH v3] RISC-V: Mips P8700 Conditional Move Support.

2025-07-14 Thread Jeff Law
On 7/14/25 5:58 AM, Umesh Kalappa wrote: Hi Jeff and Marco, Please pass your comments on the below changes and do needful. The changes fail pre-commit tsting: https://patchwork.sourceware.org/project/gcc/patch/20250702071624.753431-1-ukalappa.m...@gmail.com/

Re: [PATCH] Darwin: account for macOS 26

2025-07-14 Thread Iain Sandoe
Hi FX, sorry for the delay ... > On 14 Jul 2025, at 11:17, FX Coudert wrote: > > Hello, > > darwin25 will be named macOS 26 (codename Tahoe). This is a change from > darwin24, which was macOS 15. We need to adapt the driver to this new > numbering scheme. > > Tested by me on aarch64-darwin25

[PATCH] libstdc++: Make all experimental::observer_ptr functions constexpr

2025-07-14 Thread Jonathan Wakely
I've just created LWG 4295 proposing this change, and am implementing it via this patch. libstdc++-v3/ChangeLog: * include/experimental/memory (swap, make_observer_ptr): Add constexpr. (operator==, operator!=, operator<, operator>, operator<=) (operator>=): Likewis

Re: [PATCH v3] RISC-V: Mips P8700 Conditional Move Support.

2025-07-14 Thread Umesh Kalappa
Hi Jeff and Marco, Please pass your comments on the below changes and do needful. Thank you ~U On Sun, Jul 6, 2025 at 12:56 PM Umesh Kalappa wrote: > Hi @Jeff Law and @ma...@orcam.me.uk > , > > Please have a look at the updated patch for conditional move support and > any comments or sugges

[committed] libstdc++: Protect PSTL headers against overloaded commas

2025-07-14 Thread Jonathan Wakely
Reported upstream: https://github.com/uxlfoundation/oneDPL/issues/2342 libstdc++-v3/ChangeLog: * include/pstl/algorithm_impl.h (__for_each_n_it_serial): Protect against overloaded comma operator. (__brick_walk2): Likewise. (__brick_walk2_n): Likewise. (__br

[committed] libstdc++: Correct value of __cpp_lib_constexpr_exceptions [PR117785]

2025-07-14 Thread Jonathan Wakely
Only P3068R6 (Allowing exception throwing in constant-evaluation) is implemented in the library so far, so the value of the constexpr_exceptions feature test macro should be 202411L. Once we support the library changes in P3378R2 (constexpr exception types) then we can set the value to 202502L agai

Re: [PATCH] libstdc++: Implement std::chrono::current_zone() for Windows

2025-07-14 Thread Jonathan Wakely
On Mon, 14 Jul 2025 at 11:10, Jonathan Wakely wrote: > > On Mon, 14 Jul 2025 at 11:08, Björn Schäpers wrote: > > > > Am 14.07.2025 um 10:20 schrieb Tomasz Kaminski: > > > > > > > > > On Tue, Jul 8, 2025 at 10:48 PM Björn Schäpers wrote: > > > + const auto raw_index = information.Bias

Re: [PATCH v2] x86-64: Add --enable-x86-64-mfentry

2025-07-14 Thread Uros Bizjak
On Sun, Jul 13, 2025 at 12:16 AM Sam James wrote: > > "H.J. Lu" writes: > > > On Sat, Jul 12, 2025 at 6:58 AM Siddhesh Poyarekar > > wrote: > >> > >> On 2025-07-11 15:28, Uros Bizjak wrote: > >> >> Why not just switch over unconditionally? __fentry__ seems like a > >> >> better alternative to

Re: [PATCH] libstdc++: library side of C++26 P2786R13 - Trivial Relocatability [PR119064]

2025-07-14 Thread Tomasz Kaminski
On Mon, Jul 14, 2025 at 12:23 PM Jakub Jelinek wrote: > On Mon, Jul 14, 2025 at 12:11:18PM +0200, Tomasz Kaminski wrote: > > > + if (__builtin_expect(__fwd, true)) > > > > > We have a preference to use [[likely]] attribute when possible. > > Ok, changed to > if (__fwd) [[likely]] > in

[PATCH] aarch64: fixup: Implement sme2+faminmax extension.

2025-07-14 Thread Alfie Richards
Hi all, This is a minor fixup to the previous patch I committed fixing Spencers comments. Bootstrapped and reg tested for Aarch64. Thanks, Alfie -- >8 -- Fixup to the SME2+FAMINMAX intrinsics commit. gcc/ChangeLog: * config/aarch64/aarch64-sme.md (@aarch64_sme_): Change gatin

Re: [PATCH] aarch64: Support unpacked SVE integer division

2025-07-14 Thread Spencer Abson
On Fri, Jul 11, 2025 at 02:40:46PM +, Remi Machet wrote: > > On 7/11/25 08:21, Spencer Abson wrote: > > External email: Use caution opening links or attachments > > > This patch extends the existing patterns for SVE_INT_BINARY_SD to > support partial SVE integer modes, including those imple

Re: [PATCH] libstdc++: library side of C++26 P2786R13 - Trivial Relocatability [PR119064]

2025-07-14 Thread Jakub Jelinek
On Mon, Jul 14, 2025 at 12:11:18PM +0200, Tomasz Kaminski wrote: > > + if (__builtin_expect(__fwd, true)) > > > We have a preference to use [[likely]] attribute when possible. Ok, changed to if (__fwd) [[likely]] in my copy. > > > + { > > + for (; __first != __last; ++__

  1   2   >