Re: [Patch, fortran] PR37336 finalization

2023-06-02 Thread Thomas Koenig via Gcc-patches
Hi Paul, I propose to backport r13-6747-gd7caf313525a46f200d7f5db1ba893f853774aee to 12-branch very soon. Is this something that we usually do? While finalization was basically broken before, some people still used working subsets (or subsets that were broken, and they adapted or wrote their

Re: [PATCH, committed] Fortran: fix diagnostics for SELECT RANK [PR100607]

2023-06-02 Thread Paul Richard Thomas via Gcc-patches
Hi Harald, It looks good to me. Thanks to you and Steve for the fix. I suggest that it is such and obvious one that it deserved back-porting. Cheers Paul On Fri, 2 Jun 2023 at 19:06, Harald Anlauf via Fortran wrote: > > Dear all, > > I've committed that attached simple patch on behalf of Steve

Re: [pushed] analyzer: implement various atomic builtins [PR109015]

2023-06-02 Thread Maxim Kuvyrkov via Gcc-patches
Hi David, The new test ICEs the compiler on aarch64-linux-gnu [1]. Would you please investigate? Running gcc:gcc.dg/analyzer/analyzer.exp ... FAIL: gcc.dg/analyzer/atomic-builtins-qemu-sockets.c (internal compiler error: in validate, at analyzer/store.cc:1329) FAIL: gcc.dg/analyzer/atomic-buil

Re: [PATCH] RISCV: Add -m(no)-omit-leaf-frame-pointer support.

2023-06-02 Thread Jeff Law via Gcc-patches
On 6/2/23 01:07, yanzhang.wang--- via Gcc-patches wrote: From: Yanzhang Wang gcc/ChangeLog: * config/riscv/riscv.cc (riscv_save_reg_p): Save ra for leaf when enabling -mno-omit-leaf-frame-pointer (riscv_option_override): Override omit-frame-pointer. (riscv_

RE: [PATCH V2] RISC-V: Fix warning in predicated.md

2023-06-02 Thread Li, Pan2 via Gcc-patches
Committed, thanks Jeff. Pan -Original Message- From: Gcc-patches On Behalf Of Jeff Law via Gcc-patches Sent: Saturday, June 3, 2023 4:57 AM To: juzhe.zh...@rivai.ai; gcc-patches@gcc.gnu.org Cc: kito.ch...@gmail.com; kito.ch...@sifive.com; pal...@dabbelt.com; pal...@rivosinc.com; rdapp.

RE: Re: [PATCH V2] RISC-V: Add pseudo vwmul.wv pattern to enhance vwmul.vv instruction optimizations

2023-06-02 Thread Li, Pan2 via Gcc-patches
Committed, with Robin's suggestion for commit log, thanks Robin and Kito. Pan -Original Message- From: Gcc-patches On Behalf Of Kito Cheng via Gcc-patches Sent: Saturday, June 3, 2023 9:10 AM To: 钟居哲 Cc: Robin Dapp ; gcc-patches ; kito.cheng ; palmer ; palmer ; jeffreyalaw Subject:

Re: Re: [PATCH V2] RISC-V: Add pseudo vwmul.wv pattern to enhance vwmul.vv instruction optimizations

2023-06-02 Thread Kito Cheng via Gcc-patches
Lgtm, thanks:) juzhe.zh...@rivai.ai 於 2023年6月2日 週五 15:20 寫道: > Thanks. I am gonna wait for Jeff or Kito final approve. > > -- > juzhe.zh...@rivai.ai > > > *From:* Robin Dapp > *Date:* 2023-06-02 15:18 > *To:* juzhe.zh...@rivai.ai; gcc-patches > *CC:* rdapp.gcc ; kit

Re: PING^2: [PATCH] release the sorted FDE array when deregistering a frame [PR109685]

2023-06-02 Thread Jeff Law via Gcc-patches
On 6/2/23 08:54, Thomas Neumann wrote: Summary: The old linear scan logic called free while searching the list of frames. The atomic fast path finds the frame quickly, but forgot the free call. This patches adds the missing free. Bugzilla #109685. See: https://gcc.gnu.org/pipermail/gcc-patc

Re: PING: [PATCH] fix radix sort on 32bit platforms [PR109670]

2023-06-02 Thread Jeff Law via Gcc-patches
On 6/2/23 09:00, Thomas Neumann via Gcc-patches wrote: Summary: The radix sort did not handle the uppermost byte correctly, which sometimes broke win32 exceptions. Bugzilla #109670. The reporter confirmed that the patch fixes the bug. See: https://gcc.gnu.org/pipermail/gcc-patches/2023-May/

Re: [PATCH V2] RISC-V: Fix warning in predicated.md

2023-06-02 Thread Jeff Law via Gcc-patches
On 6/2/23 03:33, juzhe.zh...@rivai.ai wrote: From: Juzhe-Zhong Notice there is warning in predicates.md: ../../../riscv-gcc/gcc/config/riscv/predicates.md: In function ‘bool arith_operand_or_mode_mask(rtx, machine_mode)’: ../../../riscv-gcc/gcc/config/riscv/predicates.md:33:14: warning:

[pushed] Darwin, PPC: Fix struct layout with pragma pack [PR110044].

2023-06-02 Thread Iain Sandoe via Gcc-patches
@David: I am not sure what sets the ABI on AIX (for Darwin, it is effectively "whatever the system compiler [Apple gcc-4] does") but from an inspection of the code, it seems that (if the platform should honour #pragma pack) a similar effect could be present there too. Tested on powerpc-apple-darwi

[PATCH, committed] Fortran: fix diagnostics for SELECT RANK [PR100607]

2023-06-02 Thread Harald Anlauf via Gcc-patches
Dear all, I've committed that attached simple patch on behalf of Steve after discussion in the PR and regtesting on x86_64-pc-linux-gnu. It fixes a duplicate error message and an ICE. Pushed as r14-1505-gfae09dfc0e6bf4cfe35d817558827aea78c6426f . Thanks, Harald From fae09dfc0e6bf4cfe35d8175588

[PATCH] libatomic: Enable lock-free 128-bit atomics on AArch64 [PR110061]

2023-06-02 Thread Wilco Dijkstra via Gcc-patches
Enable lock-free 128-bit atomics on AArch64. This is backwards compatible with existing binaries, gives better performance than locking atomics and is what most users expect. Note 128-bit atomic loads use a load/store exclusive loop if LSE2 is not supported. This results in an implicit store wh

PING Re: [PATCH RFA (tree-eh)] c++: use __cxa_call_terminate for MUST_NOT_THROW [PR97720]

2023-06-02 Thread Jason Merrill via Gcc-patches
Since Jonathan approved the library change, I'm looking for middle-end approval for the tree-eh change, even without advice on the potential follow-up. On 5/24/23 14:55, Jason Merrill wrote: Middle-end folks: any thoughts about how best to make the change described in the last paragraph below?

Re: [PATCH] libstdc++: Do not assume existence of char8_t codecvt facet

2023-06-02 Thread Jonathan Wakely via Gcc-patches
On Fri, 2 Jun 2023 at 16:45, Joseph Faulls wrote: > It is not required that codecvt facet be > supported by > > the locale, nor is it added as part of the default locale. This can lead to > > dangerous behaviour when static_cast. > Ouch, yes indeed. I don't know why I added that there. Thanks for

Re: [PATCH][committed] btf: Fix -Wformat errors

2023-06-02 Thread Alex Coplan via Gcc-patches
On 02/06/2023 18:45, Jakub Jelinek wrote: > On Fri, Jun 02, 2023 at 06:18:38PM +0200, Rainer Orth wrote: > > Hi Alex, > > > > > g:7aae58b04b92303ccda3ead600be98f0d4b7f462 introduced -Wformat errors > > > breaking bootstrap on some targets. This patch fixes that. > > > > > > Committed as obvious. >

Re: [PATCH][committed] btf: Fix -Wformat errors

2023-06-02 Thread Jakub Jelinek via Gcc-patches
On Fri, Jun 02, 2023 at 06:18:38PM +0200, Rainer Orth wrote: > Hi Alex, > > > g:7aae58b04b92303ccda3ead600be98f0d4b7f462 introduced -Wformat errors > > breaking bootstrap on some targets. This patch fixes that. > > > > Committed as obvious. > > > > Thanks, > > Alex > > > > gcc/ChangeLog: > > > >

[PATCH][committed] btf: fix bootstrap -Wformat errors [PR110073]

2023-06-02 Thread David Faust via Gcc-patches
Commit 7aae58b04b9 "btf: improve -dA comments for testsuite" broke bootstrap on a number of architectures because it introduced some new -Wformat errors. Fix those errors by properly using PRIu64 and a small refactor to the offending code. Based on the suggested patch from Rainer Orth. Committed

Re: [PATCH] c++: is_specialization_of_friend confusion [PR109923]

2023-06-02 Thread Jason Merrill via Gcc-patches
On 6/2/23 10:29, Patrick Palka wrote: Bootstrapped and regtested on x86_64-pc-linux-gnu, does this look OK for trunk? OK. -- >8 -- The check for a non-template member function of a class template in is_specialization_of_friend is overbroad, and accidentally holds for a non-template hidden fr

Re: [PATCH] c++: simplify TEMPLATE_TEMPLATE_PARM hashing

2023-06-02 Thread Jason Merrill via Gcc-patches
On 6/2/23 10:29, Patrick Palka wrote: Bootstrapped and regtested on x86_64-pc-linux-gnu, does this look OK for trunk? OK. -- >8 -- r10-7815-gaa576f2a860c82 added special hashing for TEMPLATE_TEMPLATE_PARM since non-lowered ttps had TYPE_CANONICAL but level lowered ttps did not. But this is n

Re: [PATCH] c++: replace in_template_function

2023-06-02 Thread Jason Merrill via Gcc-patches
On 6/2/23 11:15, Patrick Palka wrote: Bootstrapped and regtested on x86_64-pc-linux-gnu, does this look OK for trunk? OK. -- >8 -- All uses of in_template_function besides the one in cp_make_fname_decl seem like they could be generalized to apply to all template contexts, not just function t

Re: [PATCH] c++: bad 'this' conversion for nullary memfn [PR106760]

2023-06-02 Thread Jason Merrill via Gcc-patches
On 6/2/23 11:55, Patrick Palka wrote: Bootstrapped and regtested on x86_64-pc-linu-xgnu, does this look OK for trunk? -- >8 -- Here we notice the 'this' conversion for the call f() is bad, so we correctly defer instantiating it, but we end up never adding it to 'bad_fns' since missing_conversio

Re: [PATCH][committed] btf: Fix -Wformat errors

2023-06-02 Thread Iain Sandoe
> On 2 Jun 2023, at 17:18, Rainer Orth wrote: > > Hi Alex, > >> g:7aae58b04b92303ccda3ead600be98f0d4b7f462 introduced -Wformat errors >> breaking bootstrap on some targets. This patch fixes that. >> >> Committed as obvious. >> >> Thanks, >> Alex >> >> gcc/ChangeLog: >> >> * btfout.cc

Re: [PATCH 1/2] c++: refine dependent_alias_template_spec_p [PR90679]

2023-06-02 Thread Patrick Palka via Gcc-patches
On Thu, 1 Jun 2023, Patrick Palka wrote: > For a complex alias template-id, dependent_alias_template_spec_p returns > true if any template argument of the template-id is dependent. This > predicate indicates that substitution into the template-id may behave > differently with respect to SFINAE th

Re: [PATCH][committed] btf: Fix -Wformat errors

2023-06-02 Thread Rainer Orth
Hi Alex, > g:7aae58b04b92303ccda3ead600be98f0d4b7f462 introduced -Wformat errors > breaking bootstrap on some targets. This patch fixes that. > > Committed as obvious. > > Thanks, > Alex > > gcc/ChangeLog: > > * btfout.cc (btf_asm_type): Use PRIu64 instead of %lu for uint64_t. > (btf_a

Re: [PATCH 2/2] btf: improve -dA comments for testsuite

2023-06-02 Thread Alex Coplan via Gcc-patches
Hi Iain, On 02/06/2023 09:32, Iain Sandoe wrote: > Hi David, > > > On 31 May 2023, at 07:13, Indu Bhagat via Gcc-patches > > wrote: > > > > On 5/30/23 11:27, David Faust wrote: > >> [Changes from v1: > >> - Fix typos. > >> - Split unrelated change into separate commit. > >> - Improve asm co

[PATCH][committed] btf: Fix -Wformat errors

2023-06-02 Thread Alex Coplan via Gcc-patches
Hi, g:7aae58b04b92303ccda3ead600be98f0d4b7f462 introduced -Wformat errors breaking bootstrap on some targets. This patch fixes that. Committed as obvious. Thanks, Alex gcc/ChangeLog: * btfout.cc (btf_asm_type): Use PRIu64 instead of %lu for uint64_t. (btf_asm_datasec_type): Lik

[PATCH] c++: bad 'this' conversion for nullary memfn [PR106760]

2023-06-02 Thread Patrick Palka via Gcc-patches
Bootstrapped and regtested on x86_64-pc-linu-xgnu, does this look OK for trunk? -- >8 -- Here we notice the 'this' conversion for the call f() is bad, so we correctly defer instantiating it, but we end up never adding it to 'bad_fns' since missing_conversion_p for it returns false (its only argum

[pushed] c++: fix explicit/copy problem [PR109247]

2023-06-02 Thread Jason Merrill via Gcc-patches
Tested x86_64-pc-linux-gnu, applying to trunk. -- 8< -- In the testcase, the user wants the assignment to use the operator= declared in the class, but because [over.match.list] says that explicit constructors are also considered for list-initialization, as affirmed in CWG1228, we end up choosing

[PATCH] libstdc++: Do not assume existence of char8_t codecvt facet

2023-06-02 Thread Joseph Faulls
It is not required that codecvt facet be supported by the locale, nor is it added as part of the default locale. This can lead to dangerous behaviour when static_cast. libstdc++-v3/ChangeLog: * include/bits/locale_classes.tcc: Remove check. --- libstdc++-v3/include/bits/locale_classes.tcc

[PATCH 12/12] [contrib] validate_failures.py: Ignore stray filesystem paths in results

2023-06-02 Thread Maxim Kuvyrkov via Gcc-patches
This patch simplifies comparison of results that have filesystem paths. E.g., (assuming different values of ): Running /home/user/gcc-N/gcc/testsuite/gcc.target/aarch64/sve/acle/aarch64-sve-acle-asm.exp ... ERROR: tcl error sourcing /home/user/gcc-N/gcc/testsuite/gcc.target/aarch64/sve/acle/aa

[PATCH 08/12] [contrib] validate_failures.py: Support "$tool:" prefix in exp names

2023-06-02 Thread Maxim Kuvyrkov via Gcc-patches
From: Christophe Lyon This makes it easier to extract the $tool:$exp pair when iterating over failures/flaky tests, which, in turn, simplifies re-running testsuite parts that have unexpected failures or passes. --- contrib/testsuite-management/validate_failures.py | 8 +--- 1 file changed, 5

[PATCH 11/12] [contrib] validate_failures.py: Add "--expiry_date YYYYMMDD" option

2023-06-02 Thread Maxim Kuvyrkov via Gcc-patches
This option sets "today" date to compare expiration entries against. Setting expiration date into the future allows re-detection of flaky tests and creating fresh entries for them before the current flaky entries expire. --- .../testsuite-management/validate_failures.py | 24 +-- 1

[PATCH 09/12] [contrib] validate_failures.py: Improve error output

2023-06-02 Thread Maxim Kuvyrkov via Gcc-patches
From: Thiago Bauermann - Print message in case of broken sum file error. - Print error messages to stderr. The script's stdout is, usually, redirected to a file, and error messages shouldn't go there. --- contrib/testsuite-management/validate_failures.py | 5 - 1 file changed, 4 insertion

[PATCH 07/12] [contrib] validate_failures.py: Use exit code "2" to indicate regression

2023-06-02 Thread Maxim Kuvyrkov via Gcc-patches
... in the results. Python exits with code "1" on exceptions and internal errors, which we use to detect failure to parse results. --- contrib/testsuite-management/validate_failures.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/testsuite-management/validate_failur

[PATCH 05/12] [contrib] validate_failures.py: Add more verbosity levels

2023-06-02 Thread Maxim Kuvyrkov via Gcc-patches
... to control validate_failures.py output --- .../testsuite-management/validate_failures.py | 82 +++ 1 file changed, 46 insertions(+), 36 deletions(-) diff --git a/contrib/testsuite-management/validate_failures.py b/contrib/testsuite-management/validate_failures.py index 1bd09e

[PATCH 06/12] [contrib] validate_failures.py: Be more stringent in parsing result lines

2023-06-02 Thread Maxim Kuvyrkov via Gcc-patches
Before this patch we would identify malformed line "UNRESOLVEDTest run by tcwg-buildslave on Mon Aug 23 10:17:50 2021" as an interesting result, only to fail in TestResult:__init__ due to missing ":" after UNRESOLVED. This patch makes all places that parse result lines use a single compiled regex.

[PATCH 02/12] [contrib] validate_failures.py: Support expiry attributes in manifests

2023-06-02 Thread Maxim Kuvyrkov via Gcc-patches
--- contrib/testsuite-management/validate_failures.py | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/contrib/testsuite-management/validate_failures.py b/contrib/testsuite-management/validate_failures.py index 94ba2e58b51..7351ba120b7 100755 --- a/contrib/testsuite-m

[PATCH 03/12] [contrib] validate_failures.py: Read in manifest when comparing build dirs

2023-06-02 Thread Maxim Kuvyrkov via Gcc-patches
This allows comparison of two build directories with a manifest listing known flaky tests on the side. --- contrib/testsuite-management/validate_failures.py | 14 +++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/contrib/testsuite-management/validate_failures.py b/cont

[PATCH 10/12] [contrib] validate_failures.py: Add new option --invert_match

2023-06-02 Thread Maxim Kuvyrkov via Gcc-patches
This option is used to detect flaky tests that FAILed in the clean build (or manifest), but PASSed in the current build (or manifest). The option inverts output logic similar to what "-v/--invert-match" does for grep. --- .../testsuite-management/validate_failures.py | 34 +-- 1 f

[PATCH 04/12] [contrib] validate_failures.py: Simplify GetManifestPath()

2023-06-02 Thread Maxim Kuvyrkov via Gcc-patches
... and don't require a valid build directory when no data from it is necessary. --- contrib/testsuite-management/validate_failures.py | 13 + 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/contrib/testsuite-management/validate_failures.py b/contrib/testsuite-management

[PATCH 01/12] [contrib] validate_failures.py: Avoid testsuite aliasing

2023-06-02 Thread Maxim Kuvyrkov via Gcc-patches
This patch adds tracking of current testsuite "tool" and "exp" to the processing of .sum files. This avoids aliasing between tests from different testsuites with same name+description. E.g., this is necessary for testsuite/c-c++-common, which is ran for both gcc and g++ "tools". This patch chang

[contrib] Extend and improve validate_failures.py

2023-06-02 Thread Maxim Kuvyrkov via Gcc-patches
This patch series extends and improves validate_failures.py script to provide a powerful tool to handle DejaGnu test results in automated CI environment. Linaro TCWG uses validate_failures.py to ... - compare test results without human oversight, - detect unexpected FAILs vs baseline, - detect une

[PATCH] c++: replace in_template_function

2023-06-02 Thread Patrick Palka via Gcc-patches
Bootstrapped and regtested on x86_64-pc-linux-gnu, does this look OK for trunk? -- >8 -- All uses of in_template_function besides the one in cp_make_fname_decl seem like they could be generalized to apply to all template contexts, not just function templates. To that end this patch replaces the

Re: [PATCH V2, rs6000] Disable generation of scalar modulo instructions

2023-06-02 Thread Pat Haugen via Gcc-patches
Ping ^3 On 4/18/23 7:22 AM, Pat Haugen via Gcc-patches wrote: Updated from prior patch to also disable for int128. Disable generation of scalar modulo instructions. It was recently discovered that the scalar modulo instructions can suffer noticeable performance issues for certain input values

PING: [PATCH] fix radix sort on 32bit platforms [PR109670]

2023-06-02 Thread Thomas Neumann via Gcc-patches
Summary: The radix sort did not handle the uppermost byte correctly, which sometimes broke win32 exceptions. Bugzilla #109670. The reporter confirmed that the patch fixes the bug. See: https://gcc.gnu.org/pipermail/gcc-patches/2023-May/618000.html Best Thomas

Re: [RFC] Introduce -finline-memset-loops

2023-06-02 Thread Fangrui Song via Gcc-patches
On Fri, Jun 2, 2023 at 3:11 AM Alexandre Oliva via Gcc-patches wrote: > > On Jan 19, 2023, Alexandre Oliva wrote: > > > Would it make more sense to extend it, even constrained by the > > limitations mentioned above, or handle memset only? In the latter case, > > would it still make sense to adop

PING^2: [PATCH] release the sorted FDE array when deregistering a frame [PR109685]

2023-06-02 Thread Thomas Neumann via Gcc-patches
Summary: The old linear scan logic called free while searching the list of frames. The atomic fast path finds the frame quickly, but forgot the free call. This patches adds the missing free. Bugzilla #109685. See: https://gcc.gnu.org/pipermail/gcc-patches/2023-May/619026.html Best Thomas

[COMMITTED] reg-stack: Change return type of predicate functions from int to bool

2023-06-02 Thread Uros Bizjak via Gcc-patches
Also change some internal variables to bool and recode handling of boolean varialbes to not use bitwise or. gcc/ChangeLog: * rtl.h (stack_regs_mentioned): Change return type from int to bool. * reg-stack.cc (struct_block_info_def): Change "done" to bool. (stack_regs_mentioned_p): Chan

[PATCH] c++: simplify TEMPLATE_TEMPLATE_PARM hashing

2023-06-02 Thread Patrick Palka via Gcc-patches
Bootstrapped and regtested on x86_64-pc-linux-gnu, does this look OK for trunk? -- >8 -- r10-7815-gaa576f2a860c82 added special hashing for TEMPLATE_TEMPLATE_PARM since non-lowered ttps had TYPE_CANONICAL but level lowered ttps did not. But this is no longer the case ever since r13-737-gd0ef9e061

[PATCH] c++: is_specialization_of_friend confusion [PR109923]

2023-06-02 Thread Patrick Palka via Gcc-patches
Bootstrapped and regtested on x86_64-pc-linux-gnu, does this look OK for trunk? -- >8 -- The check for a non-template member function of a class template in is_specialization_of_friend is overbroad, and accidentally holds for a non-template hidden friend too, which causes the predicate to return

Re: [PATCH 1/4] rs6000: build constant via li;rotldi

2023-06-02 Thread David Edelsohn via Gcc-patches
Hi, Jiufu * config/rs6000/rs6000.cc (can_be_rotated_to_possitive_li): New function. (can_be_rotated_to_negative_li): New function. (can_be_built_by_li_and_rotldi): New function. (rs6000_emit_set_long_const): Call can_be_built_by_li_and_rotldi. In English the word

RE: [PATCH] New wi::bitreverse function.

2023-06-02 Thread Roger Sayle
Doh! Wrong patch... Roger -- -Original Message- From: Roger Sayle Sent: Friday, June 2, 2023 3:17 PM To: 'gcc-patches@gcc.gnu.org' Cc: 'Richard Sandiford' Subject: [PATCH] New wi::bitreverse function. This patch provides a wide-int implementation of bitreverse, that implements bot

[PATCH] New wi::bitreverse function.

2023-06-02 Thread Roger Sayle
This patch provides a wide-int implementation of bitreverse, that implements both of Richard Sandiford's suggestions from the review at https://gcc.gnu.org/pipermail/gcc-patches/2023-May/618215.html of an improved API (as a stand-alone function matching the bswap refactoring), and an implementatio

Ping: [PATCH v2] libcpp: Handle extended characters in user-defined literal suffix [PR103902]

2023-06-02 Thread Lewis Hyatt via Gcc-patches
Hello- Ping please? Thanks. https://gcc.gnu.org/pipermail/gcc-patches/2023-March/613247.html -Lewis On Tue, May 2, 2023 at 9:27 AM Lewis Hyatt wrote: > > May I please ping this one? Thanks... > https://gcc.gnu.org/pipermail/gcc-patches/2023-March/613247.html > > On Thu, Mar 2, 2023 at 6:21 PM L

Re: [Patch, fortran] PR37336 finalization

2023-06-02 Thread Paul Richard Thomas via Gcc-patches
Hi All, I propose to backport r13-6747-gd7caf313525a46f200d7f5db1ba893f853774aee to 12-branch very soon. Before that, I propose to remove the F2003/2008 finalization of structure and array constructors in 13- and 14-branches. I can see why it was removed from the standard in a correction to F2008

[pushed] analyzer: implement various atomic builtins [PR109015]

2023-06-02 Thread David Malcolm via Gcc-patches
This patch implements many of the __atomic_* builtins from sync-builtins.def as known_function subclasses within the analyzer. Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu. Pushed to trunk as r14-1497-gef768035ae8090. gcc/analyzer/ChangeLog: PR analyzer/109015 * k

[pushed] analyzer: regions in different memory spaces can't alias

2023-06-02 Thread David Malcolm via Gcc-patches
Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu. Pushed to trunk as r14-1496-gb8a916726e7f4b. gcc/analyzer/ChangeLog: * store.cc (store::eval_alias_1): Regions in different memory spaces can't alias. --- gcc/analyzer/store.cc | 12 1 file changed, 12 ins

[PATCH] Add more ForEachMacros to clang-format file

2023-06-02 Thread Lehua Ding
Hi, This patch adds some missed ForEachMacros to the contrib/clang-format file, which allows the clang-format tool to format gcc code correctly. Best, Lehua --- contrib/clang-format | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/contrib/clang-format b/contrib/clan

Re: [PATCH] Move std::search into algobase.h

2023-06-02 Thread Jonathan Wakely via Gcc-patches
On Fri, 2 Jun 2023 at 12:30, Jonathan Wakely wrote: > > > On Fri, 2 Jun 2023 at 10:47, François Dumont wrote: > >> Ok, push done. >> > > Thanks. > > >> Even after full rebuild those tests are still UNRESOLVED on my system. >> > What is the error in the log? > > What is your system? How and where

Re: [PATCH] libstdc++: Correct NTTP and simd_mask ctor call

2023-06-02 Thread Jonathan Wakely via Gcc-patches
On Fri, 2 Jun 2023 at 10:30, Alexandre Oliva via Libstdc++ < libstd...@gcc.gnu.org> wrote: > > ISTM that rtems is missing some of the math.h functions expected by > libstdc++, but also that even those that are present are not visible in > namespace ::std::, where the macros reasonably expect to fi

Re: [PATCH 2/3] Refactor widen_plus as internal_fn

2023-06-02 Thread Richard Sandiford via Gcc-patches
Just some very minor things. "Andre Vieira (lists)" writes: > diff --git a/gcc/internal-fn.cc b/gcc/internal-fn.cc > index > 5c9da73ea11f8060b18dcf513599c9694fa4f2ad..348bee35a35ae4ed9a8652f5349f430c2733e1cb > 100644 > --- a/gcc/internal-fn.cc > +++ b/gcc/internal-fn.cc > @@ -90,6 +90,71 @@ loo

RE: [PATCH V3] VECT: Change flow of decrement IV

2023-06-02 Thread Li, Pan2 via Gcc-patches
Committed, thanks all. Pan -Original Message- From: Gcc-patches On Behalf Of Richard Sandiford via Gcc-patches Sent: Friday, June 2, 2023 7:44 PM To: juzhe.zh...@rivai.ai Cc: rguenther ; gcc-patches ; linkw Subject: Re: [PATCH V3] VECT: Change flow of decrement IV "juzhe.zh...@rivai.

Re: [PATCH V3] VECT: Change flow of decrement IV

2023-06-02 Thread Richard Sandiford via Gcc-patches
"juzhe.zh...@rivai.ai" writes: > Thanks Richi. I am gonna merge it after Richard's final approve. Thanks for checking, but no need to wait for a second ack from me! Please go ahead and commit. Richard

[avr, committed] Improve operations on non-LD_REGS when the operation follows a move from LD_REGS.

2023-06-02 Thread Georg-Johann Lay
Applied the following patch to improve operations on no-LD_REGS when the operation follows a move from LD_REGS. Johann target/110088: Improve operation of l-reg with const after move from d-reg. After reload, there may be sequences like lreg = dreg lreg = lreg const with an LD_REGS dreg,

Re: [PATCH] Move std::search into algobase.h

2023-06-02 Thread Jonathan Wakely via Gcc-patches
On Fri, 2 Jun 2023 at 10:47, François Dumont wrote: > Ok, push done. > Thanks. > Even after full rebuild those tests are still UNRESOLVED on my system. > What is the error in the log? What is your system? How and where did you install "OMP"? Does the libgomp directory exist in the GCC build

[PATCH 2/2] [V3] [RISC-V] support cm.push cm.pop cm.popret in zcmp

2023-06-02 Thread Fei Gao
Zcmp can share the same logic as save-restore in stack allocation: pre-allocation by cm.push, step 1 and step 2. please be noted cm.push pushes ra, s0-s11 in reverse order than what save-restore does. So adaption has been done in .cfi directives in my patch. Signed-off-by: Fei Gao gcc/ChangeL

[PATCH 1/2] [RISC-V] fix cfi issue in save-restore.

2023-06-02 Thread Fei Gao
This patch fixes a cfi issue introduced by https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=60524be1e3929d83e15fceac6e2aa053c8a6fb20 Test code: char my_getchar(); float getf(); int test_f0() { int s0 = my_getchar(); float f0 = getf(); int b = my_getchar(); return f0+s0+b; } cflags: -g -Os -m

Re: [RFC] Introduce -finline-memset-loops

2023-06-02 Thread Alexandre Oliva via Gcc-patches
On Jan 19, 2023, Alexandre Oliva wrote: > Would it make more sense to extend it, even constrained by the > limitations mentioned above, or handle memset only? In the latter case, > would it still make sense to adopt a command-line option that suggests a > broader effect than it already has, even

[PATCH, PR110086] avr: Fix ICE on optimize attribute

2023-06-02 Thread SenthilKumar.Selvaraj--- via Gcc-patches
Hi, This patch fixes an ICE when an optimize attribute changes the prevailing optimization level. I found https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105069 describing the same ICE for the sh target, where the fix was to enable save/restore of target specific options modified via TARGET_OPTIMIZA

Consider '--with-build-sysroot=[...]' for target libraries' build-tree testing (instead of build-time 'CC' etc.) [PR109951]

2023-06-02 Thread Thomas Schwinge
Hi! For context: In early 2020, Maciej pushed a set of changes that made target libraries capture their build-time 'CC' for test-time usage as 'GCC_UNDER_TEST' (via the respective 'site.exp'), for build-tree testing (but not installed testing). This was motivated by the need for '--sysroot=[...]

Re: [PATCH] Move std::search into algobase.h

2023-06-02 Thread François Dumont via Gcc-patches
Ok, push done. Even after full rebuild those tests are still UNRESOLVED on my system. Yes, I also noticed that I could remove this check. I'll propose it later. François On 02/06/2023 09:43, Jonathan Wakely wrote: On Fri, 2 Jun 2023 at 08:33, François Dumont wrote: I haven't been able to

Re: [PATCH] inline: improve internal function costs

2023-06-02 Thread Andre Vieira (lists) via Gcc-patches
On 02/06/2023 10:13, Richard Biener wrote: On Thu, 1 Jun 2023, Andre Vieira (lists) wrote: Hi, This is a follow-up of the internal function patch to add widening and narrowing patterns. This patch improves the inliner cost estimation for internal functions. I have no idea why calls are s

Re: [PATCH] libstdc++: Correct NTTP and simd_mask ctor call

2023-06-02 Thread Matthias Kretz via Gcc-patches
On Friday, 2 June 2023 11:30:17 CEST Alexandre Oliva wrote: > I also noticed the same test is failing on rtems6 (at least with gcc > 11). AFAICT the problem is that _GLIBCXX_SIMD_MATH_CALL* macros in > simd_math.h expect the named functions to be in std::, but I get such > errors as: > > .../aarc

Re: [PATCH] doc: clarify semantics of vector bitwise shifts

2023-06-02 Thread Richard Biener via Gcc-patches
On Thu, Jun 1, 2023 at 8:25 PM Alexander Monakov wrote: > > > On Wed, 31 May 2023, Richard Biener wrote: > > > On Tue, May 30, 2023 at 4:49 PM Alexander Monakov > > wrote: > > > > > > > > > On Thu, 25 May 2023, Richard Biener wrote: > > > > > > > On Wed, May 24, 2023 at 8:36 PM Alexander Monakov

Re: [PATCH] doc: clarify semantics of vector bitwise shifts

2023-06-02 Thread Richard Biener via Gcc-patches
On Fri, Jun 2, 2023 at 11:24 AM Alexander Monakov wrote: > > > On Fri, 2 Jun 2023, Matthias Kretz wrote: > > > > Okay, I see opinions will vary here. I was thinking about our immintrin.h > > > which is partially implemented in terms of generic vectors. Imagine we > > > extend UBSan to trap on sign

Re: Re: [PATCH] RISC-V: Fix warning in predicated.md

2023-06-02 Thread juzhe.zh...@rivai.ai
Hi, I fixed it : https://gcc.gnu.org/pipermail/gcc-patches/2023-June/620462.html Just feel free to commit it. Thanks. juzhe.zh...@rivai.ai From: Andreas Schwab Date: 2023-06-02 17:29 To: juzhe.zhong CC: gcc-patches; kito.cheng; kito.cheng; palmer; palmer; jeffreyalaw; rdapp.gcc Subject: Re: [

Re: [PATCH] doc: clarify semantics of vector bitwise shifts

2023-06-02 Thread Matthias Kretz via Gcc-patches
On Friday, 2 June 2023 11:24:23 CEST Alexander Monakov wrote: > > > I'm not sure what you consider a breaking change here. Is that the > > > implied > > > threat to use undefinedness for range deduction and other optimizations? > > > > Consider the stdx::simd implementation. It currently follows s

[PATCH V2] RISC-V: Fix warning in predicated.md

2023-06-02 Thread juzhe . zhong
From: Juzhe-Zhong Notice there is warning in predicates.md: ../../../riscv-gcc/gcc/config/riscv/predicates.md: In function ???bool arith_operand_or_mode_mask(rtx, machine_mode): ../../../riscv-gcc/gcc/config/riscv/predicates.md:33:14: warning: comparison between signed and unsigned

Re: [PATCH] rtl-optimization: [PR102733] DSE removing address which only differ by address space.

2023-06-02 Thread Richard Biener via Gcc-patches
On Fri, Jun 2, 2023 at 9:36 AM Andrew Pinski via Gcc-patches wrote: > > The problem here is DSE was not taking into account the address space > which meant if you had two addresses say `fs:0` and `gs:0` (on x86_64), > DSE would think they were the same and remove the first store. > This fixes that

Re: Re: [PATCH] RISC-V: Fix warning in predicated.md

2023-06-02 Thread juzhe.zh...@rivai.ai
Oh there is 2 INTVAL (op) == GET_MODE_MASK... I only change one :) juzhe.zh...@rivai.ai From: Andreas Schwab Date: 2023-06-02 17:29 To: juzhe.zhong CC: gcc-patches; kito.cheng; kito.cheng; palmer; palmer; jeffreyalaw; rdapp.gcc Subject: Re: [PATCH] RISC-V: Fix warning in predicated.md ../

Re: [PATCH] libstdc++: Correct NTTP and simd_mask ctor call

2023-06-02 Thread Alexandre Oliva via Gcc-patches
On Jun 2, 2023, Matthias Kretz wrote: > I'm looking at that function again, also in light of recent improvements wrt. > code-gen, and will remove that assumption, that long long is vectorizable. Thanks, I'll leave that to you, then. I also noticed the same test is failing on rtems6 (at least

Re: [PATCH RFA] varasm: check float size

2023-06-02 Thread Richard Biener via Gcc-patches
On Fri, Jun 2, 2023 at 4:44 AM Jason Merrill via Gcc-patches wrote: > > Tested x86_64-pc-linux-gnu, OK for trunk? OK. > -- 8< -- > > In PR95226, the testcase was failing because we tried to output_constant a > NOP_EXPR to float from a double REAL_CST, and so we output a double where > the caller

Re: [PATCH] RISC-V: Fix warning in predicated.md

2023-06-02 Thread Andreas Schwab
../../gcc/gcc/config/riscv/predicates.md: In function ‘bool arith_operand_or_mod e_mask(rtx, machine_mode)’: ../../gcc/gcc/config/riscv/predicates.md:33:14: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] (match_test "INTVAL (op) == GET_MODE_MASK (

Re: [PATCH RFA] c++: make initializer_list array static again [PR110070]

2023-06-02 Thread Richard Biener via Gcc-patches
On Fri, Jun 2, 2023 at 3:32 AM Jason Merrill via Gcc-patches wrote: > > I ended up deciding not to apply the DECL_NOT_OBSERVABLE patch that you > approved in stage 3 because I didn't feel like it was fully baked; I'm happy > with this version now, which seems like a more broadly useful flag. > > T

Re: [PATCH] doc: clarify semantics of vector bitwise shifts

2023-06-02 Thread Alexander Monakov via Gcc-patches
On Fri, 2 Jun 2023, Matthias Kretz wrote: > > Okay, I see opinions will vary here. I was thinking about our immintrin.h > > which is partially implemented in terms of generic vectors. Imagine we > > extend UBSan to trap on signed overflow for vector types. I expect that > > will blow up on exist

Re: [PATCH] inline: improve internal function costs

2023-06-02 Thread Richard Biener via Gcc-patches
On Thu, 1 Jun 2023, Andre Vieira (lists) wrote: > Hi, > > This is a follow-up of the internal function patch to add widening and > narrowing patterns. This patch improves the inliner cost estimation for > internal functions. I have no idea why calls are special in IPA analyze_function_body and

Re: [PATCH 2/2] ipa-cp: Feed results of IPA-CP into value numbering

2023-06-02 Thread Richard Biener via Gcc-patches
On Mon, 29 May 2023, Martin Jambor wrote: > Hi, > > PRs 68930 and 92497 show that when IPA-CP figures out constants in > aggregate parameters or when passed by reference but the loads happen > in an inlined function the information is lost. This happens even > when the inlined function itself wa

Re: [PATCH] doc: clarify semantics of vector bitwise shifts

2023-06-02 Thread Matthias Kretz via Gcc-patches
On Friday, 2 June 2023 09:49:26 CEST Alexander Monakov wrote: > > simd x = ...; > > bool t = all_of(x < x + 1); // unconditionally true or not? > > > > I'd expect t to be unconditionally true. Because simd simply is a > > data- parallel version of int. > > Okay, I see opinions will vary here. I w

Re: Re: [PATCH V3] VECT: Change flow of decrement IV

2023-06-02 Thread juzhe.zh...@rivai.ai
Thanks Richi. I am gonna merge it after Richard's final approve. juzhe.zh...@rivai.ai From: Richard Biener Date: 2023-06-02 16:56 To: juzhe.zh...@rivai.ai CC: gcc-patches; richard.sandiford; linkw Subject: Re: [PATCH V3] VECT: Change flow of decrement IV On Thu, 1 Jun 2023, juzhe.zh...@rivai.a

Re: [PATCH] Optimized "(X - N * M) / N + M" to "X / N" if valid

2023-06-02 Thread Richard Biener via Gcc-patches
On Thu, 1 Jun 2023, Jiufu Guo wrote: > Hi, > > Jiufu Guo via Gcc-patches writes: > > > Hi, > > > > Richard Biener writes: > > > >> On Wed, 17 May 2023, Jiufu Guo wrote: > >> > >>> Hi, > >>> > >>> This patch tries to optimize "(X - N * M) / N + M" to "X / N". > >> > >> But if that's valid why

Re: [PATCH V3] VECT: Change flow of decrement IV

2023-06-02 Thread Richard Biener via Gcc-patches
On Thu, 1 Jun 2023, juzhe.zh...@rivai.ai wrote: > This patch is no difference from V2. > Just add PR tree-optimization/109971 as Kewen's suggested. > > Already bootstrapped and Regression on X86 no difference. > > Ok for trunk ? OK. Richard. > > juzhe.zh...@rivai.ai > > From: juzhe.zhong >

Re: [PATCH] Don't try bswap + rotate when TYPE_PRECISION(n->type) > n->range.

2023-06-02 Thread Richard Biener via Gcc-patches
On Thu, Jun 1, 2023 at 9:51 AM liuhongt via Gcc-patches wrote: > > For the testcase in the PR, we have > > br64 = br; > br64 = ((br64 << 16) & 0x00ffull) | (br64 & 0xff00ull); > > n->n: 0x300200. > n->range: 32. > n->type: uint64. > > The original code assumes n->rang

Re: [PATCH] libstdc++: Correct NTTP and simd_mask ctor call

2023-06-02 Thread Matthias Kretz via Gcc-patches
Hello Alexandre, On Friday, 2 June 2023 10:32:40 CEST Alexandre Oliva wrote: > On May 26, 2023, Matthias Kretz via Libstdc++ wrote: > > OK for master and all backports (after 11.4 is done)? > > tested on powerpc64le-linux-gnu and x86_64-pc-linux-gnu > > > > * testsuite/experimental/simd/pr10

[patch] Fix PR101188 wrong code from postreload

2023-06-02 Thread Georg-Johann Lay
There is the following bug in postreload that can be traced back to v5 at least: In postreload.cc::reload_cse_move2add() there is a loop over all insns. If it encounters a SET, the next insn is analyzed if it is a single_set. After next has been analyzed, it continues with if (success)

Re: [PATCH 1/2] ipa-cp: Avoid long linear searches through DECL_ARGUMENTS

2023-06-02 Thread Richard Biener via Gcc-patches
On Wed, May 31, 2023 at 6:08 PM Martin Jambor wrote: > > Hello, > > On Wed, May 31 2023, Richard Biener wrote: > > On Tue, May 30, 2023 at 4:21 PM Jan Hubicka wrote: > >> > >> > On Mon, May 29, 2023 at 6:20 PM Martin Jambor wrote: > >> > > > >> > > Hi, > >> > > > >> > > there have been concerns

Re: [PATCH] libstdc++: Correct NTTP and simd_mask ctor call

2023-06-02 Thread Alexandre Oliva via Gcc-patches
Hello, Matthias, On May 26, 2023, Matthias Kretz via Libstdc++ wrote: > OK for master and all backports (after 11.4 is done)? > tested on powerpc64le-linux-gnu and x86_64-pc-linux-gnu > * testsuite/experimental/simd/pr109822_cast_functions.cc: New > test. This testcase fails to com

Re: [PATCH 2/2] btf: improve -dA comments for testsuite

2023-06-02 Thread Iain Sandoe
Hi David, > On 31 May 2023, at 07:13, Indu Bhagat via Gcc-patches > wrote: > > On 5/30/23 11:27, David Faust wrote: >> [Changes from v1: >> - Fix typos. >> - Split unrelated change into separate commit. >> - Improve asm comment for enum constants, update btf-enum-1 test. >> - Improve asm co

Re: [PATCH] i386: Add missing vector truncate patterns [PR92658].

2023-06-02 Thread Uros Bizjak via Gcc-patches
On Fri, Jun 2, 2023 at 2:49 AM liuhongt wrote: > > Add missing insn patterns for v2si -> v2hi/v2qi and v2hi-> v2qi vector > truncate. > > Bootstrapped and regtested on x86_64-pc-linux-gnu{-m32,}. > Ok for trunk? > > gcc/ChangeLog: > > PR target/92658 > * config/i386/mmx.md (truncv2

Re: [PATCH] doc: clarify semantics of vector bitwise shifts

2023-06-02 Thread Alexander Monakov via Gcc-patches
On Fri, 2 Jun 2023, Matthias Kretz wrote: > On Thursday, 1 June 2023 20:25:14 CEST Alexander Monakov wrote: > > On Wed, 31 May 2023, Richard Biener wrote: > > > So yes, we probably should clarify the semantics to match the > > > implementation (since we have two targets doing things differently

  1   2   >