Re: [GCC13][Patch][V2][2/2]Add a new option -fstrict-flex-array[=n] and attribute strict_flex_array(n) and use it in PR101836

2022-08-01 Thread Richard Biener via Gcc-patches
On Fri, 29 Jul 2022, Qing Zhao wrote: > > > > On Jul 28, 2022, at 3:28 AM, Richard Biener wrote: > > > > On Tue, 19 Jul 2022, Qing Zhao wrote: > > > >> From a09f39ded462611286a44d9e8273de8342673ba2 Mon Sep 17 00:00:00 2001 > >> From: Qing Zhao > >> Date: Mon, 18 Jul 2022 18:12:26 + > >>

Re: [Ada PATCH] Update configure to check for a recent gnat Ada compiler.

2022-08-01 Thread Arnaud Charlet via Gcc-patches
> GCC fails to bootstrap when configured with --enable-languages=all on > machines that have older versions of GNAT installed as the system Ada > compiler. In configure, it's not sufficient to check whether gnat is > available, but whether a sufficiently recent version of GNAT is > installed. Thi

Re: [GCC13][Patch][V2][1/2]Add a new option -fstrict-flex-array[=n] and attribute strict_flex_array(n) and use it in PR101836

2022-08-01 Thread Richard Biener via Gcc-patches
On Fri, 29 Jul 2022, Qing Zhao wrote: > Hi, Richard, > > Thanks a lot for your comments and suggestions. (And sorry for my late reply). > > > On Jul 28, 2022, at 3:26 AM, Richard Biener wrote: > > > > On Tue, 19 Jul 2022, Qing Zhao wrote: > > > >> From 3854004802b8e2f132ebf218fc35a632f5e80c6a

Re: [PATCH] configure: respect --with-build-time-tools [PR43301]

2022-08-01 Thread Andreas Schwab via Gcc-patches
On Jul 31 2022, Eric Gallager via Gcc-patches wrote: > It just makes the configure script respect the --with-build-time-tools > flag. Why does it make any difference? > diff --git a/configure b/configure > index 65d7078dbe7..4d46b94ebc4 100755 > --- a/configure > +++ b/configure > @@ -12850,7 +1

Re: [PATCH] tree-optimization/105679 - disable backward threading of unlikely entry

2022-08-01 Thread Richard Biener via Gcc-patches
On Sun, 31 Jul 2022, Iain Sandoe wrote: > Hi Richi, > > > On 29 Jul 2022, at 09:54, Richard Biener via Gcc-patches > > wrote: > > > > The following makes the backward threader reject threads whose entry > > edge is probably never executed according to the profile. That in > > particular, for

Re: [PATCH] tree-optimization/105679 - disable backward threading of unlikely entry

2022-08-01 Thread Iain Sandoe via Gcc-patches
> On 1 Aug 2022, at 09:21, Richard Biener via Gcc-patches > wrote: > > On Sun, 31 Jul 2022, Iain Sandoe wrote: > >> Hi Richi, >> >>> On 29 Jul 2022, at 09:54, Richard Biener via Gcc-patches >>> wrote: >>> >>> The following makes the backward threader reject threads whose entry >>> edge i

[PATCH] lto: replace $target with $host in configure.ac [PR106170]

2022-08-01 Thread Martin Liška
Pushed as obvious. Martin PR lto/106170 lto-plugin/ChangeLog: * configure.ac: Replace $target with $host. * configure: Regenerate. --- lto-plugin/configure| 2 +- lto-plugin/configure.ac | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lto-plug

[PATCH v4] LoongArch: add movable attribute

2022-08-01 Thread Xi Ruoyao via Gcc-patches
Changes v3 -> v4: * Use "movable" as the attribute name as Huacai says it's already used in downstream GCC fork. * Remove an inaccurate line from the doc. (Initially I tried to implement a "model(...)" like IA64 or M32R. Then I changed my mind but forgot to remove the line copied from M

[PATCH v5] LoongArch: add movable attribute

2022-08-01 Thread Xi Ruoyao via Gcc-patches
Changes v4 -> v5: Fix changelog. No code change. Changes v3 -> v4: * Use "movable" as the attribute name as Huacai says it's already used in downstream GCC fork. * Remove an inaccurate line from the doc. (Initially I tried to implement a "model(...)" like IA64 or M32R. Then I changed my

Re: [RFC] Teach vectorizer to deal with bitfield reads

2022-08-01 Thread Andre Vieira (lists) via Gcc-patches
On 29/07/2022 11:31, Jakub Jelinek wrote: On Fri, Jul 29, 2022 at 09:57:29AM +0100, Andre Vieira (lists) via Gcc-patches wrote: The 'only on the vectorized code path' remains the same though as vect_recog also only happens on the vectorized code path right? if conversion (in some cases) dupl

Re: [RFC] Teach vectorizer to deal with bitfield reads

2022-08-01 Thread Andre Vieira (lists) via Gcc-patches
On 29/07/2022 11:52, Richard Biener wrote: On Fri, 29 Jul 2022, Jakub Jelinek wrote: On Fri, Jul 29, 2022 at 09:57:29AM +0100, Andre Vieira (lists) via Gcc-patches wrote: The 'only on the vectorized code path' remains the same though as vect_recog also only happens on the vectorized code pa

Re: [PATCH v2] cselib: add function to check if SET is redundant [PR106187]

2022-08-01 Thread Richard Earnshaw via Gcc-patches
On 30/07/2022 20:57, Jeff Law via Gcc-patches wrote: On 7/29/2022 7:52 AM, Richard Earnshaw via Gcc-patches wrote: A SET operation that writes memory may have the same value as an earlier store but if the alias sets of the new and earlier store do not conflict then the set is not truly red

Re: [RFC] Teach vectorizer to deal with bitfield reads

2022-08-01 Thread Richard Biener via Gcc-patches
On Mon, 1 Aug 2022, Andre Vieira (lists) wrote: > > On 29/07/2022 11:52, Richard Biener wrote: > > On Fri, 29 Jul 2022, Jakub Jelinek wrote: > > > >> On Fri, Jul 29, 2022 at 09:57:29AM +0100, Andre Vieira (lists) via > >> Gcc-patches wrote: > >>> The 'only on the vectorized code path' remains the

Re: [PATCH] match.pd: Add new division pattern [PR104992]

2022-08-01 Thread Sam Feifer via Gcc-patches
Here is the patch that I pushed. Thanks for the feedback. Thanks -Sam On Thu, Jul 28, 2022 at 3:03 AM Richard Biener wrote: > On Wed, Jul 27, 2022 at 9:57 PM Sam Feifer wrote: > > > > > >> _Complex int are strange beasts, I'd simply avoid the transform for > them. > >> > > > > I added to the m

[x86_64 PATCH] PR target/106481: Handle CONST_WIDE_INT in REG_EQUAL during STV.

2022-08-01 Thread Roger Sayle
This patch resolves PR target/106481, and is an oversight in my recent battles with REG_EQUAL notes during TImode STV (see PR target/106278 https://gcc.gnu.org/pipermail/gcc-patches/2022-July/598416.html). The patch above's/current behaviour is that we check that the mode of the REG_EQUAL note is

[PATCH] tree-optimization/106495 - avoid threading to possibly never executed edge

2022-08-01 Thread Richard Biener via Gcc-patches
The following builds upon the logic of the PR105679 fix by avoiding to thread to a known edge that is predicted as probably never executed. Bootstrapped on x86_64-unknown-linux-gnu, testing in progress. PR tree-optimization/106495 * tree-ssa-threadbackward.cc (back_threade

Re: [GCC13][Patch][V2][2/2]Add a new option -fstrict-flex-array[=n] and attribute strict_flex_array(n) and use it in PR101836

2022-08-01 Thread Qing Zhao via Gcc-patches
> On Aug 1, 2022, at 3:13 AM, Richard Biener wrote: > > On Fri, 29 Jul 2022, Qing Zhao wrote: > >> >> >>> On Jul 28, 2022, at 3:28 AM, Richard Biener wrote: >>> >>> On Tue, 19 Jul 2022, Qing Zhao wrote: >>> From a09f39ded462611286a44d9e8273de8342673ba2 Mon Sep 17 00:00:00 2001 F

Re: [x86_64 PATCH] PR target/106481: Handle CONST_WIDE_INT in REG_EQUAL during STV.

2022-08-01 Thread Uros Bizjak via Gcc-patches
On Mon, Aug 1, 2022 at 3:43 PM Roger Sayle wrote: > > > This patch resolves PR target/106481, and is an oversight in my recent > battles with REG_EQUAL notes during TImode STV (see PR target/106278 > https://gcc.gnu.org/pipermail/gcc-patches/2022-July/598416.html). > > The patch above's/current be

Re: [GCC13][Patch][V2][1/2]Add a new option -fstrict-flex-array[=n] and attribute strict_flex_array(n) and use it in PR101836

2022-08-01 Thread Qing Zhao via Gcc-patches
> On Aug 1, 2022, at 3:38 AM, Richard Biener wrote: > > On Fri, 29 Jul 2022, Qing Zhao wrote: > >> Hi, Richard, >> >> Thanks a lot for your comments and suggestions. (And sorry for my late >> reply). >> >>> On Jul 28, 2022, at 3:26 AM, Richard Biener wrote: >>> >>> On Tue, 19 Jul 2022, Qi

Re: [PATCH] configure: respect --with-build-time-tools [PR43301]

2022-08-01 Thread Eric Gallager via Gcc-patches
On Mon, Aug 1, 2022 at 3:54 AM Andreas Schwab wrote: > > On Jul 31 2022, Eric Gallager via Gcc-patches wrote: > > > It just makes the configure script respect the --with-build-time-tools > > flag. > > Why does it make any difference? > See the original bug report: https://gcc.gnu.org/bugzilla/sho

Re: [PATCH, rs6000] Add multiply-add expand pattern [PR103109]

2022-08-01 Thread Segher Boessenkool
Hi! On Mon, Jul 25, 2022 at 01:11:47PM +0800, HAO CHEN GUI wrote: > This patch adds an expand and several insns for multiply-add with > three 64bit operands. > PR target/103109 > * config/rs6000/rs6000.md (maddditi4): New pattern for > multiply-add. Please don't break lines u

Re: [PATCH, rs6000] Add multiply-add expand pattern [PR103109]

2022-08-01 Thread Segher Boessenkool
On Mon, Aug 01, 2022 at 02:19:32PM +0800, Kewen.Lin wrote: > > new file mode 100644 > > index 000..256e05d5677 > > --- /dev/null > > +++ b/gcc/testsuite/gcc.target/powerpc/pr103109.c > > @@ -0,0 +1,16 @@ > > +/* { dg-do compile { target { lp64 } } } */ > > Since the guard is TARGET_POWERPC

Re: [PATCH V2] btf: emit linkage information in BTF_KIND_FUNC entries

2022-08-01 Thread Jose E. Marchesi via Gcc-patches
> On 7/12/22 08:13, Jose E. Marchesi via Gcc-patches wrote: >> >> The kernel bpftool expects BTF_KIND_FUNC entries in BTF to include an >> annotation reflecting the linkage of functions (static, global). For >> whatever reason they abuse the `vlen' field of the BTF_KIND_FUNC entry >> instead of

[PATCH 1/3 v2] C: Implement C2X N2653 char8_t and UTF-8 string literal changes

2022-08-01 Thread Tom Honermann via Gcc-patches
This patch implements the core language and compiler dependent library changes adopted for C2X via WG14 N2653. The changes include: - Change of type for UTF-8 string literals from array of const char to array of const char8_t (unsigned char). - A new atomic_char8_t typedef. - A new ATOMIC_CHAR8_

[PATCH 2/3 v2] testsuite: Add tests for C2X N2653 char8_t and UTF-8 string literal changes

2022-08-01 Thread Tom Honermann via Gcc-patches
This change provides new tests for the core language and compiler dependent library changes adopted for C2X via WG14 N2653. gcc/testsuite/ChangeLog: * gcc.dg/atomic/c2x-stdatomic-lockfree-char8_t.c: New test. * gcc.dg/atomic/gnu2x-stdatomic-lockfree-char8_t.c: New test. * g

[PATCH 1/1 v2] c++/106423: Fix pragma suppression of -Wc++20-compat diagnostics.

2022-08-01 Thread Tom Honermann via Gcc-patches
Gcc's '#pragma GCC diagnostic' directives are processed in "early mode" (see handle_pragma_diagnostic_early) for the C++ frontend and, as such, require that the target diagnostic option be enabled for the preprocessor (see c_option_is_from_cpp_diagnostics). This change modifies the -Wc++20-compat

Re: [PATCH] btf: do not use the CHAR `encoding' bit for BTF

2022-08-01 Thread David Faust via Gcc-patches
On 7/26/22 14:58, Indu Bhagat wrote: > On 7/22/22 4:23 AM, Jose E. Marchesi via Gcc-patches wrote: >> >> Contrary to CTF and our previous expectations, as per [1], turns out >> that in BTF: >> >> 1) The `encoding' field in integer types shall not be treated as a >> bitmap, but as an enumerat

Re: [PATCH] [PR83782] i386 PIE: avoid @GOTOFF for ifuncs and their aliases

2022-08-01 Thread H.J. Lu via Gcc-patches
On Thu, Jul 28, 2022 at 9:31 AM H.J. Lu wrote: > > On Thu, Jul 28, 2022 at 1:26 AM Alexandre Oliva wrote: > > > > On Jul 27, 2022, "H.J. Lu" wrote: > > > > > On Tue, Jul 26, 2022 at 10:14 PM Alexandre Oliva > > > wrote: > > > > >> The use of @GOTOFF for locally-bound but externally-visible sym

Re: [PATCH 2/3 v2] testsuite: Add tests for C2X N2653 char8_t and UTF-8 string literal changes

2022-08-01 Thread Joseph Myers
On Mon, 1 Aug 2022, Tom Honermann via Gcc-patches wrote: > diff --git a/gcc/testsuite/gcc.dg/c2x-predefined-macros.c > b/gcc/testsuite/gcc.dg/c2x-predefined-macros.c > new file mode 100644 > index 000..3456105563a > --- /dev/null > +++ b/gcc/testsuite/gcc.dg/c2x-predefined-macros.c > @@ -

Re: [PATCH] [PR83782] i386 PIE: avoid @GOTOFF for ifuncs and their aliases

2022-08-01 Thread Fangrui Song via Gcc-patches
On Mon, Aug 1, 2022 at 12:05 PM H.J. Lu via Gcc-patches wrote: > > On Thu, Jul 28, 2022 at 9:31 AM H.J. Lu wrote: > > > > On Thu, Jul 28, 2022 at 1:26 AM Alexandre Oliva wrote: > > > > > > On Jul 27, 2022, "H.J. Lu" wrote: > > > > > > > On Tue, Jul 26, 2022 at 10:14 PM Alexandre Oliva > > > >

Re: [PATCH, rs6000] Add multiply-add expand pattern [PR103109]

2022-08-01 Thread Segher Boessenkool
Hi! On Mon, Jul 25, 2022 at 01:11:47PM +0800, HAO CHEN GUI wrote: > +(define_insn "madddi4_lowpart" > + [(set (match_operand:DI 0 "gpc_reg_operand" "=r") > + (subreg:DI > + (plus:TI > + (mult:TI (any_extend:TI > +(match_operand:DI 1 "gpc_reg_operand" "r")) >

Re: [PATCH 2/3 v2] testsuite: Add tests for C2X N2653 char8_t and UTF-8 string literal changes

2022-08-01 Thread Tom Honermann via Gcc-patches
On 8/1/22 3:13 PM, Joseph Myers wrote: On Mon, 1 Aug 2022, Tom Honermann via Gcc-patches wrote: diff --git a/gcc/testsuite/gcc.dg/c2x-predefined-macros.c b/gcc/testsuite/gcc.dg/c2x-predefined-macros.c new file mode 100644 index 000..3456105563a --- /dev/null +++ b/gcc/testsuite/gcc.dg/

[PATCH 2/3 v3] testsuite: Add tests for C2X N2653 char8_t and UTF-8 string literal changes

2022-08-01 Thread Tom Honermann via Gcc-patches
This change provides new tests for the core language and compiler dependent library changes adopted for C2X via WG14 N2653. gcc/testsuite/ChangeLog: * gcc.dg/atomic/c2x-stdatomic-lockfree-char8_t.c: New test. * gcc.dg/atomic/gnu2x-stdatomic-lockfree-char8_t.c: New test. * g

[COMMITTED,gcc12] c: Fix location for _Pragma tokens [PR97498]

2022-08-01 Thread Lewis Hyatt via Gcc-patches
Hello- This backport from r13-1596 to GCC 12 has been committed after pre-approval. This was a straightforward cherry-pick from master with no adjustments needed. I would like to note that subsequent to r13-1596, Thomas made a few commits to the libgomp testsuite to test for new diagnostic not

[committed] docs: fix copy&paste error in -Wanalyzer-putenv-of-auto-var

2022-08-01 Thread David Malcolm via Gcc-patches
Pushed to trunk as r13-1921-gffd12be1394a49. gcc/ChangeLog: * doc/invoke.texi (-Wanalyzer-putenv-of-auto-var): Fix copy&paste error. Signed-off-by: David Malcolm --- gcc/doc/invoke.texi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/doc/invoke.texi b/gcc

[committed] c: improvements to address space diagnostics

2022-08-01 Thread David Malcolm via Gcc-patches
This adds a clarifying "note" to address space mismatch diagnostics. For example, it improves the diagnostic for gcc.target/i386/addr-space-typeck-2.c from: addr-space-typeck-2.c: In function 'test_bad_call': addr-space-typeck-2.c:12:22: error: passing argument 2 of 'expects_seg_gs' from pointer

Re: [PATCH] configure: respect --with-build-time-tools [PR43301]

2022-08-01 Thread Alexandre Oliva via Gcc-patches
Hello, Eric, Thanks for looking into this. On Aug 1, 2022, Eric Gallager via Gcc-patches wrote: >> This just reassigns the value that was retrieved a couple of lines >> above from the very same variable. > Oh, ok, so I guess this isn't necessary after all? Yeah, I don't see how this patch co

[PATCH] lto/106334 - fix previous fix wrt -flto-partition=none

2022-08-01 Thread Richard Biener via Gcc-patches
This adjusts the assert guard to include -flto-partition=none which behaves as WPA. Bootstrapped & tested on x86_64-unknown-linux-gnu, pushed. PR lto/106334 * dwarf2out.cc (dwarf2out_register_external_die): Adjust assert. --- gcc/dwarf2out.cc | 11 ++- 1 file chan

[PATCH] tree-optimization/106498 - reduce SSA updates in autopar

2022-08-01 Thread Richard Biener via Gcc-patches
The following reduces the number of SSA updates done during autopar OMP expansion, specifically avoiding the cases that just add virtual operands (where maybe none have been before) in dead regions of the CFG. Instead virtual SSA update is delayed until after the pass. There's much more TLC neede