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

2023-10-23 Thread Martin Uecker
Am Montag, dem 23.10.2023 um 16:37 + schrieb Qing Zhao: > > > On Oct 23, 2023, at 11:57 AM, Richard Biener > > wrote: > > > > > > > > > Am 23.10.2023 um 16:56 schrieb Qing Zhao : > > > > > >  > > > > > > > On Oct 23, 2023, at 3:57 AM, Richard Biener > > > > wrote: > > > > > > > > >

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

2023-10-23 Thread Siddhesh Poyarekar
On 2023-10-23 14:06, Martin Uecker wrote: We should aim for a good integration with the BDOS pass, so that it can propagate the information further, e.g. the following should work: struct { int L; char buf[] __counted_by(L) } x; x.L = N; x.buf = ...; char *p = >f; __bdos(p) -> N So we need to

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

2023-10-23 Thread Martin Uecker
Am Montag, dem 23.10.2023 um 19:00 + schrieb Qing Zhao: > > > On Oct 23, 2023, at 2:31 PM, Martin Uecker wrote: > > > > Am Montag, dem 23.10.2023 um 20:06 +0200 schrieb Martin Uecker: > > > Am Montag, dem 23.10.2023 um 16:37 + schrieb Qing Zhao: > > > > > > > > > On Oct 23, 2023, at

Go patch committed: Add Expression::is_untyped method

2023-10-23 Thread Ian Lance Taylor
This Go frontend patches adds an Expression::is_untyped method. This method is not currently used by anything, but it will be used by later changes in this series. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed to mainline. Ian ac50e9b72bf9bb6d5b28096bb164fb050db6e290 diff

Re: Re: [PATCH V3 00/11] Refactor and cleanup vsetvl pass

2023-10-23 Thread 钟居哲
I didn't reproduce it. How to enable RTL checking ? juzhe.zh...@rivai.ai From: Patrick O'Neill Date: 2023-10-24 06:46 To: 钟居哲; 丁乐华 CC: kito.cheng; rdapp.gcc; palmer; Jeff Law; gcc-patches Subject: Re: [PATCH V3 00/11] Refactor and cleanup vsetvl pass You're on top of it - thanks for fixing

[PATCH] match: Fix the `popcnt(a) + popcnt(a|b)` patthern for types [PR111913]

2023-10-23 Thread Andrew Pinski
So this pattern needs a little help on the gimple side of things to know what the type popcount should be. For most builtins, the type is the same as the input but popcount and others are not. And when using it with another outer expression, genmatch needs some slight help to know that the

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

2023-10-23 Thread Frager, Neal
> Le 23 oct. 2023 à 18:40, Michael Eager a écrit : > > On 10/22/23 22:48, Neal Frager wrote: >> There is a microblaze cpu version 10.0 included in versal. If the >> minor version is only a single digit, then the version comparison >> will fail as version 10.0 will appear as 100 compared to

[PATCH v3] gcc: Introduce -fhardened

2023-10-23 Thread Marek Polacek
On Thu, Oct 19, 2023 at 02:24:11PM +0200, Richard Biener wrote: > On Wed, Oct 11, 2023 at 10:48 PM Marek Polacek wrote: > > > > On Tue, Sep 19, 2023 at 10:58:19AM -0400, Marek Polacek wrote: > > > On Mon, Sep 18, 2023 at 08:57:39AM +0200, Richard Biener wrote: > > > > On Fri, Sep 15, 2023 at 5:09 

RE: [PATCH 12/19]middle-end: implement loop peeling and IV updates for early break.

2023-10-23 Thread Tamar Christina
> -Original Message- > From: Richard Biener > Sent: Friday, July 14, 2023 2:35 PM > To: Tamar Christina > Cc: gcc-patches@gcc.gnu.org; nd ; j...@ventanamicro.com > Subject: RE: [PATCH 12/19]middle-end: implement loop peeling and IV > updates for early break. > > On Thu, 13 Jul 2023,

Re: [PATCH V3 00/11] Refactor and cleanup vsetvl pass

2023-10-23 Thread Patrick O'Neill
Hi Lehua, This patch causes a build failure with newlib 4.1.0 with -march=rv64gv_zbb. I've creduced the failure here: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111941 Thanks, Patrick On 10/19/23 20:58, Lehua Ding wrote: Committed, thanks Patrick and Juzhe. On 2023/10/20 2:04, Patrick

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

2023-10-23 Thread Qing Zhao
> On Oct 23, 2023, at 2:43 PM, Siddhesh Poyarekar wrote: > > On 2023-10-23 14:06, Martin Uecker wrote: >> We should aim for a good integration with the BDOS pass, so >> that it can propagate the information further, e.g. the >> following should work: >> struct { int L; char buf[]

Re: [V3][PATCH 0/3] New attribute "counted_by" to annotate bounds for C99 FAM(PR108896)

2023-10-23 Thread Martin Uecker
Am Montag, dem 23.10.2023 um 12:52 -0700 schrieb Kees Cook: > On Fri, Oct 20, 2023 at 09:54:05PM +0200, Martin Uecker wrote: > > Am Freitag, dem 20.10.2023 um 18:48 + schrieb Qing Zhao: > > > > > > > On Oct 20, 2023, at 2:34 PM, Kees Cook wrote: > > > > > > > > On Fri, Oct 20, 2023 at

Re: [V3][PATCH 0/3] New attribute "counted_by" to annotate bounds for C99 FAM(PR108896)

2023-10-23 Thread Kees Cook
On Mon, Oct 23, 2023 at 09:57:45PM +0200, Martin Uecker wrote: > Am Montag, dem 23.10.2023 um 12:52 -0700 schrieb Kees Cook: > > On Fri, Oct 20, 2023 at 09:54:05PM +0200, Martin Uecker wrote: > > > Am Freitag, dem 20.10.2023 um 18:48 + schrieb Qing Zhao: > > > > > > > > > On Oct 20, 2023, at

Re: [PATCH V3 00/11] Refactor and cleanup vsetvl pass

2023-10-23 Thread Patrick O'Neill
When configuring, pass in --enable-checking=rtl If you're using riscv-gnu-toolchain, pass in --enable-gcc-checking=rtl The -freport-bug output attached to the bug report has the full configure command used: /scratch/tc-testing/tc-trunk/build-rtl-checking/../gcc/configure

Re: [PATCH v23 03/33] c++: Accept the use of built-in trait identifiers

2023-10-23 Thread Jason Merrill
On 10/20/23 09:53, Ken Matsui wrote: This patch accepts the use of built-in trait identifiers when they are actually not used as traits. Specifically, we check if the subsequent token is '(' for ordinary built-in traits or is '<' only for the special __type_pack_element built-in trait. If

Re: [PATCH v23 03/33] c++: Accept the use of built-in trait identifiers

2023-10-23 Thread Ken Matsui
On Mon, Oct 23, 2023 at 1:36 PM Jason Merrill wrote: > > On 10/20/23 09:53, Ken Matsui wrote: > > This patch accepts the use of built-in trait identifiers when they are > > actually not used as traits. Specifically, we check if the subsequent token > > is '(' for ordinary built-in traits or is

Go patch committed: Pass Gogo to Runtime::make_call

2023-10-23 Thread Ian Lance Taylor
This Go frontend patches passes the Gogo IR pointer to Runtime::make_call. This is a boilerplate change that doesn't affect compiler output. It's not currently used but will be used by later CLs in this series. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed to mainline.

Re: [PATCH v23 02/33] c-family, c++: Look up built-in traits via identifier node

2023-10-23 Thread Ken Matsui
On Mon, Oct 23, 2023 at 1:27 PM Jason Merrill wrote: > > On 10/20/23 09:53, Ken Matsui wrote: > > Since RID_MAX soon reaches 255 and all built-in traits are used > > approximately > > once in a C++ translation unit, this patch removes all RID values for > > built-in > > These two lines are too

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

2023-10-23 Thread Qing Zhao
> On Oct 23, 2023, at 2:31 PM, Martin Uecker wrote: > > Am Montag, dem 23.10.2023 um 20:06 +0200 schrieb Martin Uecker: >> Am Montag, dem 23.10.2023 um 16:37 + schrieb Qing Zhao: >>> On Oct 23, 2023, at 11:57 AM, Richard Biener wrote: > Am 23.10.2023 um

Re: [PATCH v23 02/33] c-family, c++: Look up built-in traits via identifier node

2023-10-23 Thread Jason Merrill
On 10/20/23 09:53, Ken Matsui wrote: Since RID_MAX soon reaches 255 and all built-in traits are used approximately once in a C++ translation unit, this patch removes all RID values for built-in These two lines are too long; please wrap at 75 columns so they don't go over 80 when git log adds

Go patch committed: Make xx_constant_value methods non-const

2023-10-23 Thread Ian Lance Taylor
This patch to the Go frontend changes the Expression {numeric,string,boolean}_constant_value methods to be non-const. This does not affect anything immediately, but will be useful for later CLs in this series. The only real effect is to Builtin_call_expression::do_export, which remains const and

Re: [V3][PATCH 0/3] New attribute "counted_by" to annotate bounds for C99 FAM(PR108896)

2023-10-23 Thread Qing Zhao
> On Oct 20, 2023, at 3:54 PM, Martin Uecker wrote: > > Am Freitag, dem 20.10.2023 um 18:48 + schrieb Qing Zhao: >> >>> On Oct 20, 2023, at 2:34 PM, Kees Cook wrote: >>> >>> On Fri, Oct 20, 2023 at 11:50:11AM +0200, Martin Uecker wrote: Am Donnerstag, dem 19.10.2023 um 16:33 -0700

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

2023-10-23 Thread Martin Uecker
Am Montag, dem 23.10.2023 um 20:06 +0200 schrieb Martin Uecker: > Am Montag, dem 23.10.2023 um 16:37 + schrieb Qing Zhao: > > > > > On Oct 23, 2023, at 11:57 AM, Richard Biener > > > wrote: > > > > > > > > > > > > > Am 23.10.2023 um 16:56 schrieb Qing Zhao : > > > > > > > >  > > > > >

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

2023-10-23 Thread Martin Uecker
Am Montag, dem 23.10.2023 um 14:43 -0400 schrieb Siddhesh Poyarekar: > On 2023-10-23 14:06, Martin Uecker wrote: > > We should aim for a good integration with the BDOS pass, so > > that it can propagate the information further, e.g. the > > following should work: > > > > struct { int L; char

Re: [V3][PATCH 0/3] New attribute "counted_by" to annotate bounds for C99 FAM(PR108896)

2023-10-23 Thread Kees Cook
On Fri, Oct 20, 2023 at 09:54:05PM +0200, Martin Uecker wrote: > Am Freitag, dem 20.10.2023 um 18:48 + schrieb Qing Zhao: > > > > > On Oct 20, 2023, at 2:34 PM, Kees Cook wrote: > > > > > > On Fri, Oct 20, 2023 at 11:50:11AM +0200, Martin Uecker wrote: > > > > Am Donnerstag, dem 19.10.2023

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

2023-10-23 Thread Qing Zhao
> On Oct 23, 2023, at 3:37 PM, Martin Uecker wrote: > > Am Montag, dem 23.10.2023 um 19:00 + schrieb Qing Zhao: >> >>> On Oct 23, 2023, at 2:31 PM, Martin Uecker wrote: >>> >>> Am Montag, dem 23.10.2023 um 20:06 +0200 schrieb Martin Uecker: Am Montag, dem 23.10.2023 um 16:37 +

Re: [PATCH v23 32/33] c++: Implement __is_invocable built-in trait

2023-10-23 Thread Jason Merrill
On 10/20/23 17:37, Patrick Palka wrote: On Fri, 20 Oct 2023, Patrick Palka wrote: On Fri, 20 Oct 2023, Patrick Palka wrote: On Fri, 20 Oct 2023, Ken Matsui wrote: This patch implements built-in trait for std::is_invocable. Nice! My email client unfortunately ate my first review attempt,

Re: Re: [PATCH V3 00/11] Refactor and cleanup vsetvl pass

2023-10-23 Thread 钟居哲
I have fixed it: https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=0c4bd1321a6def5eb44c530e83b01a415633b660 Plz verify it and send a patch with testcase pr111941.c if you confirm it has been fixed on the trunk. Thanks. juzhe.zh...@rivai.ai From: Patrick O'Neill Date: 2023-10-24 02:30 To: Lehua

Re: [PATCH V3 00/11] Refactor and cleanup vsetvl pass

2023-10-23 Thread Patrick O'Neill
You're on top of it - thanks for fixing this! I'll send the testcase. Unrelated to this failure, I'm seeing a build failure on glibc rv32/64gcv when RTL checking is enabled. https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111947 Thanks, Patrick On 10/23/23 14:41, 钟居哲 wrote: I have fixed 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-23 Thread Siddhesh Poyarekar
On 2023-10-23 15:43, Qing Zhao wrote: On Oct 23, 2023, at 2:43 PM, Siddhesh Poyarekar wrote: On 2023-10-23 14:06, Martin Uecker wrote: We should aim for a good integration with the BDOS pass, so that it can propagate the information further, e.g. the following should work: struct { int L;

[PATCH v1] RISC-V: Remove unnecessary asm check for binop constraint

2023-10-23 Thread pan2 . li
From: Pan Li The vsetvl asm check is unnecessary for the binop constraint. We should be focus for constrait and leave the vsetvl test to the vsetvl pass. gcc/testsuite/ChangeLog: * gcc.target/riscv/rvv/base/binop_vv_constraint-1.c: Remove the vsetvl asm check from func body.

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

2023-10-23 Thread Richard Biener
On Fri, Oct 20, 2023 at 10:41 PM Qing Zhao wrote: > > > > > On Oct 20, 2023, at 3:10 PM, Siddhesh Poyarekar wrote: > > > > On 2023-10-20 14:38, Qing Zhao wrote: > >> How about the following: > >> Add one more parameter to __builtin_dynamic_object_size(), i.e > >> __builtin_dynamic_object_size

RE: [PATCH v1] RISC-V: Bugfix for merging undef tmp register for trunc

2023-10-23 Thread Li, Pan2
Committed, thanks Juzhe. Pan From: juzhe.zh...@rivai.ai Sent: Monday, October 23, 2023 3:56 PM To: Li, Pan2 ; gcc-patches Cc: Li, Pan2 ; Wang, Yanzhang ; kito.cheng Subject: Re: [PATCH v1] RISC-V: Bugfix for merging undef tmp register for trunc LGTM。

Re: [PATCH] middle-end: don't keep .MEM guard nodes for PHI nodes who dominate loop [PR111860]

2023-10-23 Thread Richard Biener
On Fri, 20 Oct 2023, Tamar Christina wrote: > Hi All, > > The previous patch tried to remove PHI nodes that dominated the first loop, > however the correct fix is to only remove .MEM nodes. > > This patch thus makes the condition a bit stricter and only tries to remove > MEM phi nodes. > > I

[PATCH] Support vec_cmpmn/vcondmn for v2hf/v4hf.

2023-10-23 Thread liuhongt
Bootstrapped and regtested on x86_64-pc-linux-gnu{-m32,}. Ready push to trunk. gcc/ChangeLog: PR target/103861 * config/i386/i386-expand.cc (ix86_expand_sse_movcc): Handle V2HF/V2BF/V4HF/V4BFmode. * config/i386/mmx.md (vec_cmpv4hfqi): New expander.

[Committed] RISC-V: Fix typo[VSETVL PASS]

2023-10-23 Thread Juzhe-Zhong
When fixing an issue, I find there is a typo in VSETVL PASS. Change 'use_by' into 'used_by'. Committed it as it is very obvious. gcc/ChangeLog: * config/riscv/riscv-vsetvl.cc (pre_vsetvl::fuse_local_vsetvl_info): Fix typo. (pre_vsetvl::pre_global_vsetvl_info): Ditto. ---

Pushed: [PATCH 0/5] LoongArch: Better balance between relaxation and scheduling

2023-10-23 Thread Xi Ruoyao
Pushed r14-{4848..4852}. On Thu, 2023-10-19 at 22:02 +0800, Xi Ruoyao wrote: > For relaxation we are now generating assembler macros for symbolic > addresses everywhere, but this is limiting scheduling and there are > known situations where the relaxation cannot improve the code. > > 1. When we

Re: [PATCH] convert_to_complex vs invalid_conversion [PR111903]

2023-10-23 Thread Richard Biener
On Sat, Oct 21, 2023 at 8:07 PM Andrew Pinski wrote: > > convert_to_complex when creating a COMPLEX_EXPR does > not currently check if either the real or imag parts > was not error_mark_node. This later on confuses the gimpilfier > when there was a SAVE_EXPR wrapped around that COMPLEX_EXPR. >

[PATCH v2] gcc.c-torture/execute/builtins/fputs.c: fputs_unlocked prototype

2023-10-23 Thread Florian Weimer
Current glibc headers only declare fputs_unlocked for _GNU_SOURCE, so define it to obtain an official prototype. Add a fallback prototype declaration for other systems that do not have fputs_unlocked. This seems to the most straightforward approach to avoid an implicit function declaration,

Re: [PATCH v9 4/4] ree: Improve ree pass for rs6000 target using defined ABI interfaces

2023-10-23 Thread Ajit Agarwal
Hello All: Addressed below review comments in the version 11 of the patch. Please review and please let me know if its ok for trunk. Thanks & Regards Ajit On 22/10/23 12:56 am, rep.dot@gmail.com wrote: > On 21 October 2023 01:56:16 CEST, Vineet Gupta wrote: >> On 10/19/23 23:50, Ajit

Re: [PATCHv2] move the (a-b) CMP 0 ? (a-b) : (b-a) optimization from fold_cond_expr_with_comparison to match

2023-10-23 Thread Richard Biener
On Sun, Oct 22, 2023 at 2:13 AM Andrew Pinski wrote: > > From: Andrew Pinski > > This patch moves the `(a-b) CMP 0 ? (a-b) : (b-a)` optimization > from fold_cond_expr_with_comparison to match. > > Bootstrapped and tested on x86_64-linux-gnu. OK. > Changes in: > v2: Removes `(a == b) ? 0 : (b -

Re: [PATCH] vect: Cost adjacent vector loads/stores together [PR111784]

2023-10-23 Thread Kewen.Lin
Hi Richard, on 2023/10/20 06:12, Richard Sandiford wrote: > "Kewen.Lin" writes: >> Hi, >> >> As comments[1][2], this patch is to change the costing way >> on some adjacent vector loads/stores from costing one by >> one to costing them together with the total number once. >> >> It helps to fix

[PATCH 4/4] RISC-V: Fix ICE by expansion and register coercion

2023-10-23 Thread Tsukasa OI
From: Tsukasa OI A "prefetch" instruction on RISC-V GCC emits a machine hint instruction directly when the 'Zicbop' extension is enabled but it could cause an ICE when the address argument of __builtin_prefetch is an integral constant (such like 0 [NULL] or some other [but possibly not all]

[PATCH 3/4] RISC-V: Add not broken RW prefetch RTL instructions without offsets

2023-10-23 Thread Tsukasa OI
From: Tsukasa OI To prepare adding new not broken prefetch built-in functions and fixing an ICE in __builtin_prefetch, this commit adds two new instructions, each corresponding a 'Zicbop' prefetch hint instruction, but with no specifiable offset field for simplicity. This commit also excludes

Re: [PATCH 1/5] Remove obsolete debugging formats from names list

2023-10-23 Thread Richard Biener
On Mon, Oct 23, 2023 at 2:56 AM Mark Harmstone wrote: > > STABS and xcoff have been removed, but are still in debug_type_names, > which ought to match debug_type_masks. This results in the following > minor bug with GCC 13: > > $ x86_64-pc-linux-gnu-gcc -gvms -c tmp.c > cc1: error: target system

Re: [PATCH v1] RISC-V: Bugfix for merging undef tmp register for trunc

2023-10-23 Thread juzhe.zh...@rivai.ai
LGTM。 juzhe.zh...@rivai.ai From: pan2.li Date: 2023-10-23 15:53 To: gcc-patches CC: juzhe.zhong; pan2.li; yanzhang.wang; kito.cheng Subject: [PATCH v1] RISC-V: Bugfix for merging undef tmp register for trunc From: Pan Li For trunc function autovec, there will be one step like below take MU

[PING ^1][PATCH v2] rs6000: Add new pass for replacement of contiguous addresses vector load lxv with lxvp

2023-10-23 Thread Ajit Agarwal
Ping ^1. Forwarded Message Subject: [PING ^0][PATCH v2] rs6000: Add new pass for replacement of contiguous addresses vector load lxv with lxvp Date: Sun, 15 Oct 2023 17:43:24 +0530 From: Ajit Agarwal To: gcc-patches CC: Segher Boessenkool , Kewen.Lin , Peter Bergner

Re: [PATCH] gcc.c-torture/execute/builtins/fputs.c: Define _GNU_SOURCE

2023-10-23 Thread Florian Weimer
* Andrew Pinski: > On Sun, Oct 22, 2023 at 12:47 AM Florian Weimer wrote: >> >> Current glibc headers only declare fputs_unlocked for _GNU_SOURCE. >> Defining the macro avoids an implicit function declaration. > > This does not help targets that don't use glibc though. > Note for builtins

[PATCH V11] ree: Improve ree pass using defined abi interfaces

2023-10-23 Thread Ajit Agarwal
Hello Vineet, Jeff and Bernhard: This version 11 of the patch uses abi interfaces to remove zero and sign extension elimination. Bootstrapped and regtested on powerpc-linux-gnu. In this version (version 11) of the patch following review comments are incorporated. a) Removal of hard code

[PATCH 0/4] RISC-V: Fix 'Zicbop'-related bugs (fix ICE and remove broken built-in)

2023-10-23 Thread Tsukasa OI
Hello, As I explained earlier: , the builtin function for RISC-V "__builtin_riscv_zicbop_cbo_prefetchi" is completely broken and should be removed. Also, I noted that:

[PATCH 1/4] RISC-V: Recategorize "prefetch" availabilities

2023-10-23 Thread Tsukasa OI
From: Tsukasa OI Because they are for all prefetch instructions, "prefetch" fits better than "prefetchi". gcc/ChangeLog: * config/riscv/riscv-builtins.cc: Rename availabilities "prefetchi{32,64}" to "prefetch{32,64}". * config/riscv/riscv-cmo.def

[PATCH 2/4] RISC-V: Remove broken __builtin_riscv_zicbop_cbo_prefetchi

2023-10-23 Thread Tsukasa OI
From: Tsukasa OI __builtin_riscv_zicbop_cbo_prefetchi (corresponding "prefetch.i" instruction from the 'Zicbop' extension) is completely broken (not even functional) and should be removed rather than fixing it because it has no good way to "fix" this built-in function. gcc/ChangeLog: *

Re: [PATCH] Use error_mark_node after error in convert

2023-10-23 Thread Richard Biener
On Mon, Oct 23, 2023 at 12:22 AM Andrew Pinski wrote: > > While working on PR c/111903, I Noticed that > convert will convert integer_zero_node to that > type after an error instead of returning error_mark_node. > From what I can tell this was the old way of not having > error recovery since

[PATCH v1] RISC-V: Bugfix for merging undef tmp register for trunc

2023-10-23 Thread pan2 . li
From: Pan Li For trunc function autovec, there will be one step like below take MU for the merge operand. rtx tmp = gen_reg_rtx (vec_int_mode); emit_vec_cvt_x_f_rtz (tmp, op_1, mask, vec_fp_mode); The MU will leave the tmp (aka dest register) register unmasked elements unchanged and it is

Re: [PATCH] [PR111520] set hardcmp eh probs (was: rename make_eh_edges to make_eh_edge)

2023-10-23 Thread Richard Biener
On Sat, Oct 21, 2023 at 9:17 AM Alexandre Oliva wrote: > > On Oct 20, 2023, Richard Biener wrote: > > >> * tree-eh.h (make_eh_edges): Rename to... > >> (make_eh_edge): ... this. > >> * tree-eh.cc: Likewise. Adjust all callers. > > Once the above goes in (it depends on the strub monster patch),

Re: [PATCH 01/22] Add condition coverage profiling

2023-10-23 Thread Richard Biener
On Sat, 21 Oct 2023, J?rgen Kvalsvik wrote: > On 05/10/2023 22:39, J?rgen Kvalsvik wrote: > > On 05/10/2023 21:59, Jan Hubicka wrote: > >>> > >>> Like Wahlen et al this implementation records coverage in fixed-size > >>> bitsets which gcov knows how to interpret. This is very fast, but > >>>

[PATCH] RISC-V: Fix ICE for the fusion case from vsetvl to scalar move[PR111927]

2023-10-23 Thread Juzhe-Zhong
ICE: during RTL pass: vsetvl : In function 'riscv_lms_f32': :240:1: internal compiler error: in merge, at config/riscv/riscv-vsetvl.cc:1997 240 | } In general compatible_p (avl_equal_p) has: if (next.has_vl () && next.vl_used_by_non_rvv_insn_p ()) return false; Don't fuse AVL of

[PATCH] LoongArch:Enable vcond_mask_mn expanders for SF/DF modes.

2023-10-23 Thread Jiahao Xu
If the vcond_mask patterns don't support fp modes, the vector FP comparison instructions will not be generated. gcc/ChangeLog: * config/loongarch/lasx.md (vcond_mask_): Change to (vcond_mask_): this. * config/loongarch/lsx.md (vcond_mask_): Change to

[PATCH V2] RISC-V: Fix ICE for the fusion case from vsetvl to scalar move[PR111927]

2023-10-23 Thread Juzhe-Zhong
ICE: during RTL pass: vsetvl : In function 'riscv_lms_f32': :240:1: internal compiler error: in merge, at config/riscv/riscv-vsetvl.cc:1997 240 | } In general compatible_p (avl_equal_p) has: if (next.has_vl () && next.vl_used_by_non_rvv_insn_p ()) return false; Don't fuse AVL of

Re: [PATCH V2] RISC-V: Fix ICE for the fusion case from vsetvl to scalar move[PR111927]

2023-10-23 Thread Kito Cheng
LGTM Juzhe-Zhong 於 2023年10月23日 週一 17:41 寫道: > ICE: > > during RTL pass: vsetvl > : In function 'riscv_lms_f32': > :240:1: internal compiler error: in merge, at > config/riscv/riscv-vsetvl.cc:1997 > 240 | } > > In general compatible_p (avl_equal_p) has: > > if (next.has_vl () &&

[PATCH] LoongArch:Enable vcond_mask_mn expanders for SF/DF modes.

2023-10-23 Thread Jiahao Xu
If the vcond_mask patterns don't support fp modes, the vector FP comparison instructions will not be generated. gcc/ChangeLog: * config/loongarch/lasx.md (vcond_mask_): Change to (vcond_mask_): this. * config/loongarch/lsx.md (vcond_mask_): Change to

[PATCH] LoongArch:Enable vcond_mask_mn expanders for SF/DF modes.

2023-10-23 Thread Jiahao Xu
If the vcond_mask patterns don't support fp modes, the vector FP comparison instructions will not be generated. gcc/ChangeLog: * config/loongarch/lasx.md (vcond_mask_): Change to (vcond_mask_): this. * config/loongarch/lsx.md (vcond_mask_): Change to

RE: [PATCH V2] RISC-V: Fix ICE for the fusion case from vsetvl to scalar move[PR111927]

2023-10-23 Thread Li, Pan2
Committed, thanks Kito. Pan From: Kito Cheng Sent: Monday, October 23, 2023 5:50 PM To: Juzhe-Zhong Cc: GCC Patches ; Kito Cheng ; Jeff Law ; Robin Dapp Subject: Re: [PATCH V2] RISC-V: Fix ICE for the fusion case from vsetvl to scalar move[PR111927] LGTM Juzhe-Zhong

[PATCH] tree-optimization/111917 - bougs IL after guard hoisting

2023-10-23 Thread Richard Biener
The unswitching code to hoist guards inserts conditions in wrong places. The following fixes this, simplifying code. Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed. PR tree-optimization/111917 * tree-ssa-loop-unswitch.cc (hoist_guard): Always insert new

Re: [PATCH][WIP] libiberty: Support for relocation output

2023-10-23 Thread Jan Hubicka
> This patch teaches libiberty to output X86-64 Relocations. Hello, for actual patch submission you will need to add changelog :) > diff --git a/libiberty/simple-object-elf.c b/libiberty/simple-object-elf.c > index 86b7a27dc74..0bbaf4b489f 100644 > --- a/libiberty/simple-object-elf.c > +++

[PATCH v1] RISC-V: Remove unnecessary asm check for vec cvt

2023-10-23 Thread pan2 . li
From: Pan Li The vsetvl asm check is unnecessary for the vector convert. We should be focus for constrait and leave the vsetvl test to the vsetvl pass. gcc/testsuite/ChangeLog: * gcc.target/riscv/rvv/autovec/unop/cvt-0.c: Remove the vsetvl asm check from func body. *

Re: [PATCH v1] RISC-V: Remove unnecessary asm check for vec cvt

2023-10-23 Thread juzhe.zh...@rivai.ai
LGTM。 juzhe.zh...@rivai.ai From: pan2.li Date: 2023-10-23 17:54 To: gcc-patches CC: juzhe.zhong; pan2.li; yanzhang.wang; kito.cheng Subject: [PATCH v1] RISC-V: Remove unnecessary asm check for vec cvt From: Pan Li The vsetvl asm check is unnecessary for the vector convert. We should be

Re: [PATCH] ifcvt/vect: Emit COND_ADD for conditional scalar reduction.

2023-10-23 Thread Richard Biener
On Thu, 19 Oct 2023, Robin Dapp wrote: > Ugh, I didn't push yet because with a rebased trunk I am > seeing different behavior for some riscv testcases. > > A reduction is not recognized because there is yet another > "double use" occurrence in check_reduction_path. I guess it's > reasonable to

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

2023-10-23 Thread Siddhesh Poyarekar
On 2023-10-23 03:57, Richard Biener wrote: On Fri, Oct 20, 2023 at 10:41 PM Qing Zhao wrote: On Oct 20, 2023, at 3:10 PM, Siddhesh Poyarekar wrote: On 2023-10-20 14:38, Qing Zhao wrote: How about the following: Add one more parameter to __builtin_dynamic_object_size(), i.e

Re: [PATCH] rust: build failure after NON_DEPENDENT_EXPR removal [PR111899]

2023-10-23 Thread Thomas Schwinge
Hi Patrick! On 2023-10-20T13:36:30-0400, Patrick Palka wrote: > Built on x86_64-pc-linux-gnu, pushed to trunk as obvious (hopefully). > > -- >8 -- > > This patch removes stray NON_DEPENDENT_EXPR checks following the removal > of this tree code from the C++ FE. (Since this restores the build I >

Re: [PATCH] RISC-V: Fix ICE for the fusion case from vsetvl to scalar move[PR111927]

2023-10-23 Thread Kito Cheng
Few minor comments: On Mon, Oct 23, 2023 at 5:04 PM Juzhe-Zhong wrote: > > ICE: > > during RTL pass: vsetvl > : In function 'riscv_lms_f32': > :240:1: internal compiler error: in merge, at > config/riscv/riscv-vsetvl.cc:1997 > 240 | } > > In general compatible_p (avl_equal_p) has: > > if

RE: [PATCH v1] RISC-V: Remove unnecessary asm check for vec cvt

2023-10-23 Thread Li, Pan2
Committed, thanks Juzhe. Pan From: juzhe.zh...@rivai.ai Sent: Monday, October 23, 2023 5:57 PM To: Li, Pan2 ; gcc-patches Cc: Li, Pan2 ; Wang, Yanzhang ; kito.cheng Subject: Re: [PATCH v1] RISC-V: Remove unnecessary asm check for vec cvt LGTM。

[PATCH] LoongArch:Enable vcond_mask_mn expanders for SF/DF modes.

2023-10-23 Thread Jiahao Xu
If the vcond_mask patterns don't support fp modes, the vector FP comparison instructions will not be generated. gcc/ChangeLog: * config/loongarch/lasx.md (vcond_mask_): Change to (vcond_mask_): this. * config/loongarch/lsx.md (vcond_mask_): Change to

[PATCH V12 4/4] ree: Improve ree pass using defined abi interfaces

2023-10-23 Thread Ajit Agarwal
Hello Vineet, Jeff and Bernhard: This version 11 of the patch uses abi interfaces to remove zero and sign extension elimination. Bootstrapped and regtested on powerpc-linux-gnu. In this version (version 11) of the patch following review comments are incorporated. a) Removal of hard code

Re: [PING][PATCH 2/2] arm: Add support for MVE Tail-Predicated Low Overhead Loops

2023-10-23 Thread Andre Vieira (lists)
Ping for Jeff or another global maintainer to review the target agnostic bits of this, that's: loop-doloop.cc df-core.{c,h} I do have a nitpick myself that I missed last time around: /* We expect the condition to be of the form (reg != 0) */ cond = XEXP (SET_SRC (cmp), 0);

Re: [PATCH] vect: Don't set excess bits in unform masks

2023-10-23 Thread Richard Biener
On Fri, 20 Oct 2023, Andrew Stubbs wrote: > This patch fixes a wrong-code bug on amdgcn in which the excess "ones" in the > mask enable extra lanes that were supposed to be unused and are therefore > undefined. > > Richi suggested an alternative approach involving narrower types and then a >

Re: [PATCH v9 4/4] ree: Improve ree pass for rs6000 target using defined ABI interfaces

2023-10-23 Thread Bernhard Reutner-Fischer
On Mon, 23 Oct 2023 12:16:18 +0530 Ajit Agarwal wrote: > Hello All: > > Addressed below review comments in the version 11 of the patch. > Please review and please let me know if its ok for trunk. s/satisified/satisfied/ > > As said, I don't see why the below was not cleaned up before the V1

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

2023-10-23 Thread Frager, Neal
Hi Mark, > Le 23 oct. 2023 à 16:07, Hatle, Mark a écrit : > > Not sure if this will work, but there is a strverscmp function in libiberty > that I think will work. > > So the microblaze version compare could be done as: > > #define MICROBLAZE_VERSION_COMPARE(VA,VB) strvercmp(VA, VB) > >

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

2023-10-23 Thread Mark Hatle
Not sure if this will work, but there is a strverscmp function in libiberty that I think will work. So the microblaze version compare could be done as: #define MICROBLAZE_VERSION_COMPARE(VA,VB) strvercmp(VA, VB) (I've not tried this, just remembered doing something similar in the past.)

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

2023-10-23 Thread David Malcolm
On Wed, 2023-09-20 at 00:12 -0400, Lewis Hyatt wrote: > Hello- > > This patch implements the PR's request to add more information to the > diagnostic issued for using a poisoned identifier. Bootstrapped + > regtested > all languages on x86-64 Linux. Does it look OK please? Thanks! Thanks! Patch

[x86 PATCH] Fine tune STV register conversion costs for -Os.

2023-10-23 Thread Roger Sayle
The eagle-eyed may have spotted that my recent testcases for DImode shifts on x86_64 included -mno-stv in the dg-options. This is because the Scalar-To-Vector (STV) pass currently transforms these shifts to use SSE vector operations, producing larger code even with -Os. The issue is that 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-23 Thread Qing Zhao
> On Oct 23, 2023, at 3:57 AM, Richard Biener > wrote: > > On Fri, Oct 20, 2023 at 10:41 PM Qing Zhao wrote: >> >> >> >>> On Oct 20, 2023, at 3:10 PM, Siddhesh Poyarekar wrote: >>> >>> On 2023-10-20 14:38, Qing Zhao wrote: How about the following: Add one more parameter to

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

2023-10-23 Thread Qing Zhao
> On Oct 23, 2023, at 8:34 AM, Richard Biener > wrote: > > On Mon, Oct 23, 2023 at 1:27 PM Siddhesh Poyarekar > wrote: >> >> On 2023-10-23 03:57, Richard Biener wrote: >>> On Fri, Oct 20, 2023 at 10:41 PM Qing Zhao wrote: > On Oct 20, 2023, at 3:10 PM, Siddhesh

Re: [PATCH v5 2/5] libcpp: add a function to determine UTF-8 validity of a C string

2023-10-23 Thread David Malcolm
On Wed, Jan 25, 2023 at 4:09 PM Ben Boeckel via Gcc wrote: > > This simplifies the interface for other UTF-8 validity detections when a > simple "yes" or "no" answer is sufficient. > > libcpp/ > > * charset.cc: Add `_cpp_valid_utf8_str` which determines whether > a C string is

Re: [PATCH][WIP] dwarf2out: extend to output debug section directly to object file during debug_early phase

2023-10-23 Thread Jan Hubicka
> > > + output_data_to_object_file (1, 0); > > > + output_data_to_object_file (1, 0); > > > > So this basically renames dw2_asm_output_data to > > output_data_to_object_file and similarly for other output functions. > > > > What would be main problems of making dw2_asm_* functions to do the > >

Re: [PATCH v5 2/5] libcpp: add a function to determine UTF-8 validity of a C string

2023-10-23 Thread Jason Merrill
On 10/23/23 11:16, David Malcolm wrote: On Wed, Jan 25, 2023 at 4:09 PM Ben Boeckel via Gcc wrote: This simplifies the interface for other UTF-8 validity detections when a simple "yes" or "no" answer is sufficient. libcpp/ * charset.cc: Add `_cpp_valid_utf8_str` which determines

Re: [PATCH v5 2/5] libcpp: add a function to determine UTF-8 validity of a C string

2023-10-23 Thread David Malcolm
On Mon, 2023-10-23 at 11:24 -0400, Jason Merrill wrote: > On 10/23/23 11:16, David Malcolm wrote: > > On Wed, Jan 25, 2023 at 4:09 PM Ben Boeckel via Gcc > > wrote: > > > > > > This simplifies the interface for other UTF-8 validity detections > > > when a > > > simple "yes" or "no" answer is

Re: [PATCH] rust: build failure after NON_DEPENDENT_EXPR removal [PR111899]

2023-10-23 Thread Jason Merrill
On 10/23/23 05:10, Thomas Schwinge wrote: Hi Patrick! On 2023-10-20T13:36:30-0400, Patrick Palka wrote: Built on x86_64-pc-linux-gnu, pushed to trunk as obvious (hopefully). -- >8 -- This patch removes stray NON_DEPENDENT_EXPR checks following the removal of this tree code from the C++ FE.

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

2023-10-23 Thread Richard Biener
> Am 23.10.2023 um 16:56 schrieb Qing Zhao : > >  > >> On Oct 23, 2023, at 3:57 AM, Richard Biener >> wrote: >> >>> On Fri, Oct 20, 2023 at 10:41 PM Qing Zhao wrote: >>> >>> >>> On Oct 20, 2023, at 3:10 PM, Siddhesh Poyarekar wrote: On 2023-10-20 14:38, Qing

[PATCH] internal-fn: Add VCOND_MASK_LEN.

2023-10-23 Thread Robin Dapp
The attached patch introduces a VCOND_MASK_LEN, helps for the riscv cases that were broken before and looks unchanged on x86, aarch64 and power bootstrap and testsuites. I only went with the minimal number of new match.pd patterns and did not try stripping the length of a COND_LEN_OP in order to

[SH][committed] Fix PR 111001

2023-10-23 Thread Oleg Endo
The attached patch fixes PR 111001. Committed to master, cherry-picked to GCC-13, GCC-12 and GCC-11. Sanity tested with 'make all-gcc'. Bootstrapped on GCC-13 sh4-linux by Adrian. Cheers, Oleg gcc/ChangeLog: PR target/111001 * config/sh/sh_treg_combine.cc

[PATCH] tree-optimization/111916 - SRA of BIT_FIELD_REF of constant pool entries

2023-10-23 Thread Richard Biener
The following adjusts a leftover BIT_FIELD_REF special-casing to only cover the cases general code doesn't handle. Boostrapped and tested on x86_64-unknown-linux-gnu, pushed. PR tree-optimization/111916 * tree-sra.cc (sra_modify_assign): Do not lower all BIT_FIELD_REF

Backport PR106878 fixes to GCC 12

2023-10-23 Thread Alex Coplan
Hi, I'd like to submit the attached three patches from Jakub for backporting to GCC 12. These are the backports proposed at https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106878#c18 i.e.: r13-2658-g645ef01a463f15fc230e2155719c7a12cec89acf without the gimple verifier changes.

Re: [PATCH 10/11] aarch64: Fix branch-protection error message tests

2023-10-23 Thread Szabolcs Nagy
The 10/13/2023 11:29, Richard Earnshaw (lists) wrote: > On 05/09/2023 16:00, Richard Sandiford via Gcc-patches wrote: > > Szabolcs Nagy writes: > >> @@ -4,19 +4,19 @@ void __attribute__ ((target("branch-protection=leaf"))) > >> foo1 () > >> { > >> } > >> -/* { dg-error {invalid protection type

Re: [PATCH] Support vec_cmpmn/vcondmn for v2hf/v4hf.

2023-10-23 Thread Richard Biener
On Mon, Oct 23, 2023 at 10:48 AM liuhongt wrote: > > Bootstrapped and regtested on x86_64-pc-linux-gnu{-m32,}. > Ready push to trunk. vcond and vcondeq shouldn't be necessary if there's vcond_mask and vcmp support which is the "modern" way of handling vcond. Unless the ISA really can do compare

Re: [PATCH][WIP] dwarf2out: extend to output debug section directly to object file during debug_early phase

2023-10-23 Thread Jan Hubicka
Hello, thanks for the patch. Overall it looks in right direction except for the code duplication in output_die and friends. > +/* Given a die and id, produce the appropriate abbreviations > + directly to lto object file */ > + > +static void > +output_die_abbrevs_to_object_file(unsigned long

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

2023-10-23 Thread Siddhesh Poyarekar
On 2023-10-23 08:34, Richard Biener wrote: A related issue is that assignment to the field and storage allocation are not tied together - if there's no use of the size data we might remove the store of it as dead. Maybe the trick then is to treat the size data as volatile? That ought to

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

2023-10-23 Thread Richard Biener
On Mon, Oct 23, 2023 at 1:27 PM Siddhesh Poyarekar wrote: > > On 2023-10-23 03:57, Richard Biener wrote: > > On Fri, Oct 20, 2023 at 10:41 PM Qing Zhao wrote: > >> > >> > >> > >>> On Oct 20, 2023, at 3:10 PM, Siddhesh Poyarekar > >>> wrote: > >>> > >>> On 2023-10-20 14:38, Qing Zhao wrote: >

[PATCH] libgcc: make heap-based trampolines conditional on libc presence

2023-10-23 Thread Sergei Trofimovich
From: Sergei Trofimovich To build `libc` for a target one needs to build `gcc` without `libc` support first. Commit r14-4823-g8abddb187b3348 "libgcc: support heap-based trampolines" added unconditional `libc` dependency and broke libc-less `gcc` builds. An example failure on

Re: [PATCH] libgcc: make heap-based trampolines conditional on libc presence

2023-10-23 Thread Iain Sandoe
hi Sergei, > On 23 Oct 2023, at 13:43, Sergei Trofimovich wrote: > > From: Sergei Trofimovich > > To build `libc` for a target one needs to build `gcc` without `libc` > support first. Commit r14-4823-g8abddb187b3348 "libgcc: support > heap-based trampolines" added unconditional `libc`

  1   2   >