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

[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

[committed] docs: fix copy 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 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

[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

[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. *

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 +++

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] [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 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 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

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

[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

[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. *

[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

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

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

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

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:

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,

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

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

[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

[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

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

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

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

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

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)

[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

[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

[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

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

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] 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

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

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.

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: [PATCH, rs6000] Add multiply-add expand pattern [PR103109]

2022-08-01 Thread Kewen.Lin via Gcc-patches
Hi Haochen, Thanks for the patch, some comments are inlined. on 2022/7/25 13:11, HAO CHEN GUI wrote: > Hi, > This patch adds an expand and several insns for multiply-add with > three 64bit operands. > > Bootstrapped and tested on powerpc64-linux BE and LE with no regressions. > Is this okay

[COMMITTED] Make irange dependency explicit for range_of_ssa_name_with_loop_info.

2022-08-01 Thread Aldy Hernandez via Gcc-patches
Even though ranger is type agnostic, SCEV seems to only work with integers. This patch removes some FIXME notes making it explicit that bounds_of_var_in_loop only works with iranges. Tested on x86-64 Linux. gcc/ChangeLog: * gimple-range-fold.cc (fold_using_range::range_of_phi): Only

[COMMITTED] const_tree conversion of vrange::supports_*

2022-08-01 Thread Aldy Hernandez via Gcc-patches
Make all vrange::supports_*_p methods const_tree as they can end up being called from functions that are const_tree. Tested on x86-64 Linux. gcc/ChangeLog: * value-range.cc (vrange::supports_type_p): Use const_tree. (irange::supports_type_p): Same.

[COMMITTED] Cleanups to frange.

2022-08-01 Thread Aldy Hernandez via Gcc-patches
These are some assorted cleanups to the frange class to make it easier to drop in an implementation with FP endpoints: * frange::set() had some asserts limiting the type of arguments passed. There's no reason why we can't handle all the variants. Worse comes to worse, we can always return a