Re: [PATCH v4 2/3] c++: Improve constexpr error for dangling local variables [PR110619]

2023-07-20 Thread Nathaniel Shead via Gcc-patches
On Thu, Jul 20, 2023 at 11:46:47AM -0400, Jason Merrill wrote: > On 7/20/23 05:36, Nathaniel Shead wrote: > > Currently, when typeck discovers that a return statement will refer to a > > local variable it rewrites to return a null pointer. This causes the > > error messages for using the return

[PATCH] libfortran: Fix build for targets that don't have 10byte or 16 byte floating point

2023-07-20 Thread Andrew Pinski via Gcc-patches
So the problem here is EXPAND_INTER_MACRO_16 expands to nothing if 16 byte FP does not exist but we still add a comma after it and that causes a build failure. The same is true for EXPAND_INTER_MACRO_10 too. Committed as obvious after a bootstrap and test on x86_64-linux-gnu and

Re: [PATCH] sccvn: Correct the index of bias for IFN_LEN_STORE [PR110744]

2023-07-20 Thread Kewen.Lin via Gcc-patches
on 2023/7/20 20:37, Richard Sandiford wrote: > "Kewen.Lin" writes: >> Hi, >> >> Commit r14-2267-gb8806f6ffbe72e adjusts the arguments order >> of LEN_STORE from {len,vector,bias} to {len,bias,vector}, >> in order to make them consistent with LEN_MASK_STORE and >> MASK_STORE. But it missed to

Re: [PATCH] testsuite: Add a test case for PR110729

2023-07-20 Thread Kewen.Lin via Gcc-patches
on 2023/7/20 20:34, Richard Sandiford wrote: > "Kewen.Lin" writes: >> Hi, >> >> As PR110729 reported, there was one issue for .section >> __patchable_function_entries with -ffunction-sections, that >> is we put the same symbol as link_to section symbol for all >> functions wrongly. The commit

Re: [PATCH 2/2 ver 4] rs6000, fix vec_replace_unaligned built-in arguments

2023-07-20 Thread Kewen.Lin via Gcc-patches
Hi Carl, on 2023/7/18 03:20, Carl Love wrote: > GCC maintainers: > > Version 4, changed the new RS6000_OVLD_VEC_REPLACE_UN case statement > rs6000/rs6000-c.cc. The existing REPLACE_ELT iterator name was changed > to REPLACE_ELT_V along with the associated define_mode_attr. Renamed > VEC_RU to

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

2023-07-20 Thread Jeff Law via Gcc-patches
On 7/20/23 21:49, Kito Cheng wrote: LGTM, I think long jump is another issue and making ra become a fixed register will escalate to an ABI issue, so that should not be a blocker for this patch. I'll take a look tomorrow, but I'm supportive of what Yanzhang is trying to do in principle. I've

[PATCH] MATCH: Add Max,a> -> Max simplifcation

2023-07-20 Thread Andrew Pinski via Gcc-patches
This adds a simple match pattern to simplify `max,a>` to `max`. Reassociation handles this already (r0-77700-ge969dbde29bfd396259357) but seems like we should be able to handle this even before reassociation. This fixes part of PR tree-optimization/80574 but more work is needed fix it the rest

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

2023-07-20 Thread Kito Cheng via Gcc-patches
LGTM, I think long jump is another issue and making ra become a fixed register will escalate to an ABI issue, so that should not be a blocker for this patch. On Tue, Jul 18, 2023 at 4:10 PM yanzhang.wang--- via Gcc-patches wrote: > > From: Yanzhang Wang > > gcc/ChangeLog: > > *

Re: [PATCH v4] RISC-V: Support CALL for RVV floating-point dynamic rounding

2023-07-20 Thread juzhe.zh...@rivai.ai
- if (mode == FRM_MODE_DYN_EXIT && prev_mode != FRM_MODE_DYN) + if (mode == FRM_MODE_DYN_CALL && prev_mode != FRM_MODE_DYN) /* No need to emit when prev mode is DYN already. */ - emit_insn (gen_fsrmsi_restore_exit (backup_reg)); + emit_insn

[PATCH] cleanup: Change condition order

2023-07-20 Thread Juzhe-Zhong
Hi, Richard and Richi. I have double check the recent codes for len && mask support again. Some places code structure: if (len_mask_fn) ... else if (mask_fn) ... some places code structure: if (mask_len_fn) ... else if (mask) Base on previous review comment from Richi:

Re: [PATCH 1/2] rs6000, add argument to function find_instance

2023-07-20 Thread Kewen.Lin via Gcc-patches
Hi Carl, on 2023/7/18 03:19, Carl Love wrote: > > GCC maintainers: > > The rs6000 function find_instance assumes that it is called for built- > ins with only two arguments. There is no checking for the actual > number of aruguments used in the built-in. This patch adds an > additional

[PATCH] cleanup: make all cond_len_* and mask_len_* consistent on the order of mask and len

2023-07-20 Thread Juzhe-Zhong
This patch is depending on: https://gcc.gnu.org/pipermail/gcc-patches/2023-July/625121.html Hi, Richard and Richi. This patch is to align the order of mask and len. Currently, According to this piece code: if (final_len && final_mask) call =

RE: [r14-2639 Regression] FAIL: gcc.dg/vect/bb-slp-pr95839-v8.c scan-tree-dump slp2 "optimized: basic block" on Linux/x86_64

2023-07-20 Thread Jiang, Haochen via Gcc-patches
> -Original Message- > From: Richard Biener > Sent: Thursday, July 20, 2023 9:28 PM > To: Maciej W. Rozycki > Cc: haochen.jiang ; gcc- > regress...@gcc.gnu.org; gcc-patches@gcc.gnu.org; Jiang, Haochen > > Subject: Re: [r14-2639 Regression] FAIL: gcc.dg/vect/bb-slp-pr95839-v8.c >

[PATCHv2, rs6000] Generate mfvsrwz for all subtargets and remove redundant zero extend [PR106769]

2023-07-20 Thread HAO CHEN GUI via Gcc-patches
Hi, This patch modifies vsx extract expand and generates mfvsrwz/stxsiwx for all subtargets when the mode is V4SI and the index of extracted element is 1 for BE and 2 for LE. Also this patch adds a insn pattern for mfvsrwz which can help eliminate redundant zero extend. Compared to last

Re: [PATCH-1, combine] Don't widen shift mode when target has rotate/mask instruction on original mode [PR93738]

2023-07-20 Thread HAO CHEN GUI via Gcc-patches
Sorry for the typo s/change/chance 在 2023/7/21 8:59, HAO CHEN GUI 写道: > Hi Jeff, > > 在 2023/7/21 5:27, Jeff Law 写道: >> Wouldn't it make more sense to just try rotate/mask in the original mode >> before trying a shift in a widened mode?  I'm not sure why we need a target  >> hook here. > >

Re: [PATCH-1, combine] Don't widen shift mode when target has rotate/mask instruction on original mode [PR93738]

2023-07-20 Thread HAO CHEN GUI via Gcc-patches
Hi Jeff, 在 2023/7/21 5:27, Jeff Law 写道: > Wouldn't it make more sense to just try rotate/mask in the original mode > before trying a shift in a widened mode?  I'm not sure why we need a target  > hook here. There is no change to try rotate/mask with the original mode when

[pushed] analyzer/text-art: fix clang warnings [PR110433,PR110612]

2023-07-20 Thread David Malcolm via Gcc-patches
Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu. Pushed to trunk as r14-2689-g7006f02bbc3f1d. gcc/analyzer/ChangeLog: PR analyzer/110433 PR middle-end/110612 * access-diagram.cc (class spatial_item): Add virtual dtor. gcc/ChangeLog: PR

[pushed] analyzer: avoid usage of TYPE_PRECISION on vector types [PR110455]

2023-07-20 Thread David Malcolm via Gcc-patches
Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu. Pushed to trunk as r14-2690-ga4913a19d24a79. gcc/analyzer/ChangeLog: PR analyzer/110455 * region-model.cc (region_model::get_gassign_result): Only check for bad shift counts when dealing with an integral type.

[pushed] analyzer: fix ICE on certain pointer subtractions [PR110387]

2023-07-20 Thread David Malcolm via Gcc-patches
Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu. Pushed to trunk as r14-2688-g5a0aff76a99804. gcc/analyzer/ChangeLog: PR analyzer/110387 * region.h (struct cast_region::key_t): Support "m_type" being null by using "m_original_region" for empty/deleted slots.

Re: [PATCH] Optimize vlddqu to vmovdqu for TARGET_AVX

2023-07-20 Thread Hongtao Liu via Gcc-patches
On Thu, Jul 20, 2023 at 4:11 PM Uros Bizjak via Gcc-patches wrote: > > On Thu, Jul 20, 2023 at 9:35 AM liuhongt wrote: > > > > For Intel processors, after TARGET_AVX, vmovdqu is optimized as fast > > as vlddqu, UNSPEC_LDDQU can be removed to enable more optimizations. > > Can someone confirm

[PATCH] cleanup: Change LEN_MASK into MASK_LEN

2023-07-20 Thread Juzhe-Zhong
Hi. Since start from LEN_MASK_GATHER_LOAD/LEN_MASK_SCATTER_STORE, COND_LEN_* patterns, the order of len and mask is {mask,len,bias}. The reason we make "mask" argument comes before "len" is because we want to keep the "mask" location same as mask_* or cond_* patterns to make use of current

Re: [PATCH v3] Implement new RTL optimizations pass: fold-mem-offsets.

2023-07-20 Thread Jeff Law via Gcc-patches
On 7/20/23 00:18, Vineet Gupta wrote: On 7/18/23 21:31, Jeff Law via Gcc-patches wrote: In a run with -fno-fold-mem-offsets, the same insn 93 is successfully grok'ed by cprop_hardreg, | (insn 93 337 522 11 (set (mem/c:DF (plus:DI (reg/f:DI 2 sp) |    (const_int 8 [0x8])) [4

Re: [PATCH] c++: fix ICE with is_really_empty_class [PR110106]

2023-07-20 Thread Marek Polacek via Gcc-patches
On Thu, Jul 20, 2023 at 03:51:32PM -0400, Marek Polacek wrote: > On Thu, Jul 20, 2023 at 02:37:07PM -0400, Jason Merrill wrote: > > On 7/20/23 14:13, Marek Polacek wrote: > > > On Wed, Jul 19, 2023 at 10:11:27AM -0400, Patrick Palka wrote: > > > > On Tue, 18 Jul 2023, Marek Polacek via Gcc-patches

Re: [PATCH] tree-optimization/110742 - fix latent issue with permuting existing vectors

2023-07-20 Thread Jeff Law via Gcc-patches
On 7/20/23 06:38, Richard Biener via Gcc-patches wrote: When we materialize a layout we push edge permutes to constant/external defs without checking we can actually do so. For externals defined by vector stmts rather than scalar components we can't. Bootstrapped and tested on

Re: [PATCH-1, combine] Don't widen shift mode when target has rotate/mask instruction on original mode [PR93738]

2023-07-20 Thread Jeff Law via Gcc-patches
On 7/18/23 21:06, HAO CHEN GUI via Gcc-patches wrote: Hi, The shift mode will be widen in combine pass if the operand has a normal subreg. But when the target already has rotate/mask/insert instructions on the narrow mode, it's unnecessary to widen the mode for lshiftrt. As the lshiftrt is

Re: [PATCH v5 4/5] c++modules: report imported CMI files as dependencies

2023-07-20 Thread Nathan Sidwell via Gcc-patches
On 7/19/23 20:47, Ben Boeckel wrote: On Wed, Jul 19, 2023 at 17:11:08 -0400, Nathan Sidwell wrote: GCC is neither of these descriptions. a CMI does not contain the transitive closure of its imports. It contains an import table. That table lists the transitive closure of its imports (it needs

Re: [pushed][LRA]: Check and update frame to stack pointer elimination after stack slot allocation

2023-07-20 Thread Rainer Orth
de -isystem /vol/gcc/sparc-sun-solaris2.11/sys-include -fchecking=1 -c -g -O2 -W -Wall -gnatpg -nostdinc g-alleve.adb -o g-alleve.o +===GNAT BUG DETECTED==+ | 14.0.0 20230720 (experimental) [master 506f068e7d01ad2fb107185b8fb204a

Re: [PATCH] c++: fix ICE with is_really_empty_class [PR110106]

2023-07-20 Thread Marek Polacek via Gcc-patches
On Thu, Jul 20, 2023 at 02:37:07PM -0400, Jason Merrill wrote: > On 7/20/23 14:13, Marek Polacek wrote: > > On Wed, Jul 19, 2023 at 10:11:27AM -0400, Patrick Palka wrote: > > > On Tue, 18 Jul 2023, Marek Polacek via Gcc-patches wrote: > > > > > > > Bootstrapped/regtested on x86_64-pc-linux-gnu,

libgo patch committet: Don't collect package CGOLDFLAGS

2023-07-20 Thread Ian Lance Taylor via Gcc-patches
This libgo patch to the go command sources stops collecting package CGOLDFLAGS when using gccgo. The flags are already collected via cmd/cgo. The gccgo_link_c test is tweaked to do real linking as with this change the cgo ldflags are not fully reflected in go build -n output, since they now only

[committed] i386: Double-word sign-extension missed-optimization [PR110717]

2023-07-20 Thread Uros Bizjak via Gcc-patches
When sign-extending the value in a double-word register pair using shift and ashiftrt sequence with the same count immediate value less than word width, there is no need to shift the lower word of the value. The sign-extension could be limited to the upper word, but we uselessly shift the lower

[pushed][LRA]: Exclude reloading of frame pointer in subreg for some cases

2023-07-20 Thread Vladimir Makarov via Gcc-patches
The following patch improves code for avr LRA port.  More explanation for the patch can be found in the commit message. The patch was successfully bootstrapped and tested on x86-64, aarch64, and ppc64le. commit 4b8878fbf7b74ea5c3405c9f558df0517036f131 Author: Vladimir N. Makarov Date: Thu

Re: [PATCH] c++: fix ICE with is_really_empty_class [PR110106]

2023-07-20 Thread Jason Merrill via Gcc-patches
On 7/20/23 14:13, Marek Polacek wrote: On Wed, Jul 19, 2023 at 10:11:27AM -0400, Patrick Palka wrote: On Tue, 18 Jul 2023, Marek Polacek via Gcc-patches wrote: Bootstrapped/regtested on x86_64-pc-linux-gnu, ok for trunk and branches? Looks reasonable to me. Thanks. Though I wonder if

Re: [PATCH] c++: fix ICE with is_really_empty_class [PR110106]

2023-07-20 Thread Marek Polacek via Gcc-patches
On Wed, Jul 19, 2023 at 10:11:27AM -0400, Patrick Palka wrote: > On Tue, 18 Jul 2023, Marek Polacek via Gcc-patches wrote: > > > Bootstrapped/regtested on x86_64-pc-linux-gnu, ok for trunk and branches? > > Looks reasonable to me. Thanks. > Though I wonder if we could also fix this by not

Re: [PATCH 2/3] gcc: xtensa: use dynconfig settings as builtin-macros

2023-07-20 Thread Max Filippov via Gcc-patches
On Thu, Jul 20, 2023 at 10:54 AM Alexey Lapshin wrote: > Please consider to review another two pathes then. > This would be nice to have it in upstream Sure, it's going to take some time though as I need to take a good look, and maybe I'll come back with some change proposals. -- Thanks. --

Re: [PATCH 2/3] gcc: xtensa: use dynconfig settings as builtin-macros

2023-07-20 Thread Max Filippov via Gcc-patches
On Thu, Jul 20, 2023 at 10:45 AM Alexey Lapshin wrote: > > On Thu, 2023-07-20 at 08:25 -0700, Max Filippov wrote: > > But it defines them with their respective values. > > Just notice that it adds two leading underscores in front of the names. > > Why builtin macros were defined with prefix? >

Re: [PATCH 2/3] gcc: xtensa: use dynconfig settings as builtin-macros

2023-07-20 Thread Alexey Lapshin via Gcc-patches
Please consider to review another two pathes then. This would be nice to have it in upstream

Re: [PATCH 2/3] gcc: xtensa: use dynconfig settings as builtin-macros

2023-07-20 Thread Alexey Lapshin via Gcc-patches
On Thu, 2023-07-20 at 10:43 -0700, Max Filippov wrote: > Bonus points for keeping backwards > compatibility with the overlay-based configuration method (: Got you, thanks!

Re: [PATCH 2/3] gcc: xtensa: use dynconfig settings as builtin-macros

2023-07-20 Thread Alexey Lapshin via Gcc-patches
On Thu, 2023-07-20 at 08:25 -0700, Max Filippov wrote: > But it defines them with their respective values. > Just notice that it adds two leading underscores in front of the names. Why builtin macros were defined with prefix? With this approach I also need define it somewhere: #define

Re: [PATCH 2/3] gcc: xtensa: use dynconfig settings as builtin-macros

2023-07-20 Thread Max Filippov via Gcc-patches
On Thu, Jul 20, 2023 at 9:10 AM Alexey Lapshin wrote: > I see now, thanks for the explanation, I will try to rebuild toolchain > without this particular patch. > BTW, what do you thing about placing config from newlib overlay to dynconfig? That's the right thing to do. Bonus points for keeping

Re: [PATCH] tree-optimization/110742 - fix latent issue with permuting existing vectors

2023-07-20 Thread Richard Sandiford via Gcc-patches
Richard Biener writes: >> Am 20.07.2023 um 18:59 schrieb Richard Sandiford : >> >> Richard Biener writes: > Am 20.07.2023 um 16:09 schrieb Richard Sandiford > : Richard Biener via Gcc-patches writes: > When we materialize a layout we push edge permutes to

Re: [PATCH] tree-optimization/110742 - fix latent issue with permuting existing vectors

2023-07-20 Thread Richard Biener via Gcc-patches
> Am 20.07.2023 um 18:59 schrieb Richard Sandiford : > > Richard Biener writes: Am 20.07.2023 um 16:09 schrieb Richard Sandiford : >>> >>> Richard Biener via Gcc-patches writes: When we materialize a layout we push edge permutes to constant/external defs without

Re: [PATCH] c++: passing partially inst tmpl as ttp [PR110566]

2023-07-20 Thread Jason Merrill via Gcc-patches
On 7/20/23 12:00, Patrick Palka wrote: On Wed, 19 Jul 2023, Jason Merrill wrote: On 7/19/23 14:05, Patrick Palka wrote: Bootstrapped and regtested on x86_64-pc-linux-gnu, does this look OK for trunk/13? -- >8 -- Since the arguments 'pargs' passed to the coerce_template_parms from

Re: [PATCH] testsuite: fix allocator-opt1.C FAIL with old ABI

2023-07-20 Thread Marek Polacek via Gcc-patches
On Wed, Jul 19, 2023 at 03:22:10PM -0400, Marek Polacek wrote: > Ping. > > On Mon, Jul 10, 2023 at 04:33:26PM -0400, Marek Polacek via Gcc-patches wrote: > > Running > > $ make check-g++ > > RUNTESTFLAGS='--target_board=unix\{-D_GLIBCXX_USE_CXX11_ABI=0,\} > > dg.exp=allocator-opt1.C' > >

Re: [PATCH v4 3/3] c++: Improve location information in constant evaluation

2023-07-20 Thread Jason Merrill via Gcc-patches
On 7/20/23 05:37, Nathaniel Shead wrote: This patch updates 'input_location' during constant evaluation to ensure that errors in subexpressions that lack location information still provide accurate diagnostics. By itself this change causes some small regressions in diagnostic quality for

Re: [PATCH] tree-optimization/110742 - fix latent issue with permuting existing vectors

2023-07-20 Thread Richard Sandiford via Gcc-patches
Richard Biener writes: >> Am 20.07.2023 um 16:09 schrieb Richard Sandiford : >> >> Richard Biener via Gcc-patches writes: >>> When we materialize a layout we push edge permutes to constant/external >>> defs without checking we can actually do so. For externals defined >>> by vector stmts

[committed] libgomp.texi: Split OpenMP routines chapter into sections

2023-07-20 Thread Tobias Burnus
When recently looking at the libgomp documentation, here the current GCC 13 version, https://gcc.gnu.org/onlinedocs/gcc-13.1.0/libgomp/Runtime-Library-Routines.html I found both the order confusing and the wording: "The routines are structured in following three parts:" as I did not see any

Re: [PATCH 2/3] gcc: xtensa: use dynconfig settings as builtin-macros

2023-07-20 Thread Alexey Lapshin via Gcc-patches
I see now, thanks for the explanation, I will try to rebuild toolchain without this particular patch. BTW, what do you thing about placing config from newlib overlay to dynconfig?

Re: [PATCH v2] libstdc++: Define _GLIBCXX_HAS_BUILTIN_TRAIT

2023-07-20 Thread Patrick Palka via Gcc-patches
On Wed, Jul 19, 2023 at 3:33 PM Ken Matsui via Gcc-patches wrote: > > This patch defines _GLIBCXX_HAS_BUILTIN_TRAIT macro, which will be used > as a flag to toggle the use of built-in traits in the type_traits header > through _GLIBCXX_NO_BUILTIN_TRAITS macro, without needing to modify the >

Re: [PATCH] c++: passing partially inst tmpl as ttp [PR110566]

2023-07-20 Thread Patrick Palka via Gcc-patches
On Wed, 19 Jul 2023, Jason Merrill wrote: > On 7/19/23 14:05, Patrick Palka wrote: > > Bootstrapped and regtested on x86_64-pc-linux-gnu, does this look OK for > > trunk/13? > > > > -- >8 -- > > > > Since the arguments 'pargs' passed to the coerce_template_parms from > >

Re: [PATCH v4 2/3] c++: Improve constexpr error for dangling local variables [PR110619]

2023-07-20 Thread Jason Merrill via Gcc-patches
On 7/20/23 05:36, Nathaniel Shead wrote: Currently, when typeck discovers that a return statement will refer to a local variable it rewrites to return a null pointer. This causes the error messages for using the return value in a constant expression to be unhelpful, especially for reference

Re: [PATCH 2/3] gcc: xtensa: use dynconfig settings as builtin-macros

2023-07-20 Thread Max Filippov via Gcc-patches
On Thu, Jul 20, 2023 at 8:12 AM Alexey Lapshin wrote: > > Oops, missed this loop while implementing... > > I had a problem with building esp chips multilib until added my changes. > > This loop looks like just defines a macro without value. But it defines them with their respective values. Just

Re: [PATCH 2/3] gcc: xtensa: use dynconfig settings as builtin-macros

2023-07-20 Thread Alexey Lapshin via Gcc-patches
Oops, missed this loop while implementing... I had a problem with building esp chips multilib until added my changes. This loop looks like just defines a macro without value. But the value must be set to make it work correctly. It uses builtin_define() instead builtin_define_with_int_value() I

Re: [PATCH, OpenACC 2.7] readonly modifier support in front-ends

2023-07-20 Thread Tobias Burnus
Hi Thomas & Chung-Lin, On 20.07.23 15:33, Thomas Schwinge wrote: On 2023-07-11T02:33:58+0800, Chung-Lin Tang wrote: +++ b/gcc/c/c-parser.cc @@ -14059,7 +14059,8 @@ c_parser_omp_variable_list (c_parser *parser, static tree c_parser_omp_var_list_parens (c_parser *parser, enum

Re: [PATCH 2/3] gcc: xtensa: use dynconfig settings as builtin-macros

2023-07-20 Thread Max Filippov via Gcc-patches
On Thu, Jul 20, 2023 at 7:37 AM Alexey Lapshin wrote: > > gcc/ > * config/xtensa/xtensa.h (XCHAL_HAVE_BE, XCHAL_HAVE_DENSITY, > XCHAL_HAVE_CONST16, XCHAL_HAVE_ABS, XCHAL_HAVE_ADDX, > XCHAL_HAVE_L32R, XSHAL_USE_ABSOLUTE_LITERALS, >

Re: [committed] Document new analyzer parameters

2023-07-20 Thread David Malcolm via Gcc-patches
On Thu, 2023-07-20 at 16:47 +0200, Martin Jambor wrote: > Hi, > > This patch documents the analyzer parameters introduced in > r14-2029-g0e466e978c7286 also in gcc/doc/invoke.texi. > > Committed as obvious after testing with make pdf and make info and > eyeballing the result. > > Thanks,

Re: [PATCH] tree-optimization/110742 - fix latent issue with permuting existing vectors

2023-07-20 Thread Richard Biener via Gcc-patches
> Am 20.07.2023 um 16:09 schrieb Richard Sandiford : > > Richard Biener via Gcc-patches writes: >> When we materialize a layout we push edge permutes to constant/external >> defs without checking we can actually do so. For externals defined >> by vector stmts rather than scalar components

[committed] Document new analyzer parameters

2023-07-20 Thread Martin Jambor
Hi, This patch documents the analyzer parameters introduced in r14-2029-g0e466e978c7286 also in gcc/doc/invoke.texi. Committed as obvious after testing with make pdf and make info and eyeballing the result. Thanks, Martin 2023-07-20 Martin Jambor * doc/invoke.texi

Re: [PATCH v4 1/3] c++: Track lifetimes in constant evaluation [PR70331,PR96630,PR98675]

2023-07-20 Thread Jason Merrill via Gcc-patches
On 7/20/23 05:35, Nathaniel Shead wrote: This adds rudimentary lifetime tracking in C++ constexpr contexts, allowing the compiler to report errors with using values after their backing has gone out of scope. We don't yet handle other ways of accessing values outside their lifetime (e.g.

[PATCH 3/3] gcc: xtensa: add xtensa*-esp*-elf multilib

2023-07-20 Thread Alexey Lapshin via Gcc-patches
gcc/ * config.gcc: Add xtensa*-esp*-elf target. * config/xtensa/t-esp-multilib: New file. --- gcc/config.gcc | 6 ++ gcc/config/xtensa/t-esp-multilib | 20 2 files changed, 26 insertions(+) create mode 100644

[PATCH 2/3] gcc: xtensa: use dynconfig settings as builtin-macros

2023-07-20 Thread Alexey Lapshin via Gcc-patches
gcc/ * config/xtensa/xtensa.h (XCHAL_HAVE_BE, XCHAL_HAVE_DENSITY, XCHAL_HAVE_CONST16, XCHAL_HAVE_ABS, XCHAL_HAVE_ADDX, XCHAL_HAVE_L32R, XSHAL_USE_ABSOLUTE_LITERALS, XSHAL_HAVE_TEXT_SECTION_LITERALS, XCHAL_HAVE_MAC16, XCHAL_HAVE_MUL16,

[PATCH 1/3] gcc: xtensa: add mdynconfig option

2023-07-20 Thread Alexey Lapshin via Gcc-patches
gcc/ * config/xtensa/elf.h (ASM_SPEC, LINK_SPEC): Pass dynconfig to assembler/linker. * config/xtensa/linux.h (ASM_SPEC, LINK_SPEC): Likewise. * config/xtensa/uclinux.h (ASM_SPEC, LINK_SPEC): Likewise. * config/xtensa/xtensa-dynconfig.cc: May build dynconfig

[PATCH 0/3] Espressif xtensa chips multilib

2023-07-20 Thread Alexey Lapshin via Gcc-patches
This patch series introduces multilib support for Espressif XTENSA chips in gcc. The addition of the "-mdynconfig=" option was necessary because the existing environment variable XTENSA_GNU_CONFIG cannot be utilized for implementing multilib. This is because multilib operates with gcc options

Re: [PATCH v2] c++: fix ICE with designated initializer [PR110114]

2023-07-20 Thread Jason Merrill via Gcc-patches
On 7/20/23 10:08, Marek Polacek wrote: On Wed, Jul 19, 2023 at 03:24:10PM -0400, Jason Merrill wrote: On 7/19/23 14:38, Marek Polacek wrote: On Wed, Jul 19, 2023 at 02:32:15PM -0400, Patrick Palka wrote: On Wed, 19 Jul 2023, Marek Polacek wrote: Bootstrapped/regtested on

Re: [PATCH] tree-optimization/110742 - fix latent issue with permuting existing vectors

2023-07-20 Thread Richard Sandiford via Gcc-patches
Richard Biener via Gcc-patches writes: > When we materialize a layout we push edge permutes to constant/external > defs without checking we can actually do so. For externals defined > by vector stmts rather than scalar components we can't. > > Bootstrapped and tested on x86_64-unknown-linux-gnu.

[PATCH v2] c++: fix ICE with designated initializer [PR110114]

2023-07-20 Thread Marek Polacek via Gcc-patches
On Wed, Jul 19, 2023 at 03:24:10PM -0400, Jason Merrill wrote: > On 7/19/23 14:38, Marek Polacek wrote: > > On Wed, Jul 19, 2023 at 02:32:15PM -0400, Patrick Palka wrote: > > > On Wed, 19 Jul 2023, Marek Polacek wrote: > > > > > > > Bootstrapped/regtested on x86_64-pc-linux-gnu, ok for trunk? > >

Cleanup code determining number of iterations from cfg profile

2023-07-20 Thread Jan Hubicka via Gcc-patches
Hi, this patch cleanups API for determining expected loop iteraitons from profile. We started with having expected_loop_iterations and only source was the integer represented BB counts. It did some work on guessing number of iteration if profile was absent or bogus. Later we introduced loop_info

RE: [PATCH] CODE STRUCTURE: Refine codes in Vectorizer

2023-07-20 Thread Li, Pan2 via Gcc-patches
Committed, thanks Richard. Pan -Original Message- From: Gcc-patches On Behalf Of Richard Biener via Gcc-patches Sent: Thursday, July 20, 2023 8:54 PM To: juzhe.zh...@rivai.ai Cc: gcc-patches ; richard.sandiford Subject: Re: [PATCH] CODE STRUCTURE: Refine codes in Vectorizer On Thu,

Re: [PATCH, OpenACC 2.7] readonly modifier support in front-ends

2023-07-20 Thread Thomas Schwinge
Hi Chung-Lin, Tobias! On 2023-07-11T02:33:58+0800, Chung-Lin Tang wrote: > this patch contains support for the 'readonly' modifier in copyin clauses > and the cache directive. Thanks! > As we discussed earlier, the work for actually linking this to middle-end > points-to analysis is a somewhat

[PATCH] LoongArch: Allow using --with-arch=native if host CPU is LoongArch

2023-07-20 Thread Xi Ruoyao via Gcc-patches
If the host triple and the target triple are different but the host is LoongArch, in some cases --with-arch=native can be useful. For example, if we are bootstrapping a loongarch64-linux-musl toolchain on a Glibc-based system and we don't intend to use the toolchain on other machines, we can use

Re: [r14-2639 Regression] FAIL: gcc.dg/vect/bb-slp-pr95839-v8.c scan-tree-dump slp2 "optimized: basic block" on Linux/x86_64

2023-07-20 Thread Richard Biener via Gcc-patches
On Thu, Jul 20, 2023 at 3:13 PM Maciej W. Rozycki wrote: > > On Thu, 20 Jul 2023, Richard Biener wrote: > > > > c1e420549f2305efb70ed37e693d380724eb7540 is the first bad commit > > > commit c1e420549f2305efb70ed37e693d380724eb7540 > > > Author: Maciej W. Rozycki > > > Date: Wed Jul 19 11:59:29

Re: [r14-2639 Regression] FAIL: gcc.dg/vect/bb-slp-pr95839-v8.c scan-tree-dump slp2 "optimized: basic block" on Linux/x86_64

2023-07-20 Thread Maciej W. Rozycki
On Thu, 20 Jul 2023, Richard Biener wrote: > > c1e420549f2305efb70ed37e693d380724eb7540 is the first bad commit > > commit c1e420549f2305efb70ed37e693d380724eb7540 > > Author: Maciej W. Rozycki > > Date: Wed Jul 19 11:59:29 2023 +0100 > > > > testsuite: Add 64-bit vector variant for

Re: [PATCH v4] Introduce attribute sym

2023-07-20 Thread Richard Biener via Gcc-patches
On Thu, Jul 20, 2023 at 1:11 AM Alexandre Oliva wrote: > > On Jul 18, 2023, Richard Biener wrote: > > > I think the __symver__ attribute does something similar already so > > maybe use __attribute__((__sym__("foo")))? > > Cool, thanks, that will do. Regstrapped on x86_64-linux-gnu. Ok to >

Re: loop-ch improvements, part 3

2023-07-20 Thread Richard Biener via Gcc-patches
On Thu, Jul 20, 2023 at 9:10 AM Jan Hubicka via Gcc-patches wrote: > > Hi, > this patch makes tree-ssa-loop-ch to understand if-combined conditionals > (which > are quite common) and remove the IV-derived heuristics. That heuristics is > quite dubious because every variable with PHI in header

Re: [PATCH 2/3] testsuite: Require 128-bit vectors for bb-slp-pr95839.c

2023-07-20 Thread Maciej W. Rozycki
On Thu, 20 Jul 2023, Richard Biener wrote: > > There's no such requirement in the psABI and I fail to see a plausible > > justification. And direct GPR<->FPR move patterns are available in the > > backend for the V2SF mode. Also there's no delay slot requirement even > > for these move

Re: [PATCH] CODE STRUCTURE: Refine codes in Vectorizer

2023-07-20 Thread Richard Biener via Gcc-patches
On Thu, 20 Jul 2023, juzhe.zh...@rivai.ai wrote: > Just finish Bootstrap and regression on X86. > > Ok for trunk ? OK. Not an issue currently but I think LEN_MASK should be checked before MASK. Richard. > > juzhe.zh...@rivai.ai > > From: juzhe.zhong > Date: 2023-07-20 16:06 > To:

Re: [r14-2639 Regression] FAIL: gcc.dg/vect/bb-slp-pr95839-v8.c scan-tree-dump slp2 "optimized: basic block" on Linux/x86_64

2023-07-20 Thread Richard Biener via Gcc-patches
On Thu, Jul 20, 2023 at 1:46 PM haochen.jiang via Gcc-patches wrote: > > On Linux/x86_64, > > c1e420549f2305efb70ed37e693d380724eb7540 is the first bad commit > commit c1e420549f2305efb70ed37e693d380724eb7540 > Author: Maciej W. Rozycki > Date: Wed Jul 19 11:59:29 2023 +0100 > > testsuite:

[PATCH] tree-optimization/110204 - second level redundancy and simplification

2023-07-20 Thread Richard Biener via Gcc-patches
When PRE discovers a full redundancy during insertion it cannot unite the two value sets. Instead it inserts a copy old-val = new-val where new-val can also be a constant. The following looks through such copies during elimination, providing one extra level of constant and copy propagation. For

Re: [PATCH] CODE STRUCTURE: Refine codes in Vectorizer

2023-07-20 Thread juzhe.zh...@rivai.ai
Just finish Bootstrap and regression on X86. Ok for trunk ? juzhe.zh...@rivai.ai From: juzhe.zhong Date: 2023-07-20 16:06 To: gcc-patches CC: richard.sandiford; rguenther; Ju-Zhe Zhong Subject: [PATCH] CODE STRUCTURE: Refine codes in Vectorizer From: Ju-Zhe Zhong Hi, Richard and Richi. I

[PATCH] tree-optimization/110742 - fix latent issue with permuting existing vectors

2023-07-20 Thread Richard Biener via Gcc-patches
When we materialize a layout we push edge permutes to constant/external defs without checking we can actually do so. For externals defined by vector stmts rather than scalar components we can't. Bootstrapped and tested on x86_64-unknown-linux-gnu. OK? Thanks, Richard. PR

Re: [PATCH] sccvn: Correct the index of bias for IFN_LEN_STORE [PR110744]

2023-07-20 Thread Richard Sandiford via Gcc-patches
"Kewen.Lin" writes: > Hi, > > Commit r14-2267-gb8806f6ffbe72e adjusts the arguments order > of LEN_STORE from {len,vector,bias} to {len,bias,vector}, > in order to make them consistent with LEN_MASK_STORE and > MASK_STORE. But it missed to update the related handlings > in tree-ssa-sccvn.cc, it

Re: [PATCH] testsuite: Add a test case for PR110729

2023-07-20 Thread Richard Sandiford via Gcc-patches
"Kewen.Lin" writes: > Hi, > > As PR110729 reported, there was one issue for .section > __patchable_function_entries with -ffunction-sections, that > is we put the same symbol as link_to section symbol for all > functions wrongly. The commit r13-4294 for PR99889 has > fixed this with the

Re: [PATCH 2/3] testsuite: Require 128-bit vectors for bb-slp-pr95839.c

2023-07-20 Thread Richard Biener via Gcc-patches
On Thu, Jul 20, 2023 at 11:16 AM Maciej W. Rozycki wrote: > > On Thu, 20 Jul 2023, Richard Biener wrote: > > > > Thanks for making this improvement. I've checked MIPS results and code > > > produced now is as follows: > > > > > > daddiu $sp,$sp,-64 > > > sd $5,24($sp) > >

[r14-2639 Regression] FAIL: gcc.dg/vect/bb-slp-pr95839-v8.c scan-tree-dump slp2 "optimized: basic block" on Linux/x86_64

2023-07-20 Thread haochen.jiang via Gcc-patches
On Linux/x86_64, c1e420549f2305efb70ed37e693d380724eb7540 is the first bad commit commit c1e420549f2305efb70ed37e693d380724eb7540 Author: Maciej W. Rozycki Date: Wed Jul 19 11:59:29 2023 +0100 testsuite: Add 64-bit vector variant for bb-slp-pr95839.c caused FAIL:

[r14-2629 Regression] FAIL: g++.dg/cpp0x/udlit-extended-id-3.C -std=c++20 (test for excess errors) on Linux/x86_64

2023-07-20 Thread haochen.jiang via Gcc-patches
On Linux/x86_64, 1d3e4f4e2d19c3394dc018118a78c1f4b59cb5c2 is the first bad commit commit 1d3e4f4e2d19c3394dc018118a78c1f4b59cb5c2 Author: Lewis Hyatt Date: Tue Jul 18 17:16:08 2023 -0400 libcpp: Handle extended characters in user-defined literal suffix [PR103902] caused FAIL:

[PATCH] sccvn: Correct the index of bias for IFN_LEN_STORE [PR110744]

2023-07-20 Thread Kewen.Lin via Gcc-patches
Hi, Commit r14-2267-gb8806f6ffbe72e adjusts the arguments order of LEN_STORE from {len,vector,bias} to {len,bias,vector}, in order to make them consistent with LEN_MASK_STORE and MASK_STORE. But it missed to update the related handlings in tree-ssa-sccvn.cc, it caused the failure shown in PR

[PATCH] testsuite: Add a test case for PR110729

2023-07-20 Thread Kewen.Lin via Gcc-patches
Hi, As PR110729 reported, there was one issue for .section __patchable_function_entries with -ffunction-sections, that is we put the same symbol as link_to section symbol for all functions wrongly. The commit r13-4294 for PR99889 has fixed this with the corresponding label LPFE* which sits in

Re: [PATCH v2] vect: Handle demoting FLOAT and promoting FIX_TRUNC.

2023-07-20 Thread Robin Dapp via Gcc-patches
>> cvt_type >> - = build_nonstandard_integer_type (GET_MODE_BITSIZE (imode), >> + = build_nonstandard_integer_type (GET_MODE_BITSIZE >> + (intermediate_mode), >>

Re: [PATCH, OpenACC 2.7, v2] Implement host_data must have use_device clause requirement

2023-07-20 Thread Thomas Schwinge
Hi Chung-Lin! On 2023-07-13T18:54:00+0800, Chung-Lin Tang wrote: > On 2023/6/16 5:13 PM, Thomas Schwinge wrote: >> OK with one small change, please -- unless there's a reason for doing it >> this way: [...] > I've adjusted the Fortran implementation as you described. Yes, I agree this > way >

[PATCH v4 3/3] c++: Improve location information in constant evaluation

2023-07-20 Thread Nathaniel Shead via Gcc-patches
This patch updates 'input_location' during constant evaluation to ensure that errors in subexpressions that lack location information still provide accurate diagnostics. By itself this change causes some small regressions in diagnostic quality for circumstances where errors used 'input_location'

[PATCH v4 2/3] c++: Improve constexpr error for dangling local variables [PR110619]

2023-07-20 Thread Nathaniel Shead via Gcc-patches
Currently, when typeck discovers that a return statement will refer to a local variable it rewrites to return a null pointer. This causes the error messages for using the return value in a constant expression to be unhelpful, especially for reference return values. This patch removes this

[PATCH v4 1/3] c++: Track lifetimes in constant evaluation [PR70331,PR96630,PR98675]

2023-07-20 Thread Nathaniel Shead via Gcc-patches
This adds rudimentary lifetime tracking in C++ constexpr contexts, allowing the compiler to report errors with using values after their backing has gone out of scope. We don't yet handle other ways of accessing values outside their lifetime (e.g. following explicit destructor calls). PR

[PATCH v4 0/3] c++: Track lifetimes in constant evaluation [PR70331, ...]

2023-07-20 Thread Nathaniel Shead via Gcc-patches
This is an update of the patch series at https://gcc.gnu.org/pipermail/gcc-patches/2023-July/623375.html Changes since v3: - Use void_node in values map to indicate out-of-lifetime instead of a separate hash set - Remove tracking of temporaries for loops and calls - Fix missed checks for uses

Re: [PATCH v2] Store_bit_field_1: Use SUBREG instead of REG if possible

2023-07-20 Thread Richard Sandiford via Gcc-patches
Richard Biener writes: #> On Thu, 20 Jul 2023, Richard Sandiford wrote: > >> Jeff Law via Gcc-patches writes: >> > On 7/19/23 04:25, Richard Biener wrote: >> >> On Wed, 19 Jul 2023, YunQiang Su wrote: >> >> >> >>> Eric Botcazou ?2023?7?19??? 17:45??? >> >> > I don't see that. That's

Re: [PATCH 2/3] testsuite: Require 128-bit vectors for bb-slp-pr95839.c

2023-07-20 Thread Maciej W. Rozycki
On Thu, 20 Jul 2023, Richard Biener wrote: > > Thanks for making this improvement. I've checked MIPS results and code > > produced now is as follows: > > > > daddiu $sp,$sp,-64 > > sd $5,24($sp) > > sd $7,40($sp) > > ldc1$f0,24($sp) > >

Re: [PATCH]AArch64 fix regexp for live_1.c sve test

2023-07-20 Thread Richard Sandiford via Gcc-patches
Jan Hubicka writes: >> Tamar Christina writes: >> > Hi All, >> > >> > The resulting predicate register of a whilelo is not >> > restricted to the lower half of the predicate register file. >> > >> > As such these tests started failing after recent changes >> > because the whilelo outside the

Re: [PATCH]AArch64 fix regexp for live_1.c sve test

2023-07-20 Thread Richard Sandiford via Gcc-patches
Richard Biener writes: > On Thu, 20 Jul 2023, Richard Sandiford wrote: > >> Tamar Christina writes: >> > Hi All, >> > >> > The resulting predicate register of a whilelo is not >> > restricted to the lower half of the predicate register file. >> > >> > As such these tests started failing after

[PATCH 2/3] RISC-V: Part-2: Save/Restore vector registers which need to be preversed

2023-07-20 Thread Lehua Ding
Because functions which follow vector calling convention variant has callee-saved vector reigsters but functions which follow standard calling convention don't have. We need to distinguish which function callee is so that we can tell GCC exactly which vector registers callee will clobber. So I

[PATCH 3/3] RISC-V: Part-3: Output .variant_cc directive for vector function

2023-07-20 Thread Lehua Ding
Functions which follow vector calling convention variant need be annotated by .variant_cc directive according the RISC-V Assembly Programmer's Manual and RISC-V ELF Specification[2]. [1] https://github.com/riscv-non-isa/riscv-asm-manual/blob/master/riscv-asm.md#pseudo-ops [2]

[PATCH 0/3] RISC-V: Add an experimental vector calling convention

2023-07-20 Thread Lehua Ding
Hi RISC-V folks, This patch implement the proposal of RISC-V vector calling convention[1] and this feature can be enabled by `--param=riscv-vector-abi` option. Currently, all vector type arguments and return values are pass by reference. With this patch, these arguments and return values can pass

[PATCH 1/3] RISC-V: Part-1: Select suitable vector registers for vector type args and returns

2023-07-20 Thread Lehua Ding
I have posted below the vector register calling convention rules from in the proposal[1]: v0 is used to pass the first vector mask argument to a function, and to return vector mask result from a function. v8-v23 are used to pass vector data arguments, vector tuple arguments and the rest vector

  1   2   >