Re: [PATCH] tree-ssa-math-opts: popcount (X) == 1 to (X ^ (X - 1)) > (X - 1) optimization for direct optab [PR90693]

2023-11-20 Thread Richard Biener
On Sat, 18 Nov 2023, Jakub Jelinek wrote: > Hi! > > On Fri, Nov 17, 2023 at 03:01:04PM +0100, Jakub Jelinek wrote: > > As a follow-up, I'm considering changing in this routine the popcount > > call to IFN_POPCOUNT with 2 arguments and during expansion test costs. > > Here is the follow-up which

Re: [PATCH] middle-end, v2: Add new value for vector types for __builtin_classify_type

2023-11-20 Thread Richard Biener
On Fri, 17 Nov 2023, Jakub Jelinek wrote: > On Thu, Nov 16, 2023 at 11:49:03PM +, Joseph Myers wrote: > > > > While filing a clang request to return 18 on _BitInts for > > > > __builtin_classify_type instead of -1 they return currently, I've > > > > noticed that we return -1 for vector types.

Re: [PATCH] vect: Use statement vectype for conditional mask.

2023-11-20 Thread Richard Biener
On Fri, Nov 17, 2023 at 8:20 PM Robin Dapp wrote: > > > No, you shouldn't place _7 != 0 inside the .COND_ADD but instead > > have an extra pattern stmt producing that so > > > > patt_8 = _7 != 0; > > patt_9 = .COND_ADD (patt_8, ...); > > > > that's probably still not enough, but I always quickly f

Re: [PATCH] c-family, middle-end: Add __builtin_c[lt]zg (arg, 0ULL) exception

2023-11-20 Thread Jakub Jelinek
On Mon, Nov 20, 2023 at 07:44:18AM +, Richard Biener wrote: > > In https://sourceware.org/pipermail/libc-alpha/2023-November/152819.html > > Florian Weimer raised concern that the type-generic stdbit.h macros > > currently being considered suffer from similar problem as old tgmath.h > > impleme

GCC 14.0.0 Status Report (2023-11-20), Stage 3 in effect now

2023-11-20 Thread Richard Biener
Status == The GCC development branch which will become GCC 14 is in general bugfixing mode (Stage 3) now. There is still time to get larger changes in that were posted before the end of Stage 1 but this is more aimed at fixing important bugs that are not regressions and maybe flesh out detail

Re: [PATCH] c-family, middle-end: Add __builtin_c[lt]zg (arg, 0ULL) exception

2023-11-20 Thread Florian Weimer
* Richard Biener: > Ugh. First of all I don't like that the exception is applied during > folding. As for the problem of multi evaluation can't consumers use > stmt expressions for this, say > > {( auto __tem = value; __builtin_xyz (__tem, __typeof (__tem)); ... )} > > ? Thus use 'auto' to avoi

Re: [PATCH] c-family, middle-end: Add __builtin_c[lt]zg (arg, 0ULL) exception

2023-11-20 Thread Jakub Jelinek
On Mon, Nov 20, 2023 at 07:49:40AM +, Richard Biener wrote: > Of course the other obvious alternative would be to parse > stdc_leading_zeros and friends directly, and not go through macros > and builtins. The stdc_* names are not keywords and without including stdbit.h I'm not sure it is ok to

Re: [PATCH] LoongArch: Optimize the loading of immediate numbers with the same high and low 32-bit values

2023-11-20 Thread Guo Jie
Thanks for your advice! I will fix it in patch v2. 在 2023/11/18 下午5:09, Xi Ruoyao 写道: On Sat, 2023-11-18 at 14:59 +0800, Guo Jie wrote: For the following immediate load operation in gcc/testsuite/gcc.target/loongarch/imm-load1.c: long long r = 0x0101010101010101; Before this patch:

Re: [PATCH] c-family, middle-end: Add __builtin_c[lt]zg (arg, 0ULL) exception

2023-11-20 Thread Jakub Jelinek
On Mon, Nov 20, 2023 at 09:18:57AM +0100, Florian Weimer wrote: > * Richard Biener: > > > Ugh. First of all I don't like that the exception is applied during > > folding. As for the problem of multi evaluation can't consumers use > > stmt expressions for this, say > > > > {( auto __tem = value;

[PING][PATCH] c++: Introduce the extended attribute for asm declarations

2023-11-20 Thread Julian Waters
Hi all, I'd like to ping the following patch https://gcc.gnu.org/pipermail/gcc-patches/2023-November/636924.html best regards, Julian

Re: [PATCH] tree-ssa-math-opts: popcount (X) == 1 to (X ^ (X - 1)) > (X - 1) optimization [PR90693]

2023-11-20 Thread Jakub Jelinek
On Mon, Nov 20, 2023 at 07:54:54AM +, Richard Biener wrote: > On Fri, 17 Nov 2023, Jakub Jelinek wrote: > > Per the earlier discussions on this PR, the following patch folds > > popcount (x) == 1 (and != 1) into (x ^ (x - 1)) > x - 1 (or <=) > > if the corresponding popcount optab isn't impleme

Re: [PATCH] c-family, middle-end: Add __builtin_c[lt]zg (arg, 0ULL) exception

2023-11-20 Thread Richard Biener
On Mon, 20 Nov 2023, Jakub Jelinek wrote: > On Mon, Nov 20, 2023 at 09:18:57AM +0100, Florian Weimer wrote: > > * Richard Biener: > > > > > Ugh. First of all I don't like that the exception is applied during > > > folding. As for the problem of multi evaluation can't consumers use > > > stmt ex

Re: [PATCH] tree-ssa-math-opts: popcount (X) == 1 to (X ^ (X - 1)) > (X - 1) optimization [PR90693]

2023-11-20 Thread Richard Biener
On Mon, 20 Nov 2023, Jakub Jelinek wrote: > On Mon, Nov 20, 2023 at 07:54:54AM +, Richard Biener wrote: > > On Fri, 17 Nov 2023, Jakub Jelinek wrote: > > > Per the earlier discussions on this PR, the following patch folds > > > popcount (x) == 1 (and != 1) into (x ^ (x - 1)) > x - 1 (or <=) >

gcc-patches@gcc.gnu.org

2023-11-20 Thread Alexandre Oliva
On Nov 20, 2023, Jeff Law wrote: > On 11/19/23 19:33, Alexandre Oliva wrote: >> (check_effective_target_arm_arch_v6t2_hw_ok): Likewise. Richard Earnshaw had already fixed this bit, so I installed only the remaining hunk: testsuite: arm: fix arm_movt cut&pasto I got spurious fails of tests tha

Re: [PATCH] tree-ssa-math-opts: popcount (X) == 1 to (X ^ (X - 1)) > (X - 1) optimization [PR90693]

2023-11-20 Thread Jakub Jelinek
On Mon, Nov 20, 2023 at 08:39:42AM +, Richard Biener wrote: > I think it's fine as you posted (and Jeff approved), I'm just wondering > if we should rename that pass somehow ;) Note ISEL is more for > required pre-expansion stuff and widen-mul is for expansion related but > optimization parts.

Re: [pushed] wwwdocs: *: Remove unused buildstat pages

2023-11-20 Thread Thomas Schwinge
Hi! On 2023-10-15T23:42:39+0200, Gerald Pfeifer wrote: > [ Release managers, heads-up for when you branch future releases! ] > For GCC 9 to GCC 13 the per-release series buildstat pages have not > been populated at all, so remove them and reference from the respective > main release pages. ACK;

Re: [PATCH v2 3/5] ada: Improve attribute exclusion handling

2023-11-20 Thread Marc Poulhiès
Andrew Carlotti writes: > On Fri, Nov 17, 2023 at 11:45:16AM +0100, Marc Poulhi�s wrote: >> >> Hello, >> >> > I haven't manged to test the Ada frontend, but this patch (and the >> > following >> >> I don't have an aarch64 setup to test, but I may be able to help with the >> issue preventing

回复: Re: [PATCH] DOC/IFN/OPTAB: Add mask_len_strided_load/mask_len_strided_store DOC/OPTAB/IFN

2023-11-20 Thread juzhe.zh...@rivai.ai
Hi, Richi. strided load/store has been posted for a while. Can this feature be available on GCC-14 ? Or postpone it to GCC-15 ? Thanks. juzhe.zh...@rivai.ai 发件人: juzhe.zh...@rivai.ai 发送时间: 2023-11-16 15:21 收件人: 钟居哲; gcc-patches 抄送: richard.sandiford; rguenther 主题: Re: [PATCH] DOC/IFN/OPTAB:

Re: [PATCH] c-family, middle-end: Add __builtin_c[lt]zg (arg, 0ULL) exception

2023-11-20 Thread Jakub Jelinek
On Mon, Nov 20, 2023 at 08:37:55AM +, Richard Biener wrote: > > I'm not sure about that, it would be nice for them to be usable there, > > Btw, I think that {( .. )} should be made usable in sizeof () and > possibly even in at least C++ constant expressions (not sure about C). I believe the p

Re: [PATCH 0/4] Add vector pair support to PowerPC attribute((vector_size(32)))

2023-11-20 Thread Michael Meissner
On Mon, Nov 20, 2023 at 08:24:35AM +0100, Richard Biener wrote: > I wouldn't expose the "fake" larger modes to the vectorizer but rather > adjust m_suggested_unroll_factor (which you already do to some extent). Thanks. I figure I first need to fix the shuffle byes issue first and get a clean test

Re: [PATCH] c-family, middle-end: Add __builtin_c[lt]zg (arg, 0ULL) exception

2023-11-20 Thread Richard Biener
On Mon, 20 Nov 2023, Jakub Jelinek wrote: > On Mon, Nov 20, 2023 at 08:37:55AM +, Richard Biener wrote: > > > I'm not sure about that, it would be nice for them to be usable there, > > > > Btw, I think that {( .. )} should be made usable in sizeof () and > > possibly even in at least C++ cons

GCC developer room at FOSDEM 2024: Call for Participation open

2023-11-20 Thread Thomas Schwinge
Hi! On 2023-11-10T18:20:55-0500, David Malcolm wrote: > We're excited to announce that GCC will have a developer room at the > upcoming FOSDEM 2024, in Brussels, Belgium: Now also announcing the devroom/CfP on , "News"; pushed commit 1825b255beb7d7edca775c401222ad2cb41ea193

Re: [PATCH 0/4] Add vector pair support to PowerPC attribute((vector_size(32)))

2023-11-20 Thread Richard Biener
On Mon, Nov 20, 2023 at 9:56 AM Michael Meissner wrote: > > On Mon, Nov 20, 2023 at 08:24:35AM +0100, Richard Biener wrote: > > I wouldn't expose the "fake" larger modes to the vectorizer but rather > > adjust m_suggested_unroll_factor (which you already do to some extent). > > Thanks. I figure I

[PATCH] c++: Check module attachment instead of purview when necessary [PR112631]

2023-11-20 Thread Nathaniel Shead
Bootstrapped and regtested on x86_64-pc-linux-gnu. I don't have write access. -- >8 -- Block-scope declarations of functions or extern values are not allowed when attached to a named module. Similarly, class member functions are not inline if attached to a named module. However, in both these cas

[PATCH v3 00/11] : More warnings as errors by default

2023-11-20 Thread Florian Weimer
This revision addresses Marek's comment about handing -Wdeclaration-missing-parameter-type properly in conjunction with -fpermissive. A new test (permerror-fpermissive-nowarning.c) demonstrates the expected behavior. I added a test for -std=gnu89 -fno-permissive, too. I'm including the precursor

[PATCH v3 01/11] aarch64: Avoid -Wincompatible-pointer-types warning in Linux unwinder

2023-11-20 Thread Florian Weimer
* config/aarch64/linux-unwind.h (aarch64_fallback_frame_state): Add cast to the expected type in sc assignment. --- libgcc/config/aarch64/linux-unwind.h | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libgcc/config/aarch64/linux-unwind.h b/libgcc/co

[PATCH v3 02/11] aarch64: Call named function in gcc.target/aarch64/aapcs64/ice_1.c

2023-11-20 Thread Florian Weimer
This test looks like it intends to pass a small struct argument through both a non-variadic and variadic argument, but due to the typo, it does not achieve that. gcc/testsuite/ * gcc.target/aarch64/aapcs64/ice_1.c (foo): Call named. --- gcc/testsuite/gcc.target/aarch64/aapcs64/ice_1.c |

[PATCH v3 03/11] gm2: Add missing declaration of m2pim_M2RTS_Terminate to test

2023-11-20 Thread Florian Weimer
gcc/testsuite/ * gm2/link/externalscaffold/pass/scaffold.c (m2pim_M2RTS_Terminate): Declare. --- gcc/testsuite/gm2/link/externalscaffold/pass/scaffold.c | 1 + 1 file changed, 1 insertion(+) diff --git a/gcc/testsuite/gm2/link/externalscaffold/pass/scaffold.c b/gcc/testsuite/gm2

[PATCH v3 08/11] c: Do not ignore some forms of -Wimplicit-int in system headers

2023-11-20 Thread Florian Weimer
Most -Wimplicit-int warnings were unconditionally disabled for system headers. Only missing types for parameters in old-style function definitions resulted in warnings. This is inconsistent with the treatment of other permerrors, which are active in system headers. gcc/c/ * c-decl.cc (g

[PATCH v3 04/11] Add tests for validating future C permerrors

2023-11-20 Thread Florian Weimer
The dg-error directives for gcc.dg/permerror-system.c can be generated using (for the most part at least): perl -ne 'print if s,.*(/\* \{ dg-error .*) } \*/$,$1 "" { target *-*-* } $. } */,' \ < gcc/testsuite/gcc.dg/permerror-default.c gcc/testsuite/ * gcc.dg/permerror-default.c: New

[PATCH v3 05/11] c: Turn int-conversion warnings into permerrors

2023-11-20 Thread Florian Weimer
gcc/ * doc/invoke.texi (Warning Options): Document changes. gcc/c/ PR c/96284 PR c/106416 * c-typeck.cc (build_conditional_expr): Use permerror_opt for pointer/integer type mismatches, based on -Wint-conversion. (pedwarn_permerror_init, permerror_i

[PATCH v3 07/11] c: Turn -Wimplicit-int into a permerror

2023-11-20 Thread Florian Weimer
Most of these new permerrors are currently not diagnosed in system headers. gcc/ PR c/91093 PR c/96284 * doc/invoke.texi (Warning Options): Document changes. gcc/c/ * c-decl.cc (warn_defaults_to): Remove. (grok_declarator, start_function): Call permerror_

[PATCH v3 09/11] c: Turn -Wreturn-mismatch into a permerror

2023-11-20 Thread Florian Weimer
gcc/ * doc/invoke.texi (Warning Options): Document changes. gcc/c/ PR c/96284 * c-typeck.cc (c_finish_return): Use permerrors for OPT_Wreturn_mismatch diagnostics. gcc/testsuite/ * gcc.dg/permerror-default.c (return_mismatch_1) (return_mismatch_2

[PATCH v3 11/11] c: Add new -Wdeclaration-missing-parameter-type permerror

2023-11-20 Thread Florian Weimer
This used to be a warning, enabled by default, without its own option. A subsequent change could improve diagnostics and provide spelling hints for declarations like “void function (int32t);”. gcc/c-family/ * c.opt (Wdeclaration-missing-parameter-type): New. gcc/c/ChangeLog: PR

[PATCH v3 06/11] c: Turn -Wimplicit-function-declaration into a permerror

2023-11-20 Thread Florian Weimer
In the future, it may make sense to avoid cascading errors from the implicit declaration, especially its assumed int return type. This change here only changes the kind of the diagnostic, not its wording or consequences. gcc/ * doc/invoke.texi (Warning Options): Document changes. gcc/c/

[PATCH v3 10/11] c: Turn -Wincompatible-pointer-types into a permerror

2023-11-20 Thread Florian Weimer
The change to build_conditional_expr drops the downgrade from a pedwarn to warning for builtins for C99 and later language dialects. It remains a warning in C89 mode (not a permerror), as the -std=gnu89 -fno-permissive test shows. gcc/ * doc/invoke.texi (Warning Options): Document change

Re: [PATCH] Add a REG_P check for inc and dec for Arm MVE

2023-11-20 Thread Christophe Lyon
Hi Saurabh, On Tue, 14 Nov 2023 at 15:51, Kyrylo Tkachov wrote: > > Hi Saurabh, > > > -Original Message- > > From: Saurabh Jha > > Sent: Thursday, November 9, 2023 10:12 AM > > To: gcc-patches@gcc.gnu.org; Richard Earnshaw > > ; Richard Sandiford > > > > Subject: [PATCH] Add a REG_P che

Re: [PATCH 01/44] testsuite: Add cases for conditional-move and conditional-add operations

2023-11-20 Thread Maciej W. Rozycki
On Sun, 19 Nov 2023, Kito Cheng wrote: > ok Thank you for your review, but I think I need a general maintainer's ack for this one. Maciej

Re: [committed 03/22] arm: testsuite: avoid hard-float ABI incompatibility with -march

2023-11-20 Thread Christophe Lyon
Hi Richard, On Mon, 13 Nov 2023 at 15:28, Richard Earnshaw wrote: > > > A number of tests in the gcc testsuite, especially for arm-specific > targets, add various flags to control the architecture. These run > into problems when the compiler is configured with -mfpu=auto if the > new architectur

Re: [committed 02/22] arm: testsuite: correctly detect hard_float

2023-11-20 Thread Christophe Lyon
Hi Richard, On Mon, 13 Nov 2023 at 15:27, Richard Earnshaw wrote: > > > Add an arm-specific test to check_effective_target_hard_float for > Arm to handle cases where we only have single-precision FP in hardware. > > gcc/testsuite: > > * lib/target-supports.exp (check_effective_target_har

[PATCH] RISC-V Regression: Remove scalable compile option

2023-11-20 Thread Juzhe-Zhong
Since we already set scalable vectorization by default, this flag is redundant. Also, we are start to full coverage testing with different compile option. E.g --param=riscv-autovec-preference=fixed-vlmax. To avoid compile option confusion. Remove it. gcc/testsuite/ChangeLog: * lib/target

[patch] OpenMP: Add uses_allocators support

2023-11-20 Thread Tobias Burnus
This adds middle end support for uses_allocators, wires Fortran to use it and add C/C++ parsing support. This is based on Chung-Lin's patch at https://gcc.gnu.org/pipermail/gcc-patches/2022-June/596412.html There is a known firstprivate/private issue for C/C++, see: https://gcc.gnu.org/PR110347

Re: [PATCH] RISC-V Regression: Remove scalable compile option

2023-11-20 Thread Robin Dapp
LGTM. Regards Robin

Re: [committed] libstdc++: Fix aligned formatting of stacktrace_entry and thread::id [PR112564]

2023-11-20 Thread Jonathan Wakely
On Mon, 20 Nov 2023 at 02:13, Hans-Peter Nilsson wrote: > > > From: Jonathan Wakely > > Date: Thu, 16 Nov 2023 17:20:09 + > > > PR libstdc++/112564 > > * include/std/stacktrace (formatter::format): Format according > > to format-spec. > > * include/std/thread (formatte

[PATCH 0/1] Avoid exponential behavior in scheduler and better logging

2023-11-20 Thread Maxim Kuvyrkov
Hi, This patch series fixes exponential behavior in scheduler's find_modifiable_mems(). This fixes PRs [1] and [2], which are compilation time and memory hogs. The first patch in the series is the actual fix (bootstrapped and regtested on aarch64-linux-gnu), and follow up patches will be impr

[PATCH 1/1] sched-deps.cc (find_modifiable_mems): Avoid exponential behavior

2023-11-20 Thread Maxim Kuvyrkov
This patch avoids sched-deps.cc:find_inc() creating exponential number of dependencies, which become memory and compilation time hogs. Consider example (simplified from PR96388) ... === sp=sp-4 // sp_insnA mem_insnA1[sp+A1] ... mem_insnAN[sp+AN] sp=sp-4 // sp_insnB mem_insnB1[sp+B1] ... mem_insnBM[

Re: libstdc++: Speed up push_back

2023-11-20 Thread Jonathan Wakely
On Sun, 19 Nov 2023 at 21:53, Jan Hubicka wrote: > > Hi, > this patch speeds up the push_back at -O3 significantly by making the > reallocation to be inlined by default. _M_realloc_insert is general > insertion that takes iterator pointing to location where the value > should be inserted. As suc

[PATCH] aarch64: Add an early RA for strided registers

2023-11-20 Thread Richard Sandiford
[Yeah, I just missed the stage1 deadline, sorry. But this is gated behind several other things, so it seems a bit academic whether it was posted yesterday or today.] This pass adds a simple register allocator for FP & SIMD registers. Its main purpose is to make use of SME2's strided LD1, ST1 an

Re: [committed 02/22] arm: testsuite: correctly detect hard_float

2023-11-20 Thread Richard Earnshaw
On 20/11/2023 10:41, Christophe Lyon wrote: Hi Richard, On Mon, 13 Nov 2023 at 15:27, Richard Earnshaw wrote: Add an arm-specific test to check_effective_target_hard_float for Arm to handle cases where we only have single-precision FP in hardware. gcc/testsuite: * lib/target-s

Re: [PATCH v4] Introduce strub: machine-independent stack scrubbing

2023-11-20 Thread Alexandre Oliva
On Oct 26, 2023, Alexandre Oliva wrote: >> This is a refreshed and improved version of the version posted back in >> June. https://gcc.gnu.org/pipermail/gcc-patches/2023-June/621936.html > Ping? https://gcc.gnu.org/pipermail/gcc-patches/2023-October/633675.html > I'm combining the gcc/ipa-strub

Re: [committed 03/22] arm: testsuite: avoid hard-float ABI incompatibility with -march

2023-11-20 Thread Richard Earnshaw
On 20/11/2023 10:23, Christophe Lyon wrote: Hi Richard, On Mon, 13 Nov 2023 at 15:28, Richard Earnshaw wrote: A number of tests in the gcc testsuite, especially for arm-specific targets, add various flags to control the architecture.  These run into problems when the compiler is configure

Re: [PATCH v4] Introduce hardbool attribute for C

2023-11-20 Thread Alexandre Oliva
On Oct 20, 2023, Alexandre Oliva wrote: > Here's a refreshed and retested version of the patch for hardened > booleans in C. It is unchanged aside from some conflict resolution, > compared with the previous version posted back in June. > https://gcc.gnu.org/pipermail/gcc-patches/2023-June/622668

Re: [PATCH v3] Introduce -finline-stringops

2023-11-20 Thread Alexandre Oliva
On Sep 23, 2023, Alexandre Oliva wrote: > On Sep 21, 2023, Alexandre Oliva wrote: >> On Sep 15, 2023, Alexandre Oliva wrote: >>> On Jun 22, 2023, Alexandre Oliva wrote: On Jun 2, 2023, Alexandre Oliva wrote: > Introduce -finline-stringops Ping? https://gcc.gnu.org/pipermail/g

Re: [PATCH]AArch64 docs: update -mcpu=generic definition on aarch64

2023-11-20 Thread Richard Earnshaw
On 16/11/2023 15:19, Tamar Christina wrote: Hi All, This documents the behavior of the generic CPU options on AArch64. Bootstrapped Regtested on aarch64-none-linux-gnu and no issues. Ok for master? Thanks, Tamar gcc/ChangeLog: * doc/invoke.texi (generic): Update defintion.

Re: [PATCH v5] Introduce attribute sym_alias

2023-11-20 Thread Alexandre Oliva
On Sep 20, 2023, Alexandre Oliva wrote: > This patch introduces an attribute to add extra asm names (aliases) > for a decl when its definition is output. Ping? https://gcc.gnu.org/pipermail/gcc-patches/2023-September/630971.html Re-regstrapped on x86_64-linux-gnu. Ok to install? -- Alexandre

Re: [PATCH 01/44] testsuite: Add cases for conditional-move and conditional-add operations

2023-11-20 Thread Richard Biener
On Mon, Nov 20, 2023 at 11:16 AM Maciej W. Rozycki wrote: > > On Sun, 19 Nov 2023, Kito Cheng wrote: > > > ok > > Thank you for your review, but I think I need a general maintainer's ack > for this one. OK. > Maciej

Re: [PATCH] tree-ssa-math-opts: popcount (X) == 1 to (X ^ (X - 1)) > (X - 1) optimization [PR90693]

2023-11-20 Thread Jeff Law
On 11/20/23 01:39, Richard Biener wrote: On Mon, 20 Nov 2023, Jakub Jelinek wrote: On Mon, Nov 20, 2023 at 07:54:54AM +, Richard Biener wrote: On Fri, 17 Nov 2023, Jakub Jelinek wrote: Per the earlier discussions on this PR, the following patch folds popcount (x) == 1 (and != 1) into (

[BUG FIX] RISC-V: Fix intermediate mode on slide1 instruction for SEW64 on RV32

2023-11-20 Thread Juzhe-Zhong
This bug was discovered on PR112597, with -march=rv32gcv_zvl256b --param=riscv-autovec-preference=fixed-vlmax ICE: bug.c:10:1: error: unrecognizable insn: 10 | } | ^ (insn 10 9 11 2 (set (reg:V4SI 140) (unspec:V4SI [ (unspec:V4BI [ (const_v

[wwwdocs] Add new libstdc++ features

2023-11-20 Thread Jonathan Wakely
Pushed to wwwdocs. --- htdocs/gcc-14/changes.html | 7 +++ 1 file changed, 7 insertions(+) diff --git a/htdocs/gcc-14/changes.html b/htdocs/gcc-14/changes.html index e5d3970c..7278f753 100644 --- a/htdocs/gcc-14/changes.html +++ b/htdocs/gcc-14/changes.html @@ -138,12 +138,16 @@ a work-in-pr

Re: [PATCH 1/1] sched-deps.cc (find_modifiable_mems): Avoid exponential behavior

2023-11-20 Thread Richard Biener
On Mon, Nov 20, 2023 at 1:08 PM Maxim Kuvyrkov wrote: > > This patch avoids sched-deps.cc:find_inc() creating exponential number > of dependencies, which become memory and compilation time hogs. > Consider example (simplified from PR96388) ... > === > sp=sp-4 // sp_insnA > mem_insnA1[sp+A1] > ...

[PATCH v3] RISC-V: Implement TLS Descriptors.

2023-11-20 Thread Tatsuyuki Ishi
This implements TLS Descriptors (TLSDESC) as specified in [1]. The 4-instruction sequence is implemented as a single RTX insn for simplicity, but this can be revisited later if instruction scheduling or more flexible RA is desired. The default remains to be the traditional TLS model, but can be c

Re: [BUG FIX] RISC-V: Fix intermediate mode on slide1 instruction for SEW64 on RV32

2023-11-20 Thread Robin Dapp
LGTM. I prefer that over the iterator. Regards Robin

[PATCH 1/1] gcc-14: document P1689R5 scanning output support

2023-11-20 Thread Ben Boeckel
--- htdocs/gcc-14/changes.html | 11 +++ 1 file changed, 11 insertions(+) diff --git a/htdocs/gcc-14/changes.html b/htdocs/gcc-14/changes.html index 7278f753..b506eeb1 100644 --- a/htdocs/gcc-14/changes.html +++ b/htdocs/gcc-14/changes.html @@ -112,6 +112,17 @@ a work-in-progress.

Re: [committed 03/22] arm: testsuite: avoid hard-float ABI incompatibility with -march

2023-11-20 Thread Christophe Lyon
On Mon, 20 Nov 2023 at 13:44, Richard Earnshaw wrote: > > > > On 20/11/2023 10:23, Christophe Lyon wrote: > > Hi Richard, > > > > On Mon, 13 Nov 2023 at 15:28, Richard Earnshaw wrote: > >> > >> > >> A number of tests in the gcc testsuite, especially for arm-specific > >> targets, add various flag

Re: [PATCH 1/1] sched-deps.cc (find_modifiable_mems): Avoid exponential behavior

2023-11-20 Thread Maxim Kuvyrkov
> On Nov 20, 2023, at 17:09, Richard Biener wrote: > > On Mon, Nov 20, 2023 at 1:08 PM Maxim Kuvyrkov > wrote: >> >> This patch avoids sched-deps.cc:find_inc() creating exponential number >> of dependencies, which become memory and compilation time hogs. >> Consider example (simplified from PR9

Re: [PATCH 1/1] sched-deps.cc (find_modifiable_mems): Avoid exponential behavior

2023-11-20 Thread Richard Biener
On Mon, Nov 20, 2023 at 2:42 PM Maxim Kuvyrkov wrote: > > > On Nov 20, 2023, at 17:09, Richard Biener > > wrote: > > > > On Mon, Nov 20, 2023 at 1:08 PM Maxim Kuvyrkov > > wrote: > >> > >> This patch avoids sched-deps.cc:find_inc() creating exponential number > >> of dependencies, which become

Re: [PATCH 1/1] sched-deps.cc (find_modifiable_mems): Avoid exponential behavior

2023-11-20 Thread Alexander Monakov
On Mon, 20 Nov 2023, Maxim Kuvyrkov wrote: > This patch avoids sched-deps.cc:find_inc() creating exponential number > of dependencies, which become memory and compilation time hogs. > Consider example (simplified from PR96388) ... > === > sp=sp-4 // sp_insnA > mem_insnA1[sp+A1] > ... > mem_insnA

Re: [PATCH v3] Introduce -finline-stringops

2023-11-20 Thread Richard Biener
On Mon, Nov 20, 2023 at 1:51 PM Alexandre Oliva wrote: > > On Sep 23, 2023, Alexandre Oliva wrote: > > > On Sep 21, 2023, Alexandre Oliva wrote: > >> On Sep 15, 2023, Alexandre Oliva wrote: > >>> On Jun 22, 2023, Alexandre Oliva wrote: > On Jun 2, 2023, Alexandre Oliva wrote: > > In

Re: [PATCH v4] Introduce hardbool attribute for C

2023-11-20 Thread Richard Biener
On Mon, 20 Nov 2023, Alexandre Oliva wrote: > On Oct 20, 2023, Alexandre Oliva wrote: > > > Here's a refreshed and retested version of the patch for hardened > > booleans in C. It is unchanged aside from some conflict resolution, > > compared with the previous version posted back in June. > > h

Re: [committed 03/22] arm: testsuite: avoid hard-float ABI incompatibility with -march

2023-11-20 Thread Richard Earnshaw
On 20/11/2023 13:36, Christophe Lyon wrote: On Mon, 20 Nov 2023 at 13:44, Richard Earnshaw wrote: On 20/11/2023 10:23, Christophe Lyon wrote: Hi Richard, On Mon, 13 Nov 2023 at 15:28, Richard Earnshaw wrote: A number of tests in the gcc testsuite, especially for arm-specific targets

[PATCH] tree-optimization/112618 - unused .MASK_CALL

2023-11-20 Thread Richard Biener
We have to make sure to remove unused .MASK_CALL internal function calls after vectorization. Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed. PR tree-optimization/112618 * tree-vect-loop.cc (vect_transform_loop_stmt): For not relevant and unused .MASK_CALL mak

[PATCH] tree-optimization/112281 - loop distribution and zero dependence distances

2023-11-20 Thread Richard Biener
The following fixes an omission in dependence testing for loop distribution. When the overall dependence distance is not zero but the dependence direction in the innermost common loop is = there is a conflict between the partitions and we have to merge them. Bootstrapped and tested on x86_64-unkn

[PATCH] middle-end/112622 - convert and vector-to-float

2023-11-20 Thread Richard Biener
The following avoids ICEing when trying to convert a vector to a scalar float. Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed. PR middle-end/112622 * convert.cc (convert_to_real_1): Use element_precision where a vector type might appear. Provide specific

Re: [pushed] wwwdocs: *: Remove unused buildstat pages

2023-11-20 Thread Jonathan Wakely
On Mon, 20 Nov 2023 at 08:42, Thomas Schwinge wrote: > > Hi! > > On 2023-10-15T23:42:39+0200, Gerald Pfeifer wrote: > > [ Release managers, heads-up for when you branch future releases! ] > > > For GCC 9 to GCC 13 the per-release series buildstat pages have not > > been populated at all, so remov

Re: [committed 03/22] arm: testsuite: avoid hard-float ABI incompatibility with -march

2023-11-20 Thread Christophe Lyon
On Mon, 20 Nov 2023 at 14:58, Richard Earnshaw wrote: > > > > On 20/11/2023 13:36, Christophe Lyon wrote: > > On Mon, 20 Nov 2023 at 13:44, Richard Earnshaw > > wrote: > >> > >> > >> > >> On 20/11/2023 10:23, Christophe Lyon wrote: > >>> Hi Richard, > >>> > >>> On Mon, 13 Nov 2023 at 15:28, Richa

[PATCH 2/2] gcov: Fix integer types in gen_counter_update()

2023-11-20 Thread Sebastian Huber
This change fixes issues like this: gcc.dg/gomp/pr27573.c: In function ‘main._omp_fn.0’: gcc.dg/gomp/pr27573.c:19:1: error: non-trivial conversion in ‘ssa_name’ 19 | } | ^ long int long unsigned int # .MEM_19 = VDEF <.MEM_18> __gcov7.main._omp_fn.0[0] = PROF_time_profile_1

[PATCH 1/2] gcov: Use unshare_expr() in gen_counter_update()

2023-11-20 Thread Sebastian Huber
This fixes issues like this: gcc/testsuite/gcc.dg/no_profile_instrument_function-attr-1.c: In function 'main': gcc/testsuite/gcc.dg/no_profile_instrument_function-attr-1.c:19:1: error: incorrect sharing of tree nodes __gcov0.main[0] # .MEM_12 = VDEF <.MEM_9> __gcov0.main[0] = PROF_edge

Re: [PATCH v3 1/2] c++: Initial support for P0847R7 (Deducing This) [PR102609]

2023-11-20 Thread Jason Merrill
On 11/19/23 16:44, waffl3x wrote: On Sunday, November 19th, 2023 at 1:34 PM, Jason Merrill wrote: On 11/19/23 13:36, waffl3x wrote: I'm having trouble fixing the error for this case, the control flow when the functions are overloaded is much more complex. struct S { void f(this S&)

Re: [committed 03/22] arm: testsuite: avoid hard-float ABI incompatibility with -march

2023-11-20 Thread Richard Earnshaw
On 20/11/2023 14:24, Christophe Lyon wrote: On Mon, 20 Nov 2023 at 14:58, Richard Earnshaw wrote: On 20/11/2023 13:36, Christophe Lyon wrote: On Mon, 20 Nov 2023 at 13:44, Richard Earnshaw wrote: On 20/11/2023 10:23, Christophe Lyon wrote: Hi Richard, On Mon, 13 Nov 2023 at 15:28,

Re: [PATCH 1/1] sched-deps.cc (find_modifiable_mems): Avoid exponential behavior

2023-11-20 Thread Maxim Kuvyrkov
> On Nov 20, 2023, at 17:52, Alexander Monakov wrote: > > > On Mon, 20 Nov 2023, Maxim Kuvyrkov wrote: > >> This patch avoids sched-deps.cc:find_inc() creating exponential number >> of dependencies, which become memory and compilation time hogs. >> Consider example (simplified from PR96388) ...

Re: [PATCH] Fortran: fix reallocation on assignment of polymorphic variables [PR110415]

2023-11-20 Thread Tobias Burnus
Hi Andrew, On 20.11.23 14:56, Andrew Jenner wrote: This patch adds the testcase from PR110415 and fixes the bug. Thanks. I can confirm experimentally that it fixes the original PR. However, if I extend the original testcase (-2), it fails with run with valgrind or when run with -fsanitize=a

[PATCH v2] sched-deps.cc (find_modifiable_mems): Avoid exponential behavior

2023-11-20 Thread Maxim Kuvyrkov
This patch avoids sched-deps.cc:find_inc() creating exponential number of dependencies, which become memory and compilation time hogs. Consider example (simplified from PR96388) ... === sp=sp-4 // sp_insnA mem_insnA1[sp+A1] ... mem_insnAN[sp+AN] sp=sp-4 // sp_insnB mem_insnB1[sp+B1] ... mem_insnBM[

Re: [committed 03/22] arm: testsuite: avoid hard-float ABI incompatibility with -march

2023-11-20 Thread Richard Earnshaw
On 20/11/2023 14:39, Richard Earnshaw wrote: On 20/11/2023 14:24, Christophe Lyon wrote: On Mon, 20 Nov 2023 at 14:58, Richard Earnshaw wrote: On 20/11/2023 13:36, Christophe Lyon wrote: On Mon, 20 Nov 2023 at 13:44, Richard Earnshaw wrote: On 20/11/2023 10:23, Christophe Lyon wr

Re: Propagate value ranges of return values

2023-11-20 Thread Andrew MacLeod
On 11/18/23 20:21, Jan Hubicka wrote: Hi, this patch implements very basic propaation of return value ranges from VRP pass. This helps std::vector's push_back since we work out value range of allocated block. This propagates only within single translation unit. I hoped we will also do the pr

Re: [committed 03/22] arm: testsuite: avoid hard-float ABI incompatibility with -march

2023-11-20 Thread Christophe Lyon
On Mon, 20 Nov 2023 at 15:39, Richard Earnshaw wrote: > > > > On 20/11/2023 14:24, Christophe Lyon wrote: > > On Mon, 20 Nov 2023 at 14:58, Richard Earnshaw > > wrote: > >> > >> > >> > >> On 20/11/2023 13:36, Christophe Lyon wrote: > >>> On Mon, 20 Nov 2023 at 13:44, Richard Earnshaw > >>> wrote

Re: [PATCH 1/2] gcov: Use unshare_expr() in gen_counter_update()

2023-11-20 Thread Richard Biener
On Mon, Nov 20, 2023 at 3:34 PM Sebastian Huber wrote: > > This fixes issues like this: > > gcc/testsuite/gcc.dg/no_profile_instrument_function-attr-1.c: In function > 'main': > gcc/testsuite/gcc.dg/no_profile_instrument_function-attr-1.c:19:1: error: > incorrect sharing of tree nodes > __

Re: [PATCH] c: Add __builtin_stdc_bit_{width,floor,ceil} builtins

2023-11-20 Thread Joseph Myers
On Sat, 18 Nov 2023, Jakub Jelinek wrote: > +@defbuiltin{@var{type} __builtin_stdc_bit_ceil (@var{type} @var{arg})} > +The @code{__builtin_stdc_bit_ceil} function is available only > +in C. It is type-generic, the argument can be any unsigned integer > +(standard, extended or bit-precise). No in

GCC/Rust libgrust-v2/to-submit branch (was: [PATCH 2/3] build: Add libgrust as compilation modules)

2023-11-20 Thread Thomas Schwinge
Hi! Arthur and Pierre-Emmanuel have prepared a GCC/Rust libgrust-v2/to-submit branch: . In that one, most of the issues raised have been addressed, and which I've now successfully "tested" in my different GCC configurations, requiring j

Re: Propagate value ranges of return values

2023-11-20 Thread Jan Hubicka
> > On 11/18/23 20:21, Jan Hubicka wrote: > > Hi, > > this patch implements very basic propaation of return value ranges from VRP > > pass. This helps std::vector's push_back since we work out value range of > > allocated block. This propagates only within single translation unit. I > > hoped

Re: [PATCH] call maybe_return_this in build_clone

2023-11-20 Thread Jason Merrill
On 11/19/23 02:38, Alexandre Oliva wrote: __dt_base doesn't get its body from a maybe_return_this caller, it's rather cloned with the full body within build_clone, and then it's left alone, without going through finish_function_body or build_delete_destructor_body, that call maybe_return_this.

Re: [PATCH] c++: for contracts, cdtors never return this

2023-11-20 Thread Jason Merrill
On 11/19/23 02:28, Alexandre Oliva wrote: When targetm.cxx.cdtor_return_this() holds, cdtors have a non-VOID_TYPE_P result, but IMHO this ABI implementation detail shouldn't leak to the abstract language conceptual framework, in which cdtors don't have return values. For contracts, specifically

Re: libstdc++: Speed up push_back

2023-11-20 Thread Jan Hubicka
> > + // RAII type to destroy initialized elements. > > There's only one initialized element, not "elements". > > > + struct _Guard_elts > > + { > > + pointer _M_first, _M_last; // Elements to destroy > > We only need to store one pointer here, call it

Re: [PATCH v2[1/5] aarch64: Add cpu feature detection to libgcc

2023-11-20 Thread Richard Sandiford
Andrew Carlotti writes: > This is added to enable function multiversioning, but can also be used > directly. The interface is chosen to match that used in LLVM's > compiler-rt, to facilitate cross-compiler compatibility. > > The content of the patch is derived almost entirely from Pavel's prior >

Re: [committed 03/22] arm: testsuite: avoid hard-float ABI incompatibility with -march

2023-11-20 Thread Richard Earnshaw
On 20/11/2023 14:50, Christophe Lyon wrote: On Mon, 20 Nov 2023 at 15:39, Richard Earnshaw wrote: On 20/11/2023 14:24, Christophe Lyon wrote: On Mon, 20 Nov 2023 at 14:58, Richard Earnshaw wrote: On 20/11/2023 13:36, Christophe Lyon wrote: On Mon, 20 Nov 2023 at 13:44, Richard Earn

Re: [committed] libstdc++: Fix aligned formatting of stacktrace_entry and thread::id [PR112564]

2023-11-20 Thread Hans-Peter Nilsson
> From: Jonathan Wakely > Date: Mon, 20 Nov 2023 11:55:22 + > The changelog entry does say "Change compile test to run." Wow, it's right there. The doh:est of doh:s on me. Sorry for wasting your time on that. > > PS. Sorry, I have no idea why regarding the underlying multi-target problem

[PATCH 1/1] email: fix bug and patch email addresses

2023-11-20 Thread Ben Boeckel
Changelog: * config-ml.in: Update bug and patch email address. * symlink-tree: Update bug and patch email address. --- config-ml.in | 4 ++-- symlink-tree | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/config-ml.in b/config-ml.in index 68854a4f16c..107d31

[PATCH 1/1] gcc-14: document P1689R5 scanning output support

2023-11-20 Thread Ben Boeckel
--- htdocs/gcc-14/changes.html | 11 +++ 1 file changed, 11 insertions(+) diff --git a/htdocs/gcc-14/changes.html b/htdocs/gcc-14/changes.html index 7278f753..b506eeb1 100644 --- a/htdocs/gcc-14/changes.html +++ b/htdocs/gcc-14/changes.html @@ -112,6 +112,17 @@ a work-in-progress.

Re: [PATCH 1/1] email: fix bug and patch email addresses

2023-11-20 Thread Xi Ruoyao
On Mon, 2023-11-20 at 11:22 -0500, Ben Boeckel wrote: > Changelog: > > * config-ml.in: Update bug and patch email address. > * symlink-tree: Update bug and patch email address. > --- >  config-ml.in | 4 ++-- >  symlink-tree | 4 ++-- >  2 files changed, 4 insertions(+), 4 deletions(-) >

[PATCH] RISC-V: testsuite: Do not set default arch for RVV.

2023-11-20 Thread Robin Dapp
Hi, as per recent discussion and in order to fix inconsistencies between spike and qemu this patch removes gcc_march and gcc_mabi arguments from the default CFLAGS in the testsuite invocation for some sub directories. Juzhe reported that this helps for him. Regards Robin gcc/testsuite/ChangeLo

[PATCH] RISC-V: testsuite: Add rv64 requirement for bug-9 and bug-14.

2023-11-20 Thread Robin Dapp
Hi, this adds an effective target requirement to compile the tests. Since we disabled 64-bit indices on rv32 targets those tests should be unsupported on rv32. Regards Robin gcc/testsuite/ChangeLog: * g++.target/riscv/rvv/base/bug-14.C: Add dg-require-effective-target rv64.

  1   2   >