Re: [x86 PATCH] PR target/107548: Handle vec_select in STV.

2022-12-22 Thread Uros Bizjak via Gcc-patches
On Fri, Dec 23, 2022 at 12:19 AM Roger Sayle wrote: > > > This patch enhances x86's STV pass to handle VEC_SELECT during general > scalar chain conversion, performing SImode scalar extraction from V4SI > and DImode scalar extraction from V2DI vector registers. > > The motivating test case from

Re: [PATCH V2] Disable sched1 in functions that call setjmp

2022-12-22 Thread Alexander Monakov via Gcc-patches
On Thu, 22 Dec 2022, Qing Zhao wrote: > > I think scheduling across calls in the pre-RA scheduler is simply an > > oversight, > > we do not look at dataflow information and with 50% chance risk extending > > lifetime of a pseudoregister across a call, causing higher register > > pressure at >

Re: [x86 PATCH] PR target/106933: Limit TImode STV to SSA-like def-use chains.

2022-12-22 Thread Uros Bizjak via Gcc-patches
On Fri, Dec 23, 2022 at 12:09 AM Roger Sayle wrote: > > > With many thanks to H.J. for doing all the hard work, this patch resolves > two P1 regressions; PR target/106933 and PR target/106959. > > Although superficially similar, the i386 backend's two scalar-to-vector > (STV) passes perform their

[PATCH 1/1] Fixed typo in RISCV

2022-12-22 Thread jinma via Gcc-patches
From 21904908689318ab81c630adc8cc7067e1a12488 Mon Sep 17 00:00:00 2001 From: Jin Ma Date: Fri, 23 Dec 2022 10:42:19 +0800 Subject: [PATCH 1/1] Fixed typo gcc/ChangeLog: * common/config/riscv/riscv-common.cc: --- gcc/common/config/riscv/riscv-common.cc | 2 +- 1 file changed, 1

Re: Re: [PATCH] RISC-V: Fix incorrect annotation

2022-12-22 Thread Kito Cheng via Gcc-patches
Committed, thanks :) Ju-Zhe has not figured out how to commit to his environment yet, I am helping him to set up. On Wed, Dec 21, 2022 at 7:38 AM Palmer Dabbelt wrote: > > On Tue, 20 Dec 2022 15:33:11 PST (-0800), juzhe.zh...@rivai.ai wrote: > > Thanks. I received an email from sourceware: > >

Re: [PATCH] RISC-V: Update vsetvl/vsetvlmax intrinsics to the latest api name.

2022-12-22 Thread Kito Cheng via Gcc-patches
Committed, thanks :) On Tue, Dec 20, 2022 at 11:57 PM Jeff Law via Gcc-patches wrote: > > > > On 12/20/22 07:58, juzhe.zh...@rivai.ai wrote: > > From: Ju-Zhe Zhong > > > > gcc/ChangeLog: > > > > * config/riscv/riscv-vector-builtins-shapes.cc (struct > > vsetvl_def): Add "__riscv_"

Re: [PATCH] RISC-V: Remove side effects of vsetvl/vsetvlmax intriniscs in properties

2022-12-22 Thread Kito Cheng via Gcc-patches
Committed, thanks :) On Wed, Dec 21, 2022 at 12:00 AM Jeff Law via Gcc-patches wrote: > > > > On 12/20/22 07:51, juzhe.zh...@rivai.ai wrote: > > From: Ju-Zhe Zhong > > > > gcc/ChangeLog: > > > > * config/riscv/riscv-vector-builtins-bases.cc: Remove side effects. > OK. > Jeff

Re: [PATCH] RISC-V: Support vle.v/vse.v intrinsics

2022-12-22 Thread Kito Cheng via Gcc-patches
Committed, thanks :) On Fri, Dec 23, 2022 at 8:57 AM 钟居哲 wrote: > > This patch is minimum intrinsics support for VSETVL PASS to support AVL model. > The corresponding unit-test for vle.v/vse.v should be added after I support > AVL model > and well tested VSETVL PASS patch. > > >

Re: [PATCH] RISC-V: Remove side effects of vsetvl pattern in RTL.

2022-12-22 Thread Kito Cheng via Gcc-patches
Committed, thanks :) On Tue, Dec 20, 2022 at 11:59 PM Jeff Law via Gcc-patches wrote: > > > > On 12/20/22 07:56, juzhe.zh...@rivai.ai wrote: > > From: Ju-Zhe Zhong > > > > gcc/ChangeLog: > > > > * config/riscv/riscv-vector-builtins-bases.cc: Change it to no > > side effects. > >

Re: [PATCH] RISC-V: Fix muti-line condition format

2022-12-22 Thread Kito Cheng via Gcc-patches
Committed, thanks :) On Tue, Dec 20, 2022 at 8:28 AM Jeff Law via Gcc-patches wrote: > > > > On 12/19/22 16:09, juzhe.zh...@rivai.ai wrote: > > From: Ju-Zhe Zhong > > > > gcc/ChangeLog: > > > > * config/riscv/riscv-vsetvl.cc (vlmax_avl_insn_p): Fix multi-line > > conditional. > >

Re: [PATCH] RISC-V: Fix vle constraints

2022-12-22 Thread Kito Cheng via Gcc-patches
Committed, thanks :) On Fri, Dec 23, 2022 at 11:33 AM wrote: > > From: Ju-Zhe Zhong > > gcc/ChangeLog: > > * config/riscv/vector.md: Fix contraints. > > gcc/testsuite/ChangeLog: > > * gcc.target/riscv/rvv/base/vle-constraint-1.c: New test. > > --- > gcc/config/riscv/vector.md

[PATCH] RISC-V: Fix vle constraints

2022-12-22 Thread juzhe . zhong
From: Ju-Zhe Zhong gcc/ChangeLog: * config/riscv/vector.md: Fix contraints. gcc/testsuite/ChangeLog: * gcc.target/riscv/rvv/base/vle-constraint-1.c: New test. --- gcc/config/riscv/vector.md| 16 +-- .../riscv/rvv/base/vle-constraint-1.c | 109

build broke, cris-elf: [committed] libstdc++: Implement C++20 time zone support in

2022-12-22 Thread Hans-Peter Nilsson via Gcc-patches
> From: Jonathan Wakely via Gcc-patches > Date: Fri, 23 Dec 2022 00:37:04 +0100 > This is the largest missing piece of C++20 support. Only the cxx11 ABI > is supported, due to the use of std::string in the API for time zones. > libstdc++-v3/ChangeLog: > > * acinclude.m4

Re: [PATCH] RISC-V: Support vle.v/vse.v intrinsics

2022-12-22 Thread 钟居哲
This patch is minimum intrinsics support for VSETVL PASS to support AVL model. The corresponding unit-test for vle.v/vse.v should be added after I support AVL model and well tested VSETVL PASS patch. juzhe.zh...@rivai.ai From: juzhe.zhong Date: 2022-12-23 08:52 To: gcc-patches CC:

[PATCH] RISC-V: Support vle.v/vse.v intrinsics

2022-12-22 Thread juzhe . zhong
From: Ju-Zhe Zhong gcc/ChangeLog: * config/riscv/riscv-protos.h (get_avl_type_rtx): New function. * config/riscv/riscv-v.cc (get_avl_type_rtx): Ditto. * config/riscv/riscv-vector-builtins-bases.cc (class loadstore): New class. (BASE): Ditto. *

[committed] libstdc++: Avoid recursion in __nothrow_wait_cv::wait [PR105730]

2022-12-22 Thread Jonathan Wakely via Gcc-patches
Tested x86_64-linux. Pushed to trunk. Backport to gcc-12 needed too. -- >8 -- The commit r12-5877-g9e18a25331fa25 removed the incorrect noexcept-specifier from std::condition_variable::wait and gave the new symbol version @@GLIBCXX_3.4.30. It also redefined the original symbol

[committed] libstdc++: Add std::format support to

2022-12-22 Thread Jonathan Wakely via Gcc-patches
Another big missing piece of C++20 support, but header-only this time so no new symbol exports. The last thing missing for C++20 is std::chrono::parse. Tested x86_64-linux, sparc-solaris2.11, powerpc-aix. Pushed to trunk. -- >8 -- This adds the operator<< overloads and std::formatter

[committed] libstdc++: Add helper function in

2022-12-22 Thread Jonathan Wakely via Gcc-patches
Tested x86_64-linux, sparc-solaris2.11, powerpc-aix. Pushed to trunk. -- >8 -- Add a new __format::__write_padded_as_spec helper to remove duplicated code in formatter specializations. libstdc++-v3/ChangeLog: * include/std/format (__format::__write_padded_as_spec): New

[pushed] testsuite: don't declare printf in coro.h

2022-12-22 Thread Jason Merrill via Gcc-patches
mingw stdio.h plays horrible games with extern "C++", but it also seems sloppy for coro.h to declare printf in testcases that will also include standard headers. gcc/testsuite/ChangeLog: * g++.dg/coroutines/coro.h: #include instead of declaring puts/printf. *

[committed] libstdc++: Implement C++20 time zone support in

2022-12-22 Thread Jonathan Wakely via Gcc-patches
This is the finished version of the last patch I posted before the end of stage 1. This is quite late for stage 1 (!) and adds new symbols to the shared library, but I'm pushing it now as it's an important piece of C++20 support. As noted in the commit message, the symbols being added are stable

[committed] libstdc++: Add GDB printers for types

2022-12-22 Thread Jonathan Wakely via Gcc-patches
These should really have tests for the new types, but I've been using them heavily for a few weeks and they work well. I would rather get them committed now and add tests later. Tested x86_64-linux. Pushed to trunk. -- >8 -- libstdc++-v3/ChangeLog: * python/libstdcxx/v6/printers.py

[x86 PATCH] PR target/107548: Handle vec_select in STV.

2022-12-22 Thread Roger Sayle
This patch enhances x86's STV pass to handle VEC_SELECT during general scalar chain conversion, performing SImode scalar extraction from V4SI and DImode scalar extraction from V2DI vector registers. The motivating test case from bugzilla is: typedef unsigned int v4si

[x86 PATCH] PR target/106933: Limit TImode STV to SSA-like def-use chains.

2022-12-22 Thread Roger Sayle
With many thanks to H.J. for doing all the hard work, this patch resolves two P1 regressions; PR target/106933 and PR target/106959. Although superficially similar, the i386 backend's two scalar-to-vector (STV) passes perform their transformations in importantly different ways. The original pass

Re: [PATCH 3/3] contrib: Add dg-out-generator.pl

2022-12-22 Thread Arsen Arsenović via Gcc-patches
Jason Merrill writes: > Aha, I wonder why the original tests have the terminal *? Testcases elsewhere > in the testsuite that check for (\n|\r\n|\r) don't use *. I think I'll drop > the * from both the tests and the script. > > Jason Yep, that sounds reasonable. I'm not sure why, the

Re: [PATCH] c++: get_nsdmi in template context [PR108116]

2022-12-22 Thread Patrick Palka via Gcc-patches
On Thu, 22 Dec 2022, Jason Merrill wrote: > On 12/22/22 16:41, Patrick Palka wrote: > > On Thu, 22 Dec 2022, Jason Merrill wrote: > > > > > On 12/22/22 11:31, Patrick Palka wrote: > > > > On Wed, 21 Dec 2022, Jason Merrill wrote: > > > > > > > > > On 12/21/22 09:52, Patrick Palka wrote: > > > >

Re: [PATCH] go: fix clang warnings

2022-12-22 Thread Ian Lance Taylor via Gcc-patches
On Wed, Dec 21, 2022 at 12:05 AM Martin Liška wrote: > > The patch fixes the following Clang warnings: > > gcc/go/gofrontend/escape.cc:1290:17: warning: private field 'fn_' is not used > [-Wunused-private-field] > gcc/go/gofrontend/escape.cc:3478:19: warning: private field 'context_' is not >

Re: [PATCH 3/3] contrib: Add dg-out-generator.pl

2022-12-22 Thread Jason Merrill via Gcc-patches
On 12/22/22 16:56, Arsen Arsenović wrote: Hi, Jason Merrill writes: +# Newlines should be more tolerant. +s/\n$/(\\n|\\r\\n|\\r)*/; Isn't specifically handling \\r\\n redundant with the * operator? To the extent of my knowledge, yes; I left that in since the original tests I was

Re: [PATCH] phiopt, v2: Adjust instead of reset phires range

2022-12-22 Thread Aldy Hernandez via Gcc-patches
LGTM On Thu, Dec 22, 2022, 22:44 Jakub Jelinek wrote: > On Thu, Dec 22, 2022 at 08:46:33PM +0100, Aldy Hernandez wrote: > > I haven't looked at your problem above, but have you tried using > > int_range_max (or even int_range<2>) instead of value_range above? > > > > value_range is deprecated

Re: [RFC/PATCH] Remove the workaround for _Float128 precision [PR107299]

2022-12-22 Thread Segher Boessenkool
On Thu, Dec 22, 2022 at 07:48:28PM +, Joseph Myers wrote: > On Thu, 22 Dec 2022, Segher Boessenkool wrote: > > On Wed, Dec 21, 2022 at 09:40:24PM +, Joseph Myers wrote: > > > On Wed, 21 Dec 2022, Segher Boessenkool wrote: > > > > Joseph: what do you think about this patch? Is the

Re: [PATCH] c++: get_nsdmi in template context [PR108116]

2022-12-22 Thread Jason Merrill via Gcc-patches
On 12/22/22 16:41, Patrick Palka wrote: On Thu, 22 Dec 2022, Jason Merrill wrote: On 12/22/22 11:31, Patrick Palka wrote: On Wed, 21 Dec 2022, Jason Merrill wrote: On 12/21/22 09:52, Patrick Palka wrote: Here during ahead of time checking of C{}, we indirectly call get_nsdmi for C::m from

Re: [PATCH 3/3] contrib: Add dg-out-generator.pl

2022-12-22 Thread Arsen Arsenović via Gcc-patches
Hi, Jason Merrill writes: >> +# Newlines should be more tolerant. >> +s/\n$/(\\n|\\r\\n|\\r)*/; > > Isn't specifically handling \\r\\n redundant with the * operator? To the extent of my knowledge, yes; I left that in since the original tests I was replacing with this script also used

Re: [PATCH 1/3] libstdc++: Improve output of default contract violation handler [PR107792]

2022-12-22 Thread Jonathan Wakely via Gcc-patches
On Thu, 22 Dec 2022 at 21:41, Jason Merrill via Libstdc++ wrote: > > On 12/22/22 06:03, Arsen Arsenović wrote: > > From: Jonathan Wakely > > > > Make the output more readable. Don't output anything unless verbose > > termination is enabled at configure-time. > > LGTM if Jonathan agrees. The

Re: [PATCH] Fortran: check for invalid uses of statement functions arguments [PR69604]

2022-12-22 Thread Steve Kargl via Gcc-patches
On Thu, Dec 22, 2022 at 10:13:04PM +0100, Harald Anlauf via Fortran wrote: > > the attached patch adds a check for statement function bodies for > invalid uses of dummy arguments. This fixes an ICE-on invalid. > > Regtested on x86_64-pc-linux-gnu. OK for mainline? > Yes. Thanks for the

Re: [PATCH] c, c++, cgraphunit: Prevent duplicated -Wunused-value warnings [PR108079]

2022-12-22 Thread Jason Merrill via Gcc-patches
On 12/22/22 05:32, Jakub Jelinek wrote: Hi! On the following testcase, we warn with -Wunused-value twice, once in the FEs and later on cgraphunit again with slightly different wording. The following patch fixes that by registering a warning suppression in the FEs when we warn and not warning

[PATCH] phiopt, v2: Adjust instead of reset phires range

2022-12-22 Thread Jakub Jelinek via Gcc-patches
On Thu, Dec 22, 2022 at 08:46:33PM +0100, Aldy Hernandez wrote: > I haven't looked at your problem above, but have you tried using > int_range_max (or even int_range<2>) instead of value_range above? > > value_range is deprecated and uses the legacy anti-range business, > which has a really hard

Re: [PATCH 3/3] contrib: Add dg-out-generator.pl

2022-12-22 Thread Jason Merrill via Gcc-patches
On 12/22/22 06:03, Arsen Arsenović wrote: This script is a helper used to generate dg-output lines from an existing program output conveniently. It takes care of escaping Tcl and ARE stuff. contrib/ChangeLog: * dg-out-generator.pl: New file. --- I updated this file to include the

Re: [PATCH] c++: get_nsdmi in template context [PR108116]

2022-12-22 Thread Patrick Palka via Gcc-patches
On Thu, 22 Dec 2022, Jason Merrill wrote: > On 12/22/22 11:31, Patrick Palka wrote: > > On Wed, 21 Dec 2022, Jason Merrill wrote: > > > > > On 12/21/22 09:52, Patrick Palka wrote: > > > > Here during ahead of time checking of C{}, we indirectly call get_nsdmi > > > > for C::m from

Re: [PATCH 1/3] libstdc++: Improve output of default contract violation handler [PR107792]

2022-12-22 Thread Jason Merrill via Gcc-patches
On 12/22/22 06:03, Arsen Arsenović wrote: From: Jonathan Wakely Make the output more readable. Don't output anything unless verbose termination is enabled at configure-time. LGTM if Jonathan agrees. The testsuite changes should be applied in the same commit. libstdc++-v3/ChangeLog:

Re: [PATCH] c++: get_nsdmi in template context [PR108116]

2022-12-22 Thread Jason Merrill via Gcc-patches
On 12/22/22 11:31, Patrick Palka wrote: On Wed, 21 Dec 2022, Jason Merrill wrote: On 12/21/22 09:52, Patrick Palka wrote: Here during ahead of time checking of C{}, we indirectly call get_nsdmi for C::m from finish_compound_literal, which in turn calls break_out_target_exprs for C::m's

Re: [PATCH] c++, driver: Fix -static-libstdc++ for targets without Bstatic/dynamic.

2022-12-22 Thread Iain Sandoe
> On 22 Dec 2022, at 21:15, Jason Merrill wrote: > > On 12/4/22 11:30, Iain Sandoe wrote: >> This fixes a long-standing problem on Darwin where we cannot independently >> set >> -static-libstdc++ because the flag gets stripped by the g++ driver. >> This patch is essentially the same as the

Re: [PATCH] c++, driver: Fix -static-libstdc++ for targets without Bstatic/dynamic.

2022-12-22 Thread Jason Merrill via Gcc-patches
On 12/4/22 11:30, Iain Sandoe wrote: This fixes a long-standing problem on Darwin where we cannot independently set -static-libstdc++ because the flag gets stripped by the g++ driver. This patch is essentially the same as the one used for the 'D' driver and has been in local use for some time.

[PATCH] Fortran: check for invalid uses of statement functions arguments [PR69604]

2022-12-22 Thread Harald Anlauf via Gcc-patches
Dear all, the attached patch adds a check for statement function bodies for invalid uses of dummy arguments. This fixes an ICE-on invalid. Regtested on x86_64-pc-linux-gnu. OK for mainline? Thanks, Harald From 794af0d00b7086c9f0493f3a1aaac644e1fd50f6 Mon Sep 17 00:00:00 2001 From: Harald

Re: [PATCH] c++: template friend with variadic constraints [PR108066]

2022-12-22 Thread Jason Merrill via Gcc-patches
On 12/22/22 12:34, Patrick Palka wrote: On Thu, 15 Dec 2022, Jason Merrill wrote: On 12/15/22 14:31, Patrick Palka wrote: On Thu, 15 Dec 2022, Patrick Palka wrote: On Thu, 15 Dec 2022, Jason Merrill wrote: On 12/12/22 12:20, Patrick Palka wrote: When instantiating a constrained hidden

[PATCH] regression tests for 103770 fixed on trunk

2022-12-22 Thread Martin Uecker via Gcc-patches
This adds regression tests for an ICE on valid code that seems gone on trunk, but the cause is still unclear. https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103770 regressions tests for PR103770 This adds tests from bugzilla for PR103770 and duplicates. testsuite/gcc.dg/ *

Re: [RFC/PATCH] Remove the workaround for _Float128 precision [PR107299]

2022-12-22 Thread Joseph Myers
On Thu, 22 Dec 2022, Segher Boessenkool wrote: > Hi! > > On Wed, Dec 21, 2022 at 09:40:24PM +, Joseph Myers wrote: > > On Wed, 21 Dec 2022, Segher Boessenkool wrote: > > > > --- a/gcc/tree.cc > > > > +++ b/gcc/tree.cc > > > > @@ -9442,15 +9442,6 @@ build_common_tree_nodes (bool signed_char)

Re: [PATCH] phiopt: Adjust instead of reset phires range

2022-12-22 Thread Aldy Hernandez via Gcc-patches
On Thu, Dec 22, 2022 at 1:54 PM Jakub Jelinek wrote: > > On Thu, Dec 22, 2022 at 01:09:21PM +0100, Aldy Hernandez wrote: > > INTEGER_CST singleton and > > > union that into the SSA_NAMEs range and then do set_range_info > > > with the altered range I guess. > > > > > > > Note that set_range_info

Re: [PATCH V2] Disable sched1 in functions that call setjmp

2022-12-22 Thread Qing Zhao via Gcc-patches
> On Dec 22, 2022, at 12:56 PM, Alexander Monakov wrote: > > > On Thu, 22 Dec 2022, Jose E. Marchesi via Gcc-patches wrote: > >> The first instruction scheduler pass reorders instructions in the TRY >> block in a way `b=true' gets executed before the call to the function >> `f'. This

[Ping^1] [PATCH] c++, driver: Fix -static-libstdc++ for targets without Bstatic/dynamic.

2022-12-22 Thread Iain Sandoe
Hi this has become more important since it seems I can no longer link a working gnat1 without it, thanks Iain > On 4 Dec 2022, at 16:30, Iain Sandoe via Gcc-patches > wrote: > > This fixes a long-standing problem on Darwin where we cannot independently set > -static-libstdc++ because the flag

Re: [PATCH] rs6000: Fix some issues related to Power10 fusion [PR104024]

2022-12-22 Thread Segher Boessenkool
On Wed, Dec 21, 2022 at 11:41:58AM +0800, Kewen.Lin wrote: > on 2022/12/20 21:19, Segher Boessenkool wrote: > > Sure, I understand that. What I don't like is the generator program is > > much too big and unstructured already, and this doesn't help at all; it > > makes it quite a bit worse even.

Re: [PATCH] loading float member of parameter stored via int registers

2022-12-22 Thread Segher Boessenkool
On Thu, Dec 22, 2022 at 11:28:01AM +, Richard Biener wrote: > On Thu, 22 Dec 2022, Jiufu Guo wrote: > > To reduce risk, I'm just draft straightforward patches for > > special cases currently, Like: > > https://gcc.gnu.org/pipermail/gcc-patches/2022-December/608081.html > > and this patch. > >

Re: [RFC/PATCH] Remove the workaround for _Float128 precision [PR107299]

2022-12-22 Thread Segher Boessenkool
Hi! On Wed, Dec 21, 2022 at 09:40:24PM +, Joseph Myers wrote: > On Wed, 21 Dec 2022, Segher Boessenkool wrote: > > > --- a/gcc/tree.cc > > > +++ b/gcc/tree.cc > > > @@ -9442,15 +9442,6 @@ build_common_tree_nodes (bool signed_char) > > >if (!targetm.floatn_mode (n, extended).exists ())

Re: [PATCH V2] Disable sched1 in functions that call setjmp

2022-12-22 Thread Alexander Monakov via Gcc-patches
On Thu, 22 Dec 2022, Jose E. Marchesi via Gcc-patches wrote: > The first instruction scheduler pass reorders instructions in the TRY > block in a way `b=true' gets executed before the call to the function > `f'. This optimization is wrong, because `main' calls setjmp and `f' > is known to call

[C PATCH] (for STAGE 1) UBSan instrumentation for assignment of VM types

2022-12-22 Thread Martin Uecker via Gcc-patches
Here is a first patch to add UBSan instrumentation to assignment, return, initialization of pointers to variably modified types. This is based on the other patch I just sent. Separating these should make reviewing easier. Here, I did not add tests for function arguments as this is more

[PATCH 9/8] middle-end: Allow build_popcount_expr to use an IFN

2022-12-22 Thread Andrew Carlotti via Gcc-patches
Bootstrapped and regression tested on aarch64-unknown-linux-gnu and x86_64-pc-linux-gnu - ok to merge? gcc/ChangeLog: * tree-ssa-loop-niter.cc (build_popcount_expr): Add IFN support. gcc/testsuite/ChangeLog: * g++.dg/tree-ssa/pr86544.C: Add .POPCOUNT to tree scan regex.

[PATCH 6/8 v2] docs: Add popcount, clz and ctz target attributes

2022-12-22 Thread Andrew Carlotti via Gcc-patches
Updated to reflect Sphinx revert; I'll commit this once the cltz_complement patch is merged. gcc/ChangeLog: * doc/sourcebuild.texi: Add missing target attributes. --- diff --git a/gcc/doc/sourcebuild.texi b/gcc/doc/sourcebuild.texi index

[PATCH 5/8 v2] middle-end: Add cltz_complement idiom recognition

2022-12-22 Thread Andrew Carlotti via Gcc-patches
On Thu, Nov 24, 2022 at 11:41:31AM +0100, Richard Biener wrote: > Note we do have CTZ and CLZ > optabs and internal functions - in case there's a HImode CLZ this > could be elided. More general you can avoid using the __builtin_ > functions with their fixed types in favor of using IFN_C[TL]Z

[C PATCH] (for STAGE 1) Reorganize comptypes and related functions

2022-12-22 Thread Martin Uecker via Gcc-patches
Because I want to add another argument to comptypes and co. for UBSan instrumentation and this then starts to become a bit unwiedly, here is a patch to reorganize and simplify this a bit. This can wait until stage 1. (The cache can be simplified further by allocating it on the stack, but this

RE: [PATCH][X86_64] Separate znver4 insn reservations from older znvers

2022-12-22 Thread Joshi, Tejas Sanjay via Gcc-patches
[Public] Hello, I have addressed all your comments in this revision of the patch, please find attached and inlined. * I have updated all the latencies with Agner's measurements. * Incorrect pipelines, loads/stores are addressed. * The double pumped avx512 insns take one cycle for 256 half and

Re: [PATCH] c++: template friend with variadic constraints [PR108066]

2022-12-22 Thread Patrick Palka via Gcc-patches
On Thu, 15 Dec 2022, Jason Merrill wrote: > On 12/15/22 14:31, Patrick Palka wrote: > > On Thu, 15 Dec 2022, Patrick Palka wrote: > > > > > On Thu, 15 Dec 2022, Jason Merrill wrote: > > > > > > > On 12/12/22 12:20, Patrick Palka wrote: > > > > > When instantiating a constrained hidden template

[PATCH V2] Disable sched1 in functions that call setjmp

2022-12-22 Thread Jose E. Marchesi via Gcc-patches
When the following testcase is built with -fschedule-insns in either x86_64 or aarch64: #include #include #include jmp_buf ex_buf__; #define TRY do{ if( !setjmp(ex_buf__) ){ #define CATCH } else { #define ETRY } }while(0) #define THROW longjmp(ex_buf__, 1) int f(int x)

[PING] Re: [PATCH 2/2] Corrected pr25521.c target matching.

2022-12-22 Thread Cupertino Miranda via Gcc-patches
Cupertino Miranda via Gcc-patches writes: > gentle ping > > Cupertino Miranda writes: > >>> On 12/2/22 10:52, Cupertino Miranda via Gcc-patches wrote: This commit is a follow up of bugzilla #107181. The commit /a0aafbc/ changed the default implementation of the SELECT_SECTION

[PING] Re: [PATCH 1/2] select .rodata for const volatile variables.

2022-12-22 Thread Cupertino Miranda via Gcc-patches
Cupertino Miranda via Gcc-patches writes: > gentle ping > > Cupertino Miranda writes: > >> Hi Jeff, >> >> First of all thanks for your quick review. >> Apologies for the delay replying, the message got lost in my inbox. >> >>> On 12/2/22 10:52, Cupertino Miranda via Gcc-patches wrote:

Re: [committed] docs: Fix peephole paragraph ordering

2022-12-22 Thread Andrew Carlotti via Gcc-patches
Patches attached to the wrong email - this patch was actually: On Thu, Dec 22, 2022 at 05:06:13PM +, Andrew Carlotti via Gcc-patches wrote: > The documentation for the DONE and FAIL macros was incorrectly inserted > between example code, and a remark attached to that example. > > Committed

Re: [committed] docs: Link to correct section for constraint modifiers

2022-12-22 Thread Andrew Carlotti via Gcc-patches
Patches attached in to the wrong emails - this patch was actually: On Thu, Dec 22, 2022 at 05:05:51PM +, Andrew Carlotti via Gcc-patches wrote: > Committed as obvious. > > gcc/ChangeLog: > > * doc/md.texi: Fix incorrect pxref. > > --- diff --git a/gcc/doc/md.texi b/gcc/doc/md.texi

[PATCH 12/15 V5] arm: implement bti injection

2022-12-22 Thread Andrea Corallo via Gcc-patches
Richard Earnshaw writes: > On 14/12/2022 17:00, Richard Earnshaw via Gcc-patches wrote: >> On 14/12/2022 16:40, Andrea Corallo via Gcc-patches wrote: >>> Hi Richard, >>> >>> thanks for reviewing. >>> >>> Richard Earnshaw writes: >>> On 28/10/2022 17:40, Andrea Corallo via Gcc-patches

[PATCH] Disable sched1 in functions that call setjmp

2022-12-22 Thread Jose E. Marchesi via Gcc-patches
When the following testcase is built with -fschedule-insns in either x86_64 or aarch64: jmp_buf ex_buf__; int f(int x) { int arr[] = {1,2,6,8,9,10}; int lo=0; int hi=5; while(lo<=hi) { int mid=(lo+hi)/2; if(arr[mid]==x) { THROW; } else

[committed] docs: Fix peephole paragraph ordering

2022-12-22 Thread Andrew Carlotti via Gcc-patches
The documentation for the DONE and FAIL macros was incorrectly inserted between example code, and a remark attached to that example. Committed as obvious. gcc/ChangeLog: * doc/md.texi: Move example code remark next to it's code block. --- diff --git a/gcc/doc/md.texi b/gcc/doc/md.texi

[committed] docs: Fix inconsistent example predicate name

2022-12-22 Thread Andrew Carlotti via Gcc-patches
It is unclear why the example C function was renamed to `commutative_integer_operator` as part of ec8e098d in 2004, while the text and the example md were both left as `commutative_operator`. The latter name appears to be more accurate, so revert the 2004 change. Committed as obvious.

[committed] docs: Link to correct section for constraint modifiers

2022-12-22 Thread Andrew Carlotti via Gcc-patches
Committed as obvious. gcc/ChangeLog: * doc/md.texi: Fix incorrect pxref. --- diff --git a/gcc/doc/md.texi b/gcc/doc/md.texi index cc28f868fc85b5148450548a54d69a39ecc4f03a..c1d3ae2060d800bbaa9751fcf841d7417af1e37d 100644 --- a/gcc/doc/md.texi +++ b/gcc/doc/md.texi @@ -9321,6 +9321,11

[PATCH 1/15 V2] arm: Make mbranch-protection opts parsing common to AArch32/64

2022-12-22 Thread Andrea Corallo via Gcc-patches
Hi all, respinning this as a rebase was necessary, also now is setting 'aarch_enable_bti' to zero as default for arm as suggested during the review of 12/15. Best Regards Andrea >From 6c765818542cc7b40701e8adae2cbe077d5982cc Mon Sep 17 00:00:00 2001 From: Andrea Corallo Date: Mon, 6 Dec

Re: gcc-13/changes.html: Mention -fstrict-flex-arrays and its impact

2022-12-22 Thread Qing Zhao via Gcc-patches
> On Dec 22, 2022, at 2:09 AM, Richard Biener wrote: > > On Wed, 21 Dec 2022, Qing Zhao wrote: > >> Hi, Richard, >> >> Thanks a lot for your comments. >> >>> On Dec 21, 2022, at 2:12 AM, Richard Biener wrote: >>> >>> On Tue, 20 Dec 2022, Qing Zhao wrote: >>> Hi, This is

Re: [PATCH] c++: get_nsdmi in template context [PR108116]

2022-12-22 Thread Patrick Palka via Gcc-patches
On Wed, 21 Dec 2022, Jason Merrill wrote: > On 12/21/22 09:52, Patrick Palka wrote: > > Here during ahead of time checking of C{}, we indirectly call get_nsdmi > > for C::m from finish_compound_literal, which in turn calls > > break_out_target_exprs for C::m's (non-templated) initializer, during

Re: [PATCH] bootstrap/106482 - document minimal GCC version

2022-12-22 Thread Jakub Jelinek via Gcc-patches
On Thu, Dec 22, 2022 at 03:54:03PM +0100, Richard Biener wrote: > There's no explicit mention of what GCC compiler supports C++11 > and the cross compiler build requirement mentions GCC 4.8 but not > GCC 4.8.3 which is the earliest known version to not run into > C++11 implementation bugs. The

[PATCH] bootstrap/106482 - document minimal GCC version

2022-12-22 Thread Richard Biener via Gcc-patches
There's no explicit mention of what GCC compiler supports C++11 and the cross compiler build requirement mentions GCC 4.8 but not GCC 4.8.3 which is the earliest known version to not run into C++11 implementation bugs. The following adds explicit wording. OK for trunk? Thanks, Richard.

[PATCH] testsuite/107809 - fix vect-recurr testcases

2022-12-22 Thread Richard Biener via Gcc-patches
This adds a missing effective target check for the permute recurrence vectorization requires. Tested on x86_64-unknown-linux-gnu, pushed. PR testsuite/107809 * gcc.dg/vect/vect-recurr-1.c: Require vect_perm. * gcc.dg/vect/vect-recurr-2.c: Likewise. *

[PATCH] phiopt: Adjust instead of reset phires range

2022-12-22 Thread Jakub Jelinek via Gcc-patches
On Thu, Dec 22, 2022 at 01:09:21PM +0100, Aldy Hernandez wrote: > INTEGER_CST singleton and > > union that into the SSA_NAMEs range and then do set_range_info > > with the altered range I guess. > > > > Note that set_range_info is an intersect operation. It should really be > called

Re: Adding a new thread model to GCC

2022-12-22 Thread i.nixman--- via Gcc-patches
On 2022-12-22 12:21, Jonathan Yong wrote: hello, On 12/16/22 19:20, Eric Botcazou wrote: The libgcc parts look reasonable to me, but I can't approve them. Maybe Jonathan Yong can approve those parts as mingw-w64 target maintainer, or maybe a libgcc approver can do so. OK. The libstdc++

Re: Adding a new thread model to GCC

2022-12-22 Thread Jonathan Yong via Gcc-patches
On 12/16/22 19:20, Eric Botcazou wrote: The libgcc parts look reasonable to me, but I can't approve them. Maybe Jonathan Yong can approve those parts as mingw-w64 target maintainer, or maybe a libgcc approver can do so. OK. The libstdc++ parts are OK for trunk. IIUC they could go in

Re: [PATCH] ipa: silent -Wodr notes with -w

2022-12-22 Thread Martin Liška
PING^2 On 12/9/22 09:27, Martin Liška wrote: > PING^1 > > On 12/2/22 12:27, Martin Liška wrote: >> If -w is used, warn_odr properly sets *warned = false and >> so it should be preserved when calling warn_types_mismatch. >> >> Noticed that during a LTO reduction where I used -w. >> >> Patch can

Re: [PATCH] phiopt: Drop SSA_NAME_RANGE_INFO in maybe equal case [PR108166]

2022-12-22 Thread Aldy Hernandez via Gcc-patches
On Thu, Dec 22, 2022, 12:33 Richard Biener wrote: > On Thu, 22 Dec 2022, Jakub Jelinek wrote: > > > Hi! > > > > The following place in value_replacement is after proving that > > x == cst1 ? cst2 : x > > phi result is only used in a comparison with constant which doesn't > > care if it compares

Re: [PATCH] phiopt: Drop SSA_NAME_RANGE_INFO in maybe equal case [PR108166]

2022-12-22 Thread Richard Biener via Gcc-patches
On Thu, 22 Dec 2022, Jakub Jelinek wrote: > Hi! > > The following place in value_replacement is after proving that > x == cst1 ? cst2 : x > phi result is only used in a comparison with constant which doesn't > care if it compares cst1 or cst2 and replaces it with x. > The testcase is miscompiled

Re: [PATCH] cse: Fix up CSE const_anchor handling [PR108193]

2022-12-22 Thread Richard Biener via Gcc-patches
On Thu, 22 Dec 2022, Jakub Jelinek wrote: > Hi! > > The following testcase ICEs on aarch64, because insert_const_anchor > inserts invalid CONST_INT into the CSE tables - 0x8000 for SImode. > The second hunk of the patch fixes that, the first one is to avoid > triggering undefined behavior at

Re: [PATCH] loading float member of parameter stored via int registers

2022-12-22 Thread Richard Biener via Gcc-patches
On Thu, 22 Dec 2022, Jiufu Guo wrote: > > Hi, > > Richard Biener writes: > > > On Thu, 22 Dec 2022, guojiufu wrote: > > > >> Hi, > >> > >> On 2022-12-21 15:30, Richard Biener wrote: > >> > On Wed, 21 Dec 2022, Jiufu Guo wrote: > >> > > >> >> Hi, > >> >> > >> >> This patch is fixing an

[PATCH] tree-optimization/107451 - SLP load vectorization issue

2022-12-22 Thread Richard Biener via Gcc-patches
When vectorizing SLP loads with permutations we can access excess elements when the load vector type is bigger than the group size and the vectorization factor covers less groups than necessary to fill it. Since we know the code will only access up to group_size * VF elements in the unpermuted

Re: [PATCH] phiopt: Drop SSA_NAME_RANGE_INFO in maybe equal case [PR108166]

2022-12-22 Thread Aldy Hernandez via Gcc-patches
On Thu, Dec 22, 2022 at 11:30 AM Jakub Jelinek wrote: > > Hi! > > The following place in value_replacement is after proving that > x == cst1 ? cst2 : x > phi result is only used in a comparison with constant which doesn't > care if it compares cst1 or cst2 and replaces it with x. > The testcase

[PATCH 3/3] contrib: Add dg-out-generator.pl

2022-12-22 Thread Arsen Arsenović via Gcc-patches
This script is a helper used to generate dg-output lines from an existing program output conveniently. It takes care of escaping Tcl and ARE stuff. contrib/ChangeLog: * dg-out-generator.pl: New file. --- I updated this file to include the proper copyright header, after dkm notified me

[PATCH 2/3] contracts: Update testsuite against new default viol. handler format

2022-12-22 Thread Arsen Arsenović via Gcc-patches
This change was almost entirely mechanical. Save for two files which had very short matches, these changes were produced by two seds and a Perl script, for the more involved cases. The latter will be added in a subsequent commit. The former are as follows: sed -E -i "/dg-output/s/default

[PATCH 1/3] libstdc++: Improve output of default contract violation handler [PR107792]

2022-12-22 Thread Arsen Arsenović via Gcc-patches
From: Jonathan Wakely Make the output more readable. Don't output anything unless verbose termination is enabled at configure-time. libstdc++-v3/ChangeLog: PR libstdc++/107792 PR libstdc++/107778 * src/experimental/contract.cc (handle_contract_violation): Make

Re: [PATCH] Backport gcc-12: jobserver FIFO support

2022-12-22 Thread Martin Liška
On 12/12/22 13:05, Martin Liška wrote: > On 12/12/22 12:42, Jakub Jelinek wrote: >> On Mon, Dec 12, 2022 at 12:39:36PM +0100, Martin Liška wrote: I'm fine with backporting the whole series to GCC 12 but I wonder if earlier still maintained versions are also affected (noting that the

[PATCH] c, c++, cgraphunit: Prevent duplicated -Wunused-value warnings [PR108079]

2022-12-22 Thread Jakub Jelinek via Gcc-patches
Hi! On the following testcase, we warn with -Wunused-value twice, once in the FEs and later on cgraphunit again with slightly different wording. The following patch fixes that by registering a warning suppression in the FEs when we warn and not warning in cgraphunit anymore if that happened.

[PATCH] phiopt: Drop SSA_NAME_RANGE_INFO in maybe equal case [PR108166]

2022-12-22 Thread Jakub Jelinek via Gcc-patches
Hi! The following place in value_replacement is after proving that x == cst1 ? cst2 : x phi result is only used in a comparison with constant which doesn't care if it compares cst1 or cst2 and replaces it with x. The testcase is miscompiled because we have after the replacement incorrect range

[PATCH] cse: Fix up CSE const_anchor handling [PR108193]

2022-12-22 Thread Jakub Jelinek via Gcc-patches
Hi! The following testcase ICEs on aarch64, because insert_const_anchor inserts invalid CONST_INT into the CSE tables - 0x8000 for SImode. The second hunk of the patch fixes that, the first one is to avoid triggering undefined behavior at compile time during compute_const_anchors computations

[committed] libstdc++: Define and use variable templates in

2022-12-22 Thread Jonathan Wakely via Gcc-patches
Tested x86_64-linux. Pushed to trunk. -- >8 -- Thi defines a variable template for the internal __is_duration helper trait, defines a new __is_time_point_v variable template (to be used in a subsequent commit), and adds explicit specializations of the standard chrono::treat_as_floating_point

[committed] libstdc++: Add [[nodiscard]] in

2022-12-22 Thread Jonathan Wakely via Gcc-patches
Tested x86_64-linux. Pushed to trunk. -- >8 -- libstdc++-v3/ChangeLog: * include/std/chrono: Use nodiscard attribute. --- libstdc++-v3/include/std/chrono | 46 + 1 file changed, 29 insertions(+), 17 deletions(-) diff --git

Re: [PATCH] loading float member of parameter stored via int registers

2022-12-22 Thread Jiufu Guo via Gcc-patches
Hi, Richard Biener writes: > On Thu, 22 Dec 2022, guojiufu wrote: > >> Hi, >> >> On 2022-12-21 15:30, Richard Biener wrote: >> > On Wed, 21 Dec 2022, Jiufu Guo wrote: >> > >> >> Hi, >> >> >> >> This patch is fixing an issue about parameter accessing if the >> >> parameter is struct type

[PATCH] Compare DECL_NOT_FLEXARRAY for LTO tree merging

2022-12-22 Thread Richard Biener via Gcc-patches
This was missing. Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed. gcc/lto/ * lto-common.cc (compare_tree_sccs_1): Compare DECL_NOT_FLEXARRAY. --- gcc/lto/lto-common.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/gcc/lto/lto-common.cc b/gcc/lto/lto-common.cc index

Re: [PATCH V2 2/2] [x86] x86: Add a new option -mdaz-ftz to enable FTZ and DAZ flags in MXCSR.

2022-12-22 Thread Uros Bizjak via Gcc-patches
On Thu, Dec 22, 2022 at 5:40 AM Hongtao Liu wrote: > > On Thu, Dec 22, 2022 at 6:46 AM Jakub Jelinek wrote: > > > > On Wed, Dec 21, 2022 at 02:43:43PM -0800, H.J. Lu wrote: > > > > > > > > > Target RejectNegative > > > > > > > > > Set 80387 floating-point precision to 80-bit. > > > > > > > > >