[PATCH] Improve memcmpeq for 512-bit vector with vpcmpeq + kortest.

2023-10-26 Thread liuhongt
When 2 vectors are equal, kmask is allones and kortest will set CF, else CF will be cleared. So CF bit can be used to check for the result of the comparison. Bootstrapped and regtested on x86_64-pc-linux-gnu{-m32,}. Ok for trunk? Before: vmovdqu (%rsi), %ymm0 vpxorq (%rdi),

RE: [PATCH] [gcc-wwwdocs]gcc-13/14: Mention Intel new ISA and march support

2023-10-26 Thread Jiang, Haochen
> -Original Message- > From: Jiang, Haochen > Sent: Friday, October 27, 2023 10:52 AM > To: Jiang, Haochen ; gcc-patches@gcc.gnu.org > Cc: Liu, Hongtao ; ubiz...@gmail.com; Gerald Pfeifer > > Subject: RE: [PATCH] [gcc-wwwdocs]gcc-13/14: Mention Intel new ISA and > march support > > >

RE: [gccwwwdocs PATCH] gcc-13/14: Mention Intel new ISA and march support

2023-10-26 Thread Jiang, Haochen
> -Original Message- > From: Haochen Jiang > Sent: Monday, October 23, 2023 10:18 AM > To: gcc-patches@gcc.gnu.org > Cc: ger...@pfeifer.com; ubiz...@gmail.com; Liu, Hongtao > > Subject: [gccwwwdocs PATCH] gcc-13/14: Mention Intel new ISA and march > support > > Hi all, > > This patch

RE: [PATCH] [gcc-wwwdocs]gcc-13/14: Mention Intel new ISA and march support

2023-10-26 Thread Jiang, Haochen
> -Original Message- > From: Gcc-patches bounces+haochen.jiang=intel@gcc.gnu.org> On Behalf Of Haochen Jiang > via Gcc-patches > Sent: Monday, July 17, 2023 11:34 AM > To: gcc-patches@gcc.gnu.org > Cc: Liu, Hongtao ; ubiz...@gmail.com > Subject: [PATCH] [gcc-wwwdocs]gcc-13/14: Mention

RE: [PATCH v2] VECT: Remove the type size restriction of vectorizer

2023-10-26 Thread Li, Pan2
Thanks Richard S for comments. > In other words, I don't think simply removing the test from the vectoriser > is correct. It needs to be replaced by something more selective. Does it mean we need to check if the internal fun allow different modes/sizes here? For example, standard name

Re: [PATCH] libgcov: Fix gcov overlap bugs of divide to 0

2023-10-26 Thread Xionghu Luo
+cc maintainers. On 2023/10/26 11:25, Xionghu Luo wrote: Fix the long lasting issue of `gcov-tool overlap xxx yyy`, divide to 0 caused the output shows a lot of nans, another problem is the counts in file are never acculated leads to incorrect results. Signed-off-by: Xionghu Luo

[PATCH V2] introduce light expander sra

2023-10-26 Thread Jiufu Guo
Hi, Compare with previous version: https://gcc.gnu.org/pipermail/gcc-patches/2023-October/632399.html This verion supports TI/VEC mode of the access. There are a few PRs (meta-bug PR101926) on various targets. The root causes of them are similar: the aggeragte param/ returns are passed by

Re: [PATCH] c++: more ahead-of-time -Wparentheses warnings

2023-10-26 Thread Jason Merrill
On 10/26/23 17:37, Patrick Palka wrote: On Thu, 26 Oct 2023, Patrick Palka wrote: On Thu, 26 Oct 2023, Jason Merrill wrote: On 10/25/23 14:55, Patrick Palka wrote: Bootstrapped and regtested on x86_64-pc-linux-gnu, does this look OK for trunk? -- >8 -- Now that we don't have to worry

Re: [PATCH] c++, v2: Implement C++26 P2741R3 - user-generated static_assert messages [PR110348]

2023-10-26 Thread Jason Merrill
On 9/18/23 13:21, Jakub Jelinek wrote: Here is an updated version of the patch. Compared to the last version, based on the discussion in the PR, the patch 1) warns (but only that) if size()/data() methods aren't declared constexpr/consteval (or implicitly constexpr) The language

Re: Re: [Ready to commit V3] RISC-V: Add AVL propagation PASS for RVV auto-vectorization

2023-10-26 Thread juzhe.zh...@rivai.ai
Yeah. No worry. We will eventually run full coverage testing && fix all bugs in stage 3 && stage 4. We are planning to run the whole gcc testsuite with all these following compile option: -march=rv64gcv_zvl128b --param=riscv-autovec-lmul=m1 -march=rv64gcv_zvl128b --param=riscv-autovec-lmul=m2

Re: Re: [Ready to commit V3] RISC-V: Add AVL propagation PASS for RVV auto-vectorization

2023-10-26 Thread 钟居哲
Thanks Patrick. Committed. juzhe.zh...@rivai.ai From: Patrick O'Neill Date: 2023-10-27 02:12 To: Juzhe-Zhong; gcc-patches CC: Kito Cheng; Robin Dapp Subject: Re: [Ready to commit V3] RISC-V: Add AVL propagation PASS for RVV auto-vectorization popcount and mask_gather_load_run fails seem to

Re: [NFC] RISC-V: Move lmul calculation into macro

2023-10-26 Thread 钟居哲
Committed. juzhe.zh...@rivai.ai From: Juzhe-Zhong Date: 2023-10-27 06:28 To: gcc-patches CC: kito.cheng; kito.cheng; jeffreyalaw; rdapp.gcc; Juzhe-Zhong Subject: [NFC] RISC-V: Move lmul calculation into macro Notice we calculate LMUL according to --param=riscv-autovec-lmul in multiple places:

Re: [PATCH] RISC-V: Fix cond_sqrt tests.

2023-10-26 Thread 钟居哲
LGTM. juzhe.zh...@rivai.ai From: Robin Dapp Date: 2023-10-27 03:19 To: gcc-patches; palmer; Kito Cheng; jeffreyalaw; juzhe.zh...@rivai.ai CC: rdapp.gcc Subject: [PATCH] RISC-V: Fix cond_sqrt tests. Hi, as long as we do not have universal Zvfh support in binutils linking against libm does

Re: [PATCH htdocs v3] bugs: Mention -D_GLIBCXX_ASSERTIONS and -D_GLIBCXX_DEBUG

2023-10-26 Thread Gerald Pfeifer
On Thu, 26 Oct 2023, Sam James wrote: > These options both enabled more checking within the C++ standard library > and can expose errors in submitted code. This is a good addition, thank you! I was going to approve/push, but it's probably better for Jonathan to give the final okay. Just one

Re: [PATCH] RISC-V: Add rawmemchr expander.

2023-10-26 Thread 钟居哲
Hi, Robin. + machine_mode vmode; + switch (mode) +{ + case QImode: + vmode = E_RVVM1QImode; + break; + case HImode: + vmode = E_RVVM1HImode; + break; + case SImode: + vmode = E_RVVM1SImode; + break; + case DImode: + vmode = E_RVVM1DImode; + break; + default: +

[NFC] RISC-V: Move lmul calculation into macro

2023-10-26 Thread Juzhe-Zhong
Notice we calculate LMUL according to --param=riscv-autovec-lmul in multiple places: int lmul = riscv_autovec_lmul == RVV_DYNAMIC ? RVV_M8 : riscv_autovec_lmul; Create a new macro for it for easier matain. gcc/ChangeLog: * config/riscv/riscv-opts.h (TARGET_MAX_LMUL): New macro.

Re: [PATCH 2/5] Support for CodeView debugging format

2023-10-26 Thread Mark Harmstone
On 26/10/23 10:35, Richard Biener wrote: On Mon, Oct 23, 2023 at 2:57 AM Mark Harmstone wrote: This patch and the following add initial support for Microsoft's CodeView debugging format, as used by MSVC, to mingw targets. A high-level question - it seems there's almost no information in the

Re: [PATCH] c++: more ahead-of-time -Wparentheses warnings

2023-10-26 Thread Patrick Palka
On Thu, 26 Oct 2023, Patrick Palka wrote: > On Thu, 26 Oct 2023, Jason Merrill wrote: > > > On 10/25/23 14:55, Patrick Palka wrote: > > > Bootstrapped and regtested on x86_64-pc-linux-gnu, does this look > > > OK for trunk? > > > > > > -- >8 -- > > > > > > Now that we don't have to worry about

Re: [PATCH] c++: more ahead-of-time -Wparentheses warnings

2023-10-26 Thread Patrick Palka
On Thu, 26 Oct 2023, Jason Merrill wrote: > On 10/25/23 14:55, Patrick Palka wrote: > > Bootstrapped and regtested on x86_64-pc-linux-gnu, does this look > > OK for trunk? > > > > -- >8 -- > > > > Now that we don't have to worry about looking thruogh NON_DEPENDENT_EXPR, > > we can easily extend

Re: [PATCH] c++: Implement C++ DR 2406 - [[fallthrough]] attribute and iteration statements

2023-10-26 Thread Jason Merrill
On 8/28/23 06:34, Richard Biener wrote: On Fri, 25 Aug 2023, Jakub Jelinek wrote: Hi! The following patch implements CWG 2406 - [[fallthrough]] attribute and iteration statements The genericization of some loops leaves nothing at all or just a label after a body of a loop, so if the loop is

Re: ping: [PATCH] preprocessor: c++: Support `#pragma GCC target' macros [PR87299]

2023-10-26 Thread Jason Merrill
On 10/13/23 17:28, Lewis Hyatt wrote: On Tue, Sep 12, 2023 at 04:09:21PM -0400, Lewis Hyatt wrote: On Tue, Aug 8, 2023 at 5:53 PM Jason Merrill wrote: On 7/31/23 22:22, Lewis Hyatt via Gcc-patches wrote: `#pragma GCC target' is not currently handled in preprocess-only mode (e.g., when

[PATCH] MATCH: Simplify `(X &| B) CMP X` if possible [PR 101590]

2023-10-26 Thread Andrew Pinski
From: Andrew Pinski I noticed we were missing these simplifications so let's add them. This adds the following simplifications: U & N <= U -> true U & N > U -> false When U is known to be as non-negative. When N is also known to be non-negative, this is also true: U | N < U -> false U | N

Re: [PATCH v4] c-family: Implement __has_feature and __has_extension [PR60512]

2023-10-26 Thread Jason Merrill
On 10/25/23 06:28, Alex Coplan wrote: On 11/10/2023 14:31, Alex Coplan wrote: On 27/09/2023 15:27, Alex Coplan wrote: Hi, This is a v4 patch to address Jason's feedback here: https://gcc.gnu.org/pipermail/gcc-patches/2023-September/630911.html w.r.t. v3 it just removes a comment now that

Re: [PATCH] c++: simplify build_new_1 when in a template context

2023-10-26 Thread Patrick Palka
On Thu, 26 Oct 2023, Jason Merrill wrote: > On 10/26/23 14:01, Patrick Palka wrote: > > Since when in a template context we end up just discarding the result > > of build_new_1, we don't have to bother with much of the code generation > > it performs. This patch makes the function exit early,

Re: [PATCH] c++: more ahead-of-time -Wparentheses warnings

2023-10-26 Thread Jason Merrill
On 10/25/23 14:55, Patrick Palka wrote: Bootstrapped and regtested on x86_64-pc-linux-gnu, does this look OK for trunk? -- >8 -- Now that we don't have to worry about looking thruogh NON_DEPENDENT_EXPR, we can easily extend the -Wparentheses warning in convert_for_assignment to consider

Re: [PATCH][_Hashtable] Use RAII to restore Rehash state

2023-10-26 Thread François Dumont
On 26/10/2023 12:43, Jonathan Wakely wrote: On 26/10/23 07:18 +0200, François Dumont wrote:     libstdc++: [_Hashtable] Use RAII type to manage rehash functor state     Replace usage of __try/__catch with a RAII type to restore rehash functor     state when needed. Generally I really like

[PATCH htdocs v3] bugs: Mention -D_GLIBCXX_ASSERTIONS and -D_GLIBCXX_DEBUG

2023-10-26 Thread Sam James
These options both enabled more checking within the C++ standard library and can expose errors in submitted code. -D_GLIBCXX_DEBUG is mentioned separately because while we want people to try it, it's not always feasible because it requires the whole program and any used libraries to also be built

[PATCH] Fortran: diagnostics of MODULE PROCEDURE declaration conflicts [PR104649]

2023-10-26 Thread Harald Anlauf
Dear all, the attached patch improves the diagnostics of MODULE PROCEDURE declaration conflicts, when one of the declarations is an alternate return. We used to ICE before. Steve identified the cause of the issue and provided a partial fix. Regtested on x86_64-pc-linux-gnu. OK for mainline?

[PATCH v4 1/1] gcc: config: microblaze: fix cpu version check

2023-10-26 Thread Neal Frager
The MICROBLAZE_VERSION_COMPARE was incorrectly using strcasecmp instead of strverscmp to check the mcpu version against feature options. By simply changing the define to use strverscmp, the new version 10.0 is treated correctly as a higher version than previous versions. Signed-off-by: Neal

Re: [PATCH] c++: simplify build_new_1 when in a template context

2023-10-26 Thread Jason Merrill
On 10/26/23 14:01, Patrick Palka wrote: Since when in a template context we end up just discarding the result of build_new_1, we don't have to bother with much of the code generation it performs. This patch makes the function exit early, returning a dummy non-erroneous result, once we've done

Re: [PATCH] internal-fn: Add VCOND_MASK_LEN.

2023-10-26 Thread Robin Dapp
> +(define_expand "vcond_mask_len_" > +  [(match_operand:V_VLS 0 "register_operand") > +    (match_operand: 3 "nonmemory_operand") > +    (match_operand:V_VLS 1 "nonmemory_operand") > +    (match_operand:V_VLS 2 "autovec_else_operand") > +    (match_operand 4 "autovec_length_operand") > +   

[PATCH] RISC-V: Add rawmemchr expander.

2023-10-26 Thread Robin Dapp
Hi, this patch adds a vectorized rawmemchr expander. It's basically strstr but for 8, 16 and 32-byte needles. Apart from adjusting the common-code tests I re-used a similar test that Stefan added to the s390 backend. Regards Robin gcc/ChangeLog: * config/riscv/autovec.md (rawmemchr):

[committed] libstdc++: Fix exception thrown by std::shared_lock::unlock() [PR112089]

2023-10-26 Thread Jonathan Wakely
Tested x86_64-linux. Pushed to trunk. Worth backporting to all active branches, I think. -- >8 -- The incorrect errc constant here looks like a copy error. libstdc++-v3/ChangeLog: PR libstdc++/112089 * include/std/shared_mutex (shared_lock::unlock): Change errc constant

[committed] libstdc++: Add dg-timeout-factor to IO tests

2023-10-26 Thread Jonathan Wakely
Tested x86_64-linux. Pushed to trunk. Worth backporting to gcc-13 too. -- >8 -- This avoids failures due to compilation timeouts when testing with a low tool_timeout value. libstdc++-v3/ChangeLog: * testsuite/20_util/duration/io.cc: Double timeout using dg-timeout-factor.

Re: [RFC] Add function attribute: null_terminated_string_arg(PARAM_IDX)

2023-10-26 Thread David Malcolm
On Thu, 2023-10-19 at 10:02 -0400, David Malcolm wrote: > This patch adds a new function attribute to GCC for marking that an > argument is expected to be a null-terminated string. > > For example, consider: > >   void test_a (const char *p) >     __attribute__((null_terminated_string_arg (1)));

Re: [PATCH] testsuite, Darwin: Add support for Mach-O function body scans.

2023-10-26 Thread Iain Sandoe
Hi Richard, > On 26 Oct 2023, at 20:49, Richard Sandiford wrote: > > Iain Sandoe writes: >> This was written before Thomas' modification to the ELF-handling to allow >> a config-based change for target details. I did consider updating this >> to try and use that scheme, but I think that it

Re: HELP: Will the reordering happen? Re: [V3][PATCH 0/3] New attribute "counted_by" to annotate bounds for C99 FAM(PR108896)

2023-10-26 Thread Qing Zhao
I guess that what Kees wanted, ""fill the array without knowing the actual final size" code pattern”, as following: >> struct foo *f; >> char *p; >> int i; >> >> f = alloc(maximum_possible); >> f->count = 0; >> p = f->buf; >> >> for (i; data_is_available() &&

Re: [PATCH] testsuite, Darwin: Add support for Mach-O function body scans.

2023-10-26 Thread Richard Sandiford
Iain Sandoe writes: > This was written before Thomas' modification to the ELF-handling to allow > a config-based change for target details. I did consider updating this > to try and use that scheme, but I think that it would sit a little > awkwardly, since there are some differences in the

Re: [PATCH v3 1/1] gcc: config: microblaze: fix cpu version check

2023-10-26 Thread Michael Eager
On 10/25/23 01:02, Neal Frager wrote: The MICROBLAZE_VERSION_COMPARE was incorrectly using strcasecmp instead of strverscmp to check the mcpu version against feature options. By simply changing the define to use strverscmp, the new version 10.0 is treated correctly as a higher version than

Re: [PATCH] testsuite, aarch64: Normalise options to aarch64.exp.

2023-10-26 Thread Richard Sandiford
Iain Sandoe writes: > tested on cfarm185 (aarch64-linux-gnu, xgene1) and with the aarch64 > Darwin prototype. It is possible that some initial fallout could occur > on some test setups (where the default has been catered for in some > way) - but that should stabilize. OK for trunk? > thanks >

[PATCH] aarch64: Make assembler bug workaround configurable.

2023-10-26 Thread Iain Sandoe
This is an enablement patch (the initial use comes with the Darwin aarch64 port). Tested on aarch64-linux-gnu, aarch64-apple-darwin and x86_64-darwin just for good measure, OK for trunk? thanks Iain. --- 8< --- Some assmblers have a bug that requires +crc to be emitted even though the base

Re: [PATCH htdocs v2] bugs: Mention -D_GLIBCXX_ASSERTIONS and -D_GLIBCXX_DEBUG

2023-10-26 Thread Andrew Pinski
On Thu, Oct 26, 2023 at 12:18 PM Sam James wrote: > > These options both enabled more checking within the C++ standard library > and can expose errors in submitted code. > > -D_GLIBCXX_DEBUG is mentioned separately because while we want people to try > it, > it's not always feasible because it

[PATCH] RISC-V: Fix cond_sqrt tests.

2023-10-26 Thread Robin Dapp
Hi, as long as we do not have universal Zvfh support in binutils linking against libm does not work out of the box. This patch splits the cond_sqrt tests into non-zvfh and zvfh variants and makes the run-zvfh ones depend on a zvfh target. While at it, I also added Zvfh handling to the testsuite

[PATCH] testsuite, Darwin: Add support for Mach-O function body scans.

2023-10-26 Thread Iain Sandoe
This was written before Thomas' modification to the ELF-handling to allow a config-based change for target details. I did consider updating this to try and use that scheme, but I think that it would sit a little awkwardly, since there are some differences in the start-up scanning for Mach-O. I

Re: [Patch, fortran] PR104625 ICE in fixup_array_ref, at fortran/resolve.cc:9275 since r10-2912-g70570ec192745095

2023-10-26 Thread Harald Anlauf
Hi Paul, this looks all good to me. It is great that you added the handling of nested parentheses to the resolution, as that appears to be needed also in other situations. Thanks for the patch! Harald On 10/26/23 19:14, Paul Richard Thomas wrote: Hi All, The attached patch fixes the

Re: HELP: Will the reordering happen? Re: [V3][PATCH 0/3] New attribute "counted_by" to annotate bounds for C99 FAM(PR108896)

2023-10-26 Thread Qing Zhao
> On Oct 26, 2023, at 1:05 PM, Martin Uecker wrote: > > Am Donnerstag, dem 26.10.2023 um 16:41 + schrieb Qing Zhao: >> >>> On Oct 26, 2023, at 5:20 AM, Martin Uecker wrote: >>> >>> Am Donnerstag, dem 26.10.2023 um 10:45 +0200 schrieb Richard Biener: On Wed, Oct 25, 2023 at 8:16 PM

[PATCH htdocs v2] bugs: Mention -D_GLIBCXX_ASSERTIONS and -D_GLIBCXX_DEBUG

2023-10-26 Thread Sam James
These options both enabled more checking within the C++ standard library and can expose errors in submitted code. -D_GLIBCXX_DEBUG is mentioned separately because while we want people to try it, it's not always feasible because it requires the whole program and any used libraries to also be built

Re: [PATCH htdocs] bugs: Mention -D_GLIBCXX_ASSERTIONS and -D_GLIBCXX_DEBUG

2023-10-26 Thread Sam James
Jonathan Wakely writes: > On Thursday, 26 October 2023, Sam James wrote: >> These options both enabled more checking within the C++ standard library >> and can expose errors in submitted code. >> >> -D_GLIBCXX_DEBUG is mentioned separately because while we want people to try >> it, >> it's

Re: [PATCH htdocs] bugs: Mention -D_GLIBCXX_ASSERTIONS and -D_GLIBCXX_DEBUG

2023-10-26 Thread Jonathan Wakely
On Thursday, 26 October 2023, Sam James wrote: > These options both enabled more checking within the C++ standard library > and can expose errors in submitted code. > > -D_GLIBCXX_DEBUG is mentioned separately because while we want people to try it, > it's not always feasible because it requires

Re: [PATCH] testsuite, aarch64: Normalise options to aarch64.exp.

2023-10-26 Thread Andrew Pinski
On Thu, Oct 26, 2023 at 11:58 AM Iain Sandoe wrote: > > tested on cfarm185 (aarch64-linux-gnu, xgene1) and with the aarch64 > Darwin prototype. It is possible that some initial fallout could occur > on some test setups (where the default has been catered for in some > way) - but that should

[PATCH] testsuite, aarch64: Normalise options to aarch64.exp.

2023-10-26 Thread Iain Sandoe
tested on cfarm185 (aarch64-linux-gnu, xgene1) and with the aarch64 Darwin prototype. It is possible that some initial fallout could occur on some test setups (where the default has been catered for in some way) - but that should stabilize. OK for trunk? thanks Iain --- 8< --- When the

Re: Ping: [PATCH v2 0/2] Replace intl/ with out-of-tree GNU gettext

2023-10-26 Thread Andrew Pinski
On Sun, Oct 15, 2023 at 12:40 PM Arsen Arsenović wrote: > > Evening, > > Arsen Arsenović writes: > > > Afternoon, > > > > This patch is a rebase and rewording of > > https://inbox.sourceware.org/20230925150921.894157-1-ar...@aarsen.me/ > > > > Changes since v1: > > - Implement Brunos suggested

Re: HELP: Will the reordering happen? Re: [V3][PATCH 0/3] New attribute "counted_by" to annotate bounds for C99 FAM(PR108896)

2023-10-26 Thread Qing Zhao
> On Oct 26, 2023, at 10:05 AM, Richard Biener > wrote: > > > >> Am 26.10.2023 um 12:14 schrieb Martin Uecker : >> >> Am Donnerstag, dem 26.10.2023 um 11:20 +0200 schrieb Martin Uecker: Am Donnerstag, dem 26.10.2023 um 10:45 +0200 schrieb Richard Biener: On Wed, Oct 25, 2023 at

[PATCH] RISC-V: Fix wrong tune parameters on int_div

2023-10-26 Thread Yangyu Chen
This patch fixes an issue with the cost on "int_div" in various RISC-V tune parameters including those for Rocket, SiFive U7 series, and T-Head C906. This incorrect cost value interferes with the optimization process. For example, it prevents the optimization of division by a constant to a more

Re: [Ready to commit V3] RISC-V: Add AVL propagation PASS for RVV auto-vectorization

2023-10-26 Thread Patrick O'Neill
On 10/26/23 11:15, Robin Dapp wrote: rv32gcv: FAIL: gfortran.dg/intrinsic_pack_6.f90   -O2  execution test FAIL: gfortran.dg/intrinsic_pack_6.f90   -O3 -g  execution test FAIL: gfortran.dg/matmul_3.f90   -O2  execution test FAIL: gfortran.fortran-torture/execute/intrinsic_matmul.f90 execution, 

Re: [1/3] Add support for target_version attribute

2023-10-26 Thread Richard Sandiford
Andrew Carlotti writes: > This patch adds support for the "target_version" attribute to the middle > end and the C++ frontend, which will be used to implement function > multiversioning in the aarch64 backend. > > Note that C++ is currently the only frontend which supports > multiversioning using

Re: [PATCH] libcpp: Improve the diagnostic for poisoned identifiers [PR36887]

2023-10-26 Thread Christophe Lyon
On Thu, 26 Oct 2023 at 19:44, Lewis Hyatt wrote: > > On Thu, Oct 26, 2023 at 12:48 PM Christophe Lyon > wrote: > > > > On Thu, 26 Oct 2023 at 18:18, Lewis Hyatt wrote: > > > > > > On Thu, Oct 26, 2023 at 4:49 AM Christophe Lyon > > > wrote: > > > > We have noticed that the new tests fail on

Re: [PATCH] Improve tree_expr_nonnegative_p by using the ranger [PR111959]

2023-10-26 Thread Andrew Pinski
On Thu, Oct 26, 2023 at 2:29 AM Richard Biener wrote: > > On Wed, Oct 25, 2023 at 5:51 AM Andrew Pinski wrote: > > > > I noticed we were missing optimizing `a / (1 << b)` when > > we know that a is nonnegative but only due to ranger information. > > This adds the use of the global ranger to

Re: [Ready to commit V3] RISC-V: Add AVL propagation PASS for RVV auto-vectorization

2023-10-26 Thread Robin Dapp
> rv32gcv: > FAIL: gfortran.dg/intrinsic_pack_6.f90   -O2  execution test > FAIL: gfortran.dg/intrinsic_pack_6.f90   -O3 -g  execution test > FAIL: gfortran.dg/matmul_3.f90   -O2  execution test > FAIL: gfortran.fortran-torture/execute/intrinsic_matmul.f90 execution,  -O2 > FAIL:

Re: [Ready to commit V3] RISC-V: Add AVL propagation PASS for RVV auto-vectorization

2023-10-26 Thread Patrick O'Neill
popcount and mask_gather_load_run fails seem to be an issue with my setup or a bug with QEMU based on the v2 discussion :-) OK with me regarding testing (I don't have the authority to approve a patch, but Kito already said LGTM):

[PATCH] c++: simplify build_new_1 when in a template context

2023-10-26 Thread Patrick Palka
Bootstrapped and regtested on x86_64-pc-linux-gnu, does this look OK for trunk? -- >8 -- Since when in a template context we end up just discarding the result of build_new_1, we don't have to bother with much of the code generation it performs. This patch makes the function exit early,

Re: [PATCH v2] VECT: Remove the type size restriction of vectorizer

2023-10-26 Thread Richard Sandiford
Richard Biener writes: >> Am 26.10.2023 um 13:59 schrieb Li, Pan2 : >> >> Thanks Richard for comments. >> >>> Can you explain why this is necessary? In particular what is lhs_rtx >>> mode vs ops[0].value mode? >> >> For testcase gcc.target/aarch64/sve/popcount_1.c, the rtl are list as below.

Re: [PATCH] libcpp: Improve the diagnostic for poisoned identifiers [PR36887]

2023-10-26 Thread Lewis Hyatt
On Thu, Oct 26, 2023 at 12:48 PM Christophe Lyon wrote: > > On Thu, 26 Oct 2023 at 18:18, Lewis Hyatt wrote: > > > > On Thu, Oct 26, 2023 at 4:49 AM Christophe Lyon > > wrote: > > > We have noticed that the new tests fail on aarch64 with: > > > .../aarch64-unknown-linux-gnu/libc/usr/lib/crt1.o:

Ping^2: [PATCH v2 0/2] Replace intl/ with out-of-tree GNU gettext

2023-10-26 Thread Arsen Arsenović
Ping^2 It'd be nice to get this patch into 14 (given the intended C strictness changes, especially). Have a lovely evening. -- Arsen Arsenović signature.asc Description: PGP signature

Re: HELP: Will the reordering happen? Re: [V3][PATCH 0/3] New attribute "counted_by" to annotate bounds for C99 FAM(PR108896)

2023-10-26 Thread Richard Biener
> Am 26.10.2023 um 19:05 schrieb Martin Uecker : > > Am Donnerstag, dem 26.10.2023 um 16:41 + schrieb Qing Zhao: >> On Oct 26, 2023, at 5:20 AM, Martin Uecker wrote: >>> >>> Am Donnerstag, dem 26.10.2023 um 10:45 +0200 schrieb Richard Biener: On Wed, Oct 25, 2023 at 8:16 PM

[Patch, fortran] PR104625 ICE in fixup_array_ref, at fortran/resolve.cc:9275 since r10-2912-g70570ec192745095

2023-10-26 Thread Paul Richard Thomas
Hi All, The attached patch fixes the original problem, in which parentheses around the selector in select type constructs caused ICES. Stacked parentheses caused problems in trans-stmt.cc. Rather than tracking this down, the redundant parentheses were removed on resolution of the selector

[PATCH htdocs] bugs: Mention -D_GLIBCXX_ASSERTIONS and -D_GLIBCXX_DEBUG

2023-10-26 Thread Sam James
These options both enabled more checking within the C++ standard library and can expose errors in submitted code. -D_GLIBCXX_DEBUG is mentioned separately because while we want people to try it, it's not always feasible because it requires the whole program and any used libraries to also be built

Re: HELP: Will the reordering happen? Re: [V3][PATCH 0/3] New attribute "counted_by" to annotate bounds for C99 FAM(PR108896)

2023-10-26 Thread Martin Uecker
Am Donnerstag, dem 26.10.2023 um 16:41 + schrieb Qing Zhao: > > > On Oct 26, 2023, at 5:20 AM, Martin Uecker wrote: > > > > Am Donnerstag, dem 26.10.2023 um 10:45 +0200 schrieb Richard Biener: > > > On Wed, Oct 25, 2023 at 8:16 PM Martin Uecker wrote: > > > > > > > > Am Mittwoch, dem

[PING][PATCH] Include safe-ctype.h after C++ standard headers, to avoid over-poisoning

2023-10-26 Thread Dimitry Andric
Ping. It would be nice to get this QoL fix in. -Dimitry > On 28 Sep 2023, at 18:37, Dimitry Andric wrote: > > Ref: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111632 > > When building gcc's C++ sources against recent libc++, the poisoning of > the ctype macros due to including safe-ctype.h

Re: [PATCH] Fortran: Fix incompatible types between INTEGER(8) and TYPE(c_ptr)

2023-10-26 Thread tobias.bur...@siemens.com
Missed that, sorry. Please move the test to gfortran.dg/gomp/ — those tests are automatically compiled with -fopenmp, hence, no need for dg-(additional-)options. Not applicable here, but tests that use omp.h or "use omp_lib" or the runtime have to be under libgomp/testsuite - or, for compile

[PATCH] [range-op] Remove unused variable in fold_range.

2023-10-26 Thread Aldy Hernandez
Missed this... gcc/ChangeLog: * range-op-float.cc (range_operator::fold_range): Delete unused variable. --- gcc/range-op-float.cc | 1 - 1 file changed, 1 deletion(-) diff --git a/gcc/range-op-float.cc b/gcc/range-op-float.cc index ffa3dec133e..75816942f8c 100644 ---

[COMMITTED] [range-ops] Add frange& argument to rv_fold.

2023-10-26 Thread Aldy Hernandez
The floating point version of rv_fold returns its result in 3 pieces: the lower bound, the upper bound, and a maybe_nan bit. It is cleaner to return everything in an frange, thus bringing the floating point version of rv_fold in line with the integer version. This first patch adds an frange

[COMMITTED] [range-ops] Remove unneeded parameters from rv_fold.

2023-10-26 Thread Aldy Hernandez
Now that the floating point version of rv_fold calculates its result in an frange, we can remove the superfluous LB, UB, and MAYBE_NAN arguments. gcc/ChangeLog: * range-op-float.cc (range_operator::fold_range): Remove superfluous code. (range_operator::rv_fold): Remove

Re: [PATCH] Fortran: Fix incompatible types between INTEGER(8) and TYPE(c_ptr)

2023-10-26 Thread Thomas Schwinge
Hi PA! On 2023-10-26T18:28:07+0200, Paul-Antoine Arras wrote: > On 26/10/2023 18:16, you wrote: >> On 2023-10-26T13:24:04+0200, Paul-Antoine Arras >> wrote: >>> --- /dev/null >>> +++ b/gcc/testsuite/gfortran.dg/c_ptr_tests_20.f90 >>> @@ -0,0 +1,57 @@ >>> +! { dg-do compile } >>> +! {

Re: [PATCH] libcpp: Improve the diagnostic for poisoned identifiers [PR36887]

2023-10-26 Thread Christophe Lyon
On Thu, 26 Oct 2023 at 18:18, Lewis Hyatt wrote: > > On Thu, Oct 26, 2023 at 4:49 AM Christophe Lyon > wrote: > > We have noticed that the new tests fail on aarch64 with: > > .../aarch64-unknown-linux-gnu/libc/usr/lib/crt1.o: in function `_start': > >

Re: HELP: Will the reordering happen? Re: [V3][PATCH 0/3] New attribute "counted_by" to annotate bounds for C99 FAM(PR108896)

2023-10-26 Thread Martin Uecker
Am Donnerstag, dem 26.10.2023 um 09:13 -0700 schrieb Kees Cook: > On Thu, Oct 26, 2023 at 10:15:10AM +0200, Martin Uecker wrote: > > but not this: > > x->count = 11; > > char *p = >buf; > > x->count = 1; > > p[10] = 1; // ! > > This seems fine to me -- it's how I'd expect it to work: "10" is

Re: [PATCH v4] bpf: Improvements in CO-RE builtins implementation.

2023-10-26 Thread David Faust
On 10/26/23 08:08, Cupertino Miranda wrote: > > Changes from v1: > - Fixed Davids remarks on initial patch. > - Fixed mistake with deleted '*'. > > Changes from v2: > - Reversed return value for bpf_const_not_ok_for_debug_p function. Hmm.. > +static bool > +bpf_const_not_ok_for_debug_p

Re: [PATCH] Improve tree_expr_nonnegative_p by using the ranger [PR111959]

2023-10-26 Thread Mikael Morin
Le 26/10/2023 à 11:29, Richard Biener a écrit : On Wed, Oct 25, 2023 at 5:51 AM Andrew Pinski wrote: diff --git a/gcc/fold-const.cc b/gcc/fold-const.cc index 40767736389..2a2a90230f5 100644 --- a/gcc/fold-const.cc +++ b/gcc/fold-const.cc @@ -15047,15 +15047,33 @@

Re: HELP: Will the reordering happen? Re: [V3][PATCH 0/3] New attribute "counted_by" to annotate bounds for C99 FAM(PR108896)

2023-10-26 Thread Qing Zhao
> On Oct 26, 2023, at 5:20 AM, Martin Uecker wrote: > > Am Donnerstag, dem 26.10.2023 um 10:45 +0200 schrieb Richard Biener: >> On Wed, Oct 25, 2023 at 8:16 PM Martin Uecker wrote: >>> >>> Am Mittwoch, dem 25.10.2023 um 13:13 +0200 schrieb Richard Biener: > Am 25.10.2023 um 12:47

Re: [PATCH] Fortran: Fix incompatible types between INTEGER(8) and TYPE(c_ptr)

2023-10-26 Thread Paul-Antoine Arras
Hi Thomas, On 26/10/2023 18:16, you wrote: Hi! On 2023-10-26T13:24:04+0200, Paul-Antoine Arras wrote: --- /dev/null +++ b/gcc/testsuite/gfortran.dg/c_ptr_tests_20.f90 @@ -0,0 +1,57 @@ +! { dg-do compile } +! { dg-additional-options "-fopenmp" } +[...] --- /dev/null +++

[Committed] RISC-V: Pass abi to g++ rvv testsuite

2023-10-26 Thread Patrick O'Neill
On 10/26/23 06:30, Jeff Law wrote: On 10/25/23 18:13, Patrick O'Neill wrote: On rv32gcv testcases like g++.target/riscv/rvv/base/bug-22.C fail with: FAIL: g++.target/riscv/rvv/base/bug-22.C (test for excess errors) Excess errors: cc1plus: error: ABI requires '-march=rv32' This patch adds

Re: [PATCH] libcpp: Improve the diagnostic for poisoned identifiers [PR36887]

2023-10-26 Thread Lewis Hyatt
On Thu, Oct 26, 2023 at 4:49 AM Christophe Lyon wrote: > We have noticed that the new tests fail on aarch64 with: > .../aarch64-unknown-linux-gnu/libc/usr/lib/crt1.o: in function `_start': > .../sysdeps/aarch64/start.S:110:(.text+0x38): undefined reference to `main' > > Looking at the test, I'd

Re: HELP: Will the reordering happen? Re: [V3][PATCH 0/3] New attribute "counted_by" to annotate bounds for C99 FAM(PR108896)

2023-10-26 Thread Martin Uecker
Am Donnerstag, dem 26.10.2023 um 17:48 +0200 schrieb Richard Biener: > > > Am 26.10.2023 um 16:58 schrieb Qing Zhao : > > > >  > > > > > On Oct 26, 2023, at 4:56 AM, Richard Biener > > > wrote: > > > > > > > On Thu, Oct 26, 2023 at 7:22 AM Jakub Jelinek wrote: > > > > > > > > On Wed, Oct

Re: [PATCH] Fortran: Fix incompatible types between INTEGER(8) and TYPE(c_ptr)

2023-10-26 Thread Thomas Schwinge
Hi! On 2023-10-26T13:24:04+0200, Paul-Antoine Arras wrote: > --- /dev/null > +++ b/gcc/testsuite/gfortran.dg/c_ptr_tests_20.f90 > @@ -0,0 +1,57 @@ > +! { dg-do compile } > +! { dg-additional-options "-fopenmp" } > +[...] > --- /dev/null > +++ b/gcc/testsuite/gfortran.dg/c_ptr_tests_21.f90 > @@

Re: HELP: Will the reordering happen? Re: [V3][PATCH 0/3] New attribute "counted_by" to annotate bounds for C99 FAM(PR108896)

2023-10-26 Thread Kees Cook
On Thu, Oct 26, 2023 at 10:15:10AM +0200, Martin Uecker wrote: > but not this: > > char *p = >buf; > x->count = 1; > p[10] = 1; // ! This seems fine to me -- it's how I'd expect it to work: "10" is beyond "1". > (because the pointer is passed around the > store to the counter) > > and also

Re: [PATCH V2 5/7] aarch64: Implement system register r/w arm ACLE intrinsic functions

2023-10-26 Thread Victor Do Nascimento
On 10/26/23 16:23, Richard Sandiford wrote: Victor Do Nascimento writes: On 10/18/23 21:39, Richard Sandiford wrote: Victor Do Nascimento writes: Implement the aarch64 intrinsics for reading and writing system registers with the following signatures: uint32_t __arm_rsr(const

Re: [PATCH v3] gcc: Introduce -fhardened

2023-10-26 Thread Richard Biener
> Am 24.10.2023 um 21:09 schrieb Marek Polacek : > > On Tue, Oct 24, 2023 at 09:22:25AM +0200, Richard Biener wrote: >>> On Mon, Oct 23, 2023 at 9:26 PM Marek Polacek wrote: >>> >>> On Thu, Oct 19, 2023 at 02:24:11PM +0200, Richard Biener wrote: On Wed, Oct 11, 2023 at 10:48 PM Marek

Re: [PATCH] tree-optimization/109334: Improve computation for access attribute

2023-10-26 Thread Richard Biener
> Am 26.10.2023 um 13:51 schrieb Siddhesh Poyarekar : > > On 2023-10-26 04:37, Martin Uecker wrote: >> Hi Sid and Jakub, >> here is the patch discussed in PR 109334. > > I can't approve, but here's a review: Ok Thanks for the review, Richard >> Martin >> tree-optimization/109334:

Re: HELP: Will the reordering happen? Re: [V3][PATCH 0/3] New attribute "counted_by" to annotate bounds for C99 FAM(PR108896)

2023-10-26 Thread Richard Biener
> Am 26.10.2023 um 16:58 schrieb Qing Zhao : > >  > >> On Oct 26, 2023, at 4:56 AM, Richard Biener >> wrote: >> >>> On Thu, Oct 26, 2023 at 7:22 AM Jakub Jelinek wrote: >>> >>> On Wed, Oct 25, 2023 at 07:03:43PM +, Qing Zhao wrote: For the code generation impact:

hardcfr: support checking at abnormal edges [PR111943]

2023-10-26 Thread Alexandre Oliva
Control flow redundancy may choose abnormal edges for early checking, but that breaks because we can't insert checks on such edges. Introduce conditional checking on the dest block of abnormal edges, and leave it for the optimizer to drop the conditional. Also, oops, I noticed the new files

Re: [PATCH] aarch64: Add basic target_print_operand support for CONST_STRING

2023-10-26 Thread Richard Sandiford
Victor Do Nascimento writes: > Motivated by the need to print system register names in output > assembly, this patch adds the required logic to > `aarch64_print_operand' to accept rtxs of type CONST_STRING and > process these accordingly. > > Consequently, an rtx such as: > > (set (reg/i:DI 0

Re: [PATCH V2 7/7] aarch64: Add system register duplication check selftest

2023-10-26 Thread Richard Sandiford
Victor Do Nascimento writes: > On 10/18/23 22:30, Richard Sandiford wrote: >> Victor Do Nascimento writes: >>> Add a build-time test to check whether system register data, as >>> imported from `aarch64-sys-reg.def' has any duplicate entries. >>> >>> Duplicate entries are defined as any two

Re: [PATCH] testsuite: Allow general skips/requires in PCH tests

2023-10-26 Thread Mike Stump
On Oct 26, 2023, at 5:34 AM, Richard Sandiford wrote: > dg-pch.exp handled dg-require-effective-target pch_supported_debug > as a special case, by grepping the source code. This patch tries > to generalise it to other dg-require-effective-targets, and to > dg-skip-if. > > There also seemed to

Re: [PATCH V2 5/7] aarch64: Implement system register r/w arm ACLE intrinsic functions

2023-10-26 Thread Richard Sandiford
Victor Do Nascimento writes: > On 10/18/23 21:39, Richard Sandiford wrote: >> Victor Do Nascimento writes: >>> Implement the aarch64 intrinsics for reading and writing system >>> registers with the following signatures: >>> >>> uint32_t __arm_rsr(const char *special_register); >>>

Re: [PATCH V2 2/7] aarch64: Add support for aarch64-sys-regs.def

2023-10-26 Thread Richard Sandiford
Thanks for the updates. Victor Do Nascimento writes: > On 10/18/23 22:07, Richard Sandiford wrote: >> Victor Do Nascimento writes: >>> This patch defines the structure of a new .def file used for >>> representing the aarch64 system registers, what information it should >>> hold and the basic

Re: [PATCH V2 7/7] aarch64: Add system register duplication check selftest

2023-10-26 Thread Victor Do Nascimento
On 10/18/23 22:30, Richard Sandiford wrote: Victor Do Nascimento writes: Add a build-time test to check whether system register data, as imported from `aarch64-sys-reg.def' has any duplicate entries. Duplicate entries are defined as any two SYSREG entries in the .def file which share the

[pushed] Darwin: Make metadata symbol lables linker-visible for GNU objc.

2023-10-26 Thread Iain Sandoe
Tested on x86_64-darwin, x86_64-linux-gnu, pushed to trunk, thanks Iain --- 8< --- Now we have shifted to using the same relocation mechanism as clang for objective-c typeinfo the static linker needs to have a linker-visible symbol for metadata names (this is only needed for GNU objective C, for

[PATCH v4] bpf: Improvements in CO-RE builtins implementation.

2023-10-26 Thread Cupertino Miranda
Changes from v1: - Fixed Davids remarks on initial patch. - Fixed mistake with deleted '*'. Changes from v2: - Reversed return value for bpf_const_not_ok_for_debug_p function. Changes from v3: - Fixed ICE in two bpf-next tests: - if (!wi->is_lhs) -

Re: [PATCH V2 5/7] aarch64: Implement system register r/w arm ACLE intrinsic functions

2023-10-26 Thread Victor Do Nascimento
On 10/18/23 21:39, Richard Sandiford wrote: Victor Do Nascimento writes: Implement the aarch64 intrinsics for reading and writing system registers with the following signatures: uint32_t __arm_rsr(const char *special_register); uint64_t __arm_rsr64(const char

Re: HELP: Will the reordering happen? Re: [V3][PATCH 0/3] New attribute "counted_by" to annotate bounds for C99 FAM(PR108896)

2023-10-26 Thread Qing Zhao
> On Oct 26, 2023, at 4:56 AM, Richard Biener > wrote: > > On Thu, Oct 26, 2023 at 7:22 AM Jakub Jelinek wrote: >> >> On Wed, Oct 25, 2023 at 07:03:43PM +, Qing Zhao wrote: >>> For the code generation impact: >>> >>> turning the original x.buf >>> to a builtin function call >>>

  1   2   >