Re: [PATCH] Support logic shift left/right for avx512 mask type.

2021-07-20 Thread Hongtao Liu via Gcc-patches
On Tue, Jul 20, 2021 at 9:41 PM Uros Bizjak wrote: > > On Tue, Jul 20, 2021 at 2:33 PM liuhongt wrote: > > > > Hi: > > As mention in > > https://gcc.gnu.org/pipermail/gcc-patches/2021-July/575420.html > > > > cut start- > > > note for the lowpart we can just view-convert away the

Re: [PATCH 10/55] rs6000: Main function with stubs for parsing and output

2021-07-20 Thread Bill Schmidt via Gcc-patches
On 7/20/21 6:22 PM, Segher Boessenkool wrote: Hi! On Tue, Jul 20, 2021 at 05:19:54PM -0500, Bill Schmidt wrote: See the main function.  All three files are guaranteed to have been opened for writing when this is called, but some of them may have already been closed.  So the fclose calls may

Re: [PATCH 19/55] rs6000: Write output to the builtins init file, part 2 of 3

2021-07-20 Thread Segher Boessenkool
On Thu, Jun 17, 2021 at 10:19:03AM -0500, Bill Schmidt wrote: > 2021-06-07 Bill Schmidt > > gcc/ > * config/rs6000/rs6000-gen-builtins.c (write_init_bif_table): > Implement. Okido. Thanks! Segher

Re: [PATCH 18/55] rs6000: Write output to the builtins init file, part 1 of 3

2021-07-20 Thread Segher Boessenkool
On Thu, Jun 17, 2021 at 10:19:02AM -0500, Bill Schmidt wrote: > 2021-06-07 Bill Schmidt > > gcc/ > * config/rs6000/rs6000-gen-builtins.c (write_fntype): New > callback function. > (write_fntype_init): New stub function. > (write_init_bif_table): Likewise. >

Re: [PATCH 17/55] rs6000: Write output to the builtins header file

2021-07-20 Thread Segher Boessenkool
On Thu, Jun 17, 2021 at 10:19:01AM -0500, Bill Schmidt wrote: > 2021-06-07 Bill Schmidt > > gcc/ > * config/rs6000/rs6000-gen-builtins.c > (write_autogenerated_header): New function. > (write_decls): Likewise. > (write_extern_fntype): New callback function. >

Re: [PATCH 16/55] rs6000: Write output to the builtin definition include file

2021-07-20 Thread Segher Boessenkool
On Thu, Jun 17, 2021 at 10:19:00AM -0500, Bill Schmidt wrote: > 2021-06-07 Bill Schmidt > > gcc/ > * config/rs6000/rs6000-gen-builtins.c (write_defines_file): > Implement. Okay for trunk. Thanks! Segher

Re: [PATCH 10/55] rs6000: Main function with stubs for parsing and output

2021-07-20 Thread Segher Boessenkool
Hi! On Tue, Jul 20, 2021 at 05:19:54PM -0500, Bill Schmidt wrote: > See the main function.  All three files are guaranteed to have been > opened for writing when this is called, but some of them may have > already been closed.  So the fclose calls may fail to do anything, but > the unlinks

Re: [PATCH] Fix for powerpc64 long double complex divide failure

2021-07-20 Thread Segher Boessenkool
Hi! On Thu, Jul 08, 2021 at 09:24:31PM +, Patrick McGehearty via Gcc-patches wrote: > This patch resolves the failure of powerpc64 long double complex divide > in native ibm long double format after the patch "Practical improvement > to libgcc complex divide". > See

Re: [PATCH 10/55] rs6000: Main function with stubs for parsing and output

2021-07-20 Thread Bill Schmidt via Gcc-patches
Hi Segher, On 7/19/21 2:15 PM, Segher Boessenkool wrote: Hi! On Thu, Jun 17, 2021 at 10:18:54AM -0500, Bill Schmidt wrote: * config/rs6000/rs6000-gen-builtins.c (rbtree.h): New #include. (num_bifs): New variable. (num_ovld_stanzas): Likewise. (num_ovlds):

Re: [PATCH] gcov: Fix use of profile info section

2021-07-20 Thread Jeff Law via Gcc-patches
On 7/14/2021 1:46 AM, Sebastian Huber wrote: If the -fprofile-info-section is used, then the gcov information is registered in a linker set. This is done by build_gcov_info_var_registration(). The compiler generated object placed in the section was not marked as referenced, so once

[PATCH] Fix PR 10153: tail recusion for vector types.

2021-07-20 Thread apinski--- via Gcc-patches
From: Andrew Pinski The problem here is we try to an initialized value from a scalar constant. For vectors we need to do a vect_dup instead. This fixes that issue and we get the correct code even and it does not crash. OK? Bootstrapped and tested on aarch64-linux-gnu with no regressions.

[PATCH] include: Fix -Wundef warnings in ansidecl.h

2021-07-20 Thread Marek Polacek via Gcc-patches
This quashes -Wundef warnings in ansidecl.h when compiled in C or C++. In C, __cpp_constexpr and __cplusplus aren't defined so we evaluate them to 0; conversely, __STDC_VERSION__ is not defined in C++. This has caused grief when -Wundef is used with -Werror. I've also tested -traditional-cpp.

Re: [PING][PATCH] define auto_vec copy ctor and assignment (PR 90904)

2021-07-20 Thread Martin Sebor via Gcc-patches
On 7/20/21 2:08 PM, Jason Merrill wrote: On 7/20/21 2:34 PM, Martin Sebor wrote: On 7/14/21 10:23 AM, Jason Merrill wrote: On 7/14/21 10:46 AM, Martin Sebor wrote: On 7/13/21 9:39 PM, Jason Merrill wrote: On 7/13/21 4:02 PM, Martin Sebor wrote: On 7/13/21 12:37 PM, Jason Merrill wrote: On

Re: [PATCH] Fix for powerpc64 long double complex divide failure

2021-07-20 Thread Segher Boessenkool
On Tue, Jul 20, 2021 at 11:25:29AM -0500, Patrick McGehearty via Gcc-patches wrote: > Ping... > > The fix is minimal (four lines changed). > I recognize that those familiar with IBM 128-bit floating > point precision is a select set of people. > On the plus side, tests fail without the patch and

Re: [PATCH 0/4] libsanitizer: Sync with upstream

2021-07-20 Thread H.J. Lu via Gcc-patches
On Tue, Jul 20, 2021 at 1:58 PM Jeff Law wrote: > > > > On 7/20/2021 2:55 PM, H.J. Lu via Gcc-patches wrote: > > 1. Sync with upstream commit 7704fedfff6ef5676adb6415f3be0ac927d1a746 > > 2. Apply local patche > > 3. Update LOCAL_PATCHES > > 4. Bump asan/tsan versions for the upstream commit: > >

Re: [PATCH 0/4] libsanitizer: Sync with upstream

2021-07-20 Thread Jeff Law via Gcc-patches
On 7/20/2021 2:55 PM, H.J. Lu via Gcc-patches wrote: 1. Sync with upstream commit 7704fedfff6ef5676adb6415f3be0ac927d1a746 2. Apply local patche 3. Update LOCAL_PATCHES 4. Bump asan/tsan versions for the upstream commit: commit acf0a6428681dccac803984bfbb1e3e54248f090 Author: Ilya

[PATCH 2/4] libsanitizer: Apply local patches

2021-07-20 Thread H.J. Lu via Gcc-patches
--- libsanitizer/asan/asan_globals.cpp| 19 -- libsanitizer/asan/asan_interceptors.h | 7 ++- libsanitizer/asan/asan_mapping.h | 2 +- .../sanitizer_linux_libcdep.cpp | 4 .../sanitizer_common/sanitizer_mac.cpp| 12

[PATCH 0/4] libsanitizer: Sync with upstream

2021-07-20 Thread H.J. Lu via Gcc-patches
1. Sync with upstream commit 7704fedfff6ef5676adb6415f3be0ac927d1a746 2. Apply local patche 3. Update LOCAL_PATCHES 4. Bump asan/tsan versions for the upstream commit: commit acf0a6428681dccac803984bfbb1e3e54248f090 Author: Ilya Leoshkevich Date: Fri Jul 2 02:42:38 2021 +0200

[PATCH 4/4] libsanitizer: Bump asan/tsan versions

2021-07-20 Thread H.J. Lu via Gcc-patches
Bump asan/tsan versions for the upstream commit: commit acf0a6428681dccac803984bfbb1e3e54248f090 Author: Ilya Leoshkevich Date: Fri Jul 2 02:42:38 2021 +0200 [sanitizer] Fix __sanitizer_kernel_sigset_t endianness issue setuid(0) hangs on SystemZ under TSan because TSan's

[PATCH 3/4] libsanitizer: Update LOCAL_PATCHES

2021-07-20 Thread H.J. Lu via Gcc-patches
* LOCAL_PATCHES: Update to the corresponding revision. --- libsanitizer/LOCAL_PATCHES | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/libsanitizer/LOCAL_PATCHES b/libsanitizer/LOCAL_PATCHES index b1969fc7882..d45655392b0 100644 --- a/libsanitizer/LOCAL_PATCHES +++

Re: [PATCH] c-family: Add __builtin_assoc_barrier

2021-07-20 Thread Jason Merrill via Gcc-patches
On 7/19/21 8:34 AM, Richard Biener wrote: On Mon, 19 Jul 2021, Matthias Kretz wrote: tested on x86_64-pc-linux-gnu with no new failures. OK for master? I think now that PAREN_EXPR can appear in C++ code you need to adjust some machiner to expect it (constexpr folding? template stuff?). I

Re: '#pragma GCC diagnostic' (mis-)use in 'statement' of 'if'

2021-07-20 Thread Jakub Jelinek via Gcc-patches
On Tue, Jul 20, 2021 at 01:47:01PM -0600, Martin Sebor wrote: > > Addressing that is for another day. > > David Malcolm (CC'd) has a patch attached to pr63326 to issue > a warning to point out that #pragmas are treated as statements > that would help prevent this type of a bug. David, do you

Re: [PING][PATCH] define auto_vec copy ctor and assignment (PR 90904)

2021-07-20 Thread Jason Merrill via Gcc-patches
On 7/20/21 2:34 PM, Martin Sebor wrote: On 7/14/21 10:23 AM, Jason Merrill wrote: On 7/14/21 10:46 AM, Martin Sebor wrote: On 7/13/21 9:39 PM, Jason Merrill wrote: On 7/13/21 4:02 PM, Martin Sebor wrote: On 7/13/21 12:37 PM, Jason Merrill wrote: On 7/13/21 10:08 AM, Jonathan Wakely wrote:

Re: [PATCH] correct range of stpcpy result (PR 101397)

2021-07-20 Thread Martin Sebor via Gcc-patches
On 7/20/21 10:08 AM, Jeff Law wrote: On 7/14/2021 7:49 PM, Martin Sebor via Gcc-patches wrote: Access warnings look through calls to the subset of built-ins that return one of their pointer arguments to find the object the pointer it points to and its offset.  The computation is wrong for

[PATCH] PR fortran/101514 - ICE: out of memory allocating 18446744073709551600 bytes

2021-07-20 Thread Harald Anlauf via Gcc-patches
While investigating one of Gerhard's latest bug reports, which was almost obvious to fix after a hint by Richard Biener, I found further variants of valid and invalid code that lead to either NULL pointer dereferences or similar OOM situations. Regtested on x86_64-pc-linux-gnu. OK for mainline /

Re: '#pragma GCC diagnostic' (mis-)use in 'statement' of 'if'

2021-07-20 Thread Martin Sebor via Gcc-patches
On 7/20/21 2:40 AM, Thomas Schwinge wrote: Hi! On 2021-07-20T09:23:24+0200, I wrote: On 2021-07-19T10:46:35+0200, I wrote: | On 7/16/21 11:42 AM, Thomas Schwinge wrote: |> On 2021-07-09T17:11:25-0600, Martin Sebor via Gcc-patches wrote: |>> The attached tweak avoids the new -Warray-bounds

[PATCH] libstdc++: Use __builtin_operator_new when available [PR94295]

2021-07-20 Thread Jonathan Wakely via Gcc-patches
Clang provides __builtin_operator_new and __builtin_operator_delete, which have the same semantics as ::operator new and ::operator delete except that the compiler is allowed to elide calls to them. This changes std::allocator to use those built-in functions so that memory allocated by

[committed] libstdc++: Fix create_directories to resolve symlinks [PR101510]

2021-07-20 Thread Jonathan Wakely via Gcc-patches
On 20/07/21 12:59 +0100, Jonathan Wakely wrote: Signed-off-by: Jonathan Wakely libstdc++-v3/ChangeLog: PR libstdc++/101510 * src/c++17/fs_ops.cc (create_dir): Adjust whitespace. * testsuite/27_io/filesystem/operations/create_directory.cc: Test creating

Re: [PATCH] Fold bswap32(x) != 0 to x != 0 (and related transforms)

2021-07-20 Thread Jeff Law via Gcc-patches
On 7/18/2021 4:03 PM, Marc Glisse wrote: On Sun, 18 Jul 2021, Roger Sayle wrote: +    (if (GIMPLE || !TREE_SIDE_EFFECTS (@0)) I don't think you need to worry about that, the general genmatch machinery is already supposed to take care of it. All the existing cases in match.pd are about

Re: PING 2 [PATCH] handle sanitizer built-ins in -Wuninitialized (PR 101300)

2021-07-20 Thread Martin Sebor via Gcc-patches
On 7/20/21 4:48 AM, Jeff Law wrote: On 7/19/2021 6:01 PM, Martin Sebor via Gcc-patches wrote: Ping: https://gcc.gnu.org/pipermail/gcc-patches/2021-July/574385.html On 7/12/21 12:06 PM, Martin Sebor wrote: Ping: https://gcc.gnu.org/pipermail/gcc-patches/2021-July/574385.html On 7/2/21 1:21

Re: [PATCH] Add QI vector mode support to by-pieces for memset

2021-07-20 Thread H.J. Lu via Gcc-patches
On Tue, Jul 20, 2021 at 8:12 AM Richard Sandiford wrote: > > Richard Sandiford via Gcc-patches writes: > > "H.J. Lu via Gcc-patches" writes: > >> On Mon, Jul 19, 2021 at 11:38 PM Richard Sandiford > >> wrote: > >>> > >>> "H.J. Lu via Gcc-patches" writes: > >>> >> > + { > >>> >> > +

[PATCH v3] Add QI vector mode support to by-pieces for memset

2021-07-20 Thread H.J. Lu via Gcc-patches
1. Replace scalar_int_mode with fixed_size_mode in the by-pieces infrastructure to allow non-integer mode. 2. Rename widest_int_mode_for_size to widest_fixed_size_mode_for_size to return QI vector mode for memset. 3. Add op_by_pieces_d::smallest_fixed_size_mode_for_size to return the smallest

Re: [PING][PATCH] define auto_vec copy ctor and assignment (PR 90904)

2021-07-20 Thread Martin Sebor via Gcc-patches
On 7/14/21 10:23 AM, Jason Merrill wrote: On 7/14/21 10:46 AM, Martin Sebor wrote: On 7/13/21 9:39 PM, Jason Merrill wrote: On 7/13/21 4:02 PM, Martin Sebor wrote: On 7/13/21 12:37 PM, Jason Merrill wrote: On 7/13/21 10:08 AM, Jonathan Wakely wrote: On Mon, 12 Jul 2021 at 12:02, Richard

Re: [PATCH] c++: implement C++17 hardware interference size

2021-07-20 Thread Thomas Rodgers
On 2021-07-17 06:32, Jonathan Wakely via Gcc-patches wrote: On Sat, 17 Jul 2021, 09:15 Matthias Kretz, wrote: On Friday, 16 July 2021 21:58:36 CEST Jonathan Wakely wrote: On Fri, 16 Jul 2021 at 20:26, Matthias Kretz wrote: On Friday, 16 July 2021 18:54:30 CEST Jonathan Wakely wrote: On

Re: [PATCH] unroll: Avoid unnecessary tail loops for constant niters

2021-07-20 Thread Richard Biener via Gcc-patches
On July 20, 2021 5:31:17 PM GMT+02:00, Richard Sandiford via Gcc-patches wrote: >unroll and jam can decide to unroll the outer loop of a nest like: > > for (int j = 0; j < n; ++j) >for (int i = 0; i < n; ++i) > x[i] += __builtin_expf (y[j][i]); > >It then uses a tail loop to handle any

Re: [PATCH] unroll: Run VN on unrolled-and-jammed loops

2021-07-20 Thread Richard Biener via Gcc-patches
On July 20, 2021 5:56:35 PM GMT+02:00, Richard Sandiford via Gcc-patches wrote: >Unroll and jam can sometimes leave redundancies. E.g. for: > > for (int j = 0; j < 100; ++j) >for (int i = 0; i < 100; ++i) > x[i] += y[i] * z[j][i]; > >the new loop will do the equivalent of: > > for

Re: [PATCH] rs6000: Fix up easy_vector_constant_msb handling [PR101384]

2021-07-20 Thread Segher Boessenkool
On Tue, Jul 20, 2021 at 05:24:57PM +0200, Jakub Jelinek wrote: > On Tue, Jul 20, 2021 at 10:17:08AM -0500, Segher Boessenkool wrote: > > > I think not all of the -Wpsabi diagnostics is emitted with warning{,_at} > > > etc. that -w disables, others are emitted with inform. > > > > /* An

Re: [PATCH] c++: implement C++17 hardware interference size

2021-07-20 Thread Jason Merrill via Gcc-patches
On 7/19/21 5:41 AM, Richard Earnshaw wrote: On 17/07/2021 22:37, Jason Merrill via Gcc-patches wrote: On Sat, Jul 17, 2021 at 6:55 AM Matthias Kretz wrote: On Saturday, 17 July 2021 15:32:42 CEST Jonathan Wakely wrote: On Sat, 17 Jul 2021, 09:15 Matthias Kretz, wrote: If somebody writes

Re: [PATCH] Fix for powerpc64 long double complex divide failure

2021-07-20 Thread Patrick McGehearty via Gcc-patches
Ping... The fix is minimal (four lines changed). I recognize that those familiar with IBM 128-bit floating point precision is a select set of people. On the plus side, tests fail without the patch and pass with the patch. - patrick On 7/8/2021 4:24 PM, Patrick McGehearty via Gcc-patches

Re: [PATCH v2] c++tools, configury: Configure with C++; test checking status [PR98821].

2021-07-20 Thread Jakub Jelinek via Gcc-patches
On Tue, Jul 20, 2021 at 05:20:27PM +0100, Iain Sandoe wrote: > Signed-off-by: Iain Sandoe > > PR c++/98821 - modules : c++tools configures with CC but code fragments > assume CXX. > > PR c++/98821 > > c++tools/ChangeLog: > > * config.h.in: Regenerate. > * configure:

[PATCH v2] c++tools, configury: Configure with C++; test checking status [PR98821].

2021-07-20 Thread Iain Sandoe
Hi Jakub, thanks for the quick review, testing is on-going. > On 20 Jul 2021, at 16:37, Jakub Jelinek wrote: > > On Tue, Jul 20, 2021 at 04:21:34PM +0100, Iain Sandoe wrote: > >> --- a/c++tools/configure.ac >> +++ b/c++tools/configure.ac >> @@ -41,6 +41,8 @@ MISSING=`cd $ac_aux_dir &&

Re: [PATCH 2/4]AArch64: correct usdot vectorizer and intrinsics optabs

2021-07-20 Thread Richard Sandiford via Gcc-patches
Tamar Christina writes: >> -Original Message- >> From: Richard Sandiford >> Sent: Thursday, July 15, 2021 8:35 PM >> To: Tamar Christina >> Cc: gcc-patches@gcc.gnu.org; nd ; Richard Earnshaw >> ; Marcus Shawcroft >> ; Kyrylo Tkachov >> Subject: Re: [PATCH 2/4]AArch64: correct usdot

Re: [PATCH] correct range of stpcpy result (PR 101397)

2021-07-20 Thread Jeff Law via Gcc-patches
On 7/14/2021 7:49 PM, Martin Sebor via Gcc-patches wrote: Access warnings look through calls to the subset of built-ins that return one of their pointer arguments to find the object the pointer it points to and its offset.  The computation is wrong for functions like stpcpy, stpncpy and

[PATCH] unroll: Run VN on unrolled-and-jammed loops

2021-07-20 Thread Richard Sandiford via Gcc-patches
Unroll and jam can sometimes leave redundancies. E.g. for: for (int j = 0; j < 100; ++j) for (int i = 0; i < 100; ++i) x[i] += y[i] * z[j][i]; the new loop will do the equivalent of: for (int j = 0; j < 100; j += 2) for (int i = 0; i < 100; ++i) { x[i] += y[i] *

Re: [PATCH] c++tools, configury: Configure with C++; test checking status [PR98821].

2021-07-20 Thread Jakub Jelinek via Gcc-patches
On Tue, Jul 20, 2021 at 04:21:34PM +0100, Iain Sandoe wrote: > --- a/c++tools/configure.ac > +++ b/c++tools/configure.ac > @@ -41,6 +41,8 @@ MISSING=`cd $ac_aux_dir && ${PWDCMD-pwd}`/missing > AC_CHECK_PROGS([AUTOCONF], [autoconf], [$MISSING autoconf]) > AC_CHECK_PROGS([AUTOHEADER],

[PATCH] unroll: Avoid unnecessary tail loops for constant niters

2021-07-20 Thread Richard Sandiford via Gcc-patches
unroll and jam can decide to unroll the outer loop of a nest like: for (int j = 0; j < n; ++j) for (int i = 0; i < n; ++i) x[i] += __builtin_expf (y[j][i]); It then uses a tail loop to handle any left-over iterations. However, the code is structured so that this tail loop is always

[committed] libstdc++: fix is_default_constructible for hash containers [PR 100863]

2021-07-20 Thread Jonathan Wakely via Gcc-patches
On 02/06/21 13:35 +0100, Jonathan Wakely wrote: The allocator, hash function and equality function should all be value-initialized by the default constructor of an unordered container. Do it in the EBO helper, so we don't have to get it right in multiple places. Signed-off-by: Jonathan Wakely

Re: [PATCH] rs6000: Fix up easy_vector_constant_msb handling [PR101384]

2021-07-20 Thread Jakub Jelinek via Gcc-patches
On Tue, Jul 20, 2021 at 10:17:08AM -0500, Segher Boessenkool wrote: > On Tue, Jul 20, 2021 at 05:01:00PM +0200, Jakub Jelinek wrote: > > On Tue, Jul 20, 2021 at 09:48:26AM -0500, Segher Boessenkool wrote: > > > > --- gcc/testsuite/gcc.dg/pr101384.c.jj 2021-07-13 13:45:42.971992584 > > > > +0200

[PATCH] c++tools, configury: Configure with C++; test checking status [PR98821].

2021-07-20 Thread Iain Sandoe
Hi Folks, Following Jakub’s suggestions (on irc) here is a patch that works around misconfiguration of the c++tools directory present for at least Linux and Darwin (probably on any platform that does not have typedefs for the inet structs in its system headers). This also pulls in tests for

Re: [PATCH] rs6000: Fix up easy_vector_constant_msb handling [PR101384]

2021-07-20 Thread Segher Boessenkool
On Tue, Jul 20, 2021 at 05:01:00PM +0200, Jakub Jelinek wrote: > On Tue, Jul 20, 2021 at 09:48:26AM -0500, Segher Boessenkool wrote: > > > --- gcc/testsuite/gcc.dg/pr101384.c.jj2021-07-13 13:45:42.971992584 > > > +0200 > > > +++ gcc/testsuite/gcc.dg/pr101384.c 2021-07-13

Re: [PATCH] Add QI vector mode support to by-pieces for memset

2021-07-20 Thread Richard Sandiford via Gcc-patches
Richard Sandiford via Gcc-patches writes: > "H.J. Lu via Gcc-patches" writes: >> On Mon, Jul 19, 2021 at 11:38 PM Richard Sandiford >> wrote: >>> >>> "H.J. Lu via Gcc-patches" writes: >>> >> > + { >>> >> > + /* First generate subreg of word mode if the previous mode is >>> >> > +

Re: [PATCH] rs6000: Fix up easy_vector_constant_msb handling [PR101384]

2021-07-20 Thread Jakub Jelinek via Gcc-patches
On Tue, Jul 20, 2021 at 09:48:26AM -0500, Segher Boessenkool wrote: > > - if (mode == V4SFmode) > > + switch (easy_altivec_constant (operands[1], mode)) > > { > > - mode = V4SImode; > > - dest = gen_lowpart (V4SImode, dest); > > +case 1: mode = V16QImode; break; > > +case

Re: [PATCH] rs6000: Fix up easy_vector_constant_msb handling [PR101384]

2021-07-20 Thread Segher Boessenkool
Hi! On Tue, Jul 13, 2021 at 09:30:43PM +0200, Jakub Jelinek wrote: > PR target/101384 > * config/rs6000/rs6000-protos.h (easy_altivec_constant): Change return > type from bool to int. > * config/rs6000/rs6000.c (vspltis_constant): Fix up handling the >

[committed] aarch64: Tweak old vect-* tests to avoid new FAILs

2021-07-20 Thread Richard Sandiford via Gcc-patches
I'm not sure what these test were originally designed to test. vaddv and vmaxv seem to be testing for vectorisation, with associated scan-assembler tests. But they use arm_neon.h functions to test the results, which would presumably also trip many of the scans. That was probably what the split

Re: [RFC/PATCH] Use range-based for loops for traversing loops

2021-07-20 Thread Kewen.Lin via Gcc-patches
on 2021/7/20 下午5:49, Jonathan Wakely wrote: > On Tue, 20 Jul 2021 at 09:58, Kewen.Lin wrote: >> >> on 2021/7/19 下午11:59, Martin Sebor wrote: >>> On 7/19/21 12:20 AM, Kewen.Lin wrote: Hi, This patch follows Martin's suggestion here[1], to support range-based for loops for

[PATCH v2] Use range-based for loops for traversing loops

2021-07-20 Thread Kewen.Lin via Gcc-patches
Hi, This v2 has addressed some review comments/suggestions: - Use "!=" instead of "<" in function operator!= (const Iter ) - Add new CTOR loops_list (struct loops *loops, unsigned flags) to support loop hierarchy tree rather than just a function, and adjust to use loops* accordingly.

Re: Patch ping (was Re: [PATCH] rs6000: Fix up easy_vector_constant_msb handling [PR101384])

2021-07-20 Thread Segher Boessenkool
Hi! On Tue, Jul 20, 2021 at 02:43:03PM +0200, Jakub Jelinek wrote: > For gcc 11, I've bootstrapped/regtested on powerpc64le-linux and > powerpc64-linux (the latter regtested -m32/-m64) also a simpler version > below, which restricts it to the case that the code handles properly. > > 2021-07-20

Re: [PATCH] Add QI vector mode support to by-pieces for memset

2021-07-20 Thread Richard Sandiford via Gcc-patches
"H.J. Lu via Gcc-patches" writes: > On Mon, Jul 19, 2021 at 11:38 PM Richard Sandiford > wrote: >> >> "H.J. Lu via Gcc-patches" writes: >> >> > + { >> >> > + /* First generate subreg of word mode if the previous mode is >> >> > + wider than word mode and word mode is wider

libstdc++: Fix testsuite for skipping gdb tests on remote/non-native target

2021-07-20 Thread Marc Poulhies via Gcc-patches
This fixes an incorrect invocation of gdb on remote targets where DejaGNU would try to run host's gdb in remote target simulator. gdb-test skips the testing when target is remote or non native but the gdb version check function does not. libstdc++-v3/ChangeLog: *

Re: [PATCH 2/2][RFC] Add loop masking support for x86

2021-07-20 Thread Richard Biener
On Thu, 15 Jul 2021, Richard Sandiford wrote: > Richard Biener writes: > > The following extends the existing loop masking support using > > SVE WHILE_ULT to x86 by proving an alternate way to produce the > > mask using VEC_COND_EXPRs. So with --param vect-partial-vector-usage > > you can now

Re: [PATCH] Support logic shift left/right for avx512 mask type.

2021-07-20 Thread Uros Bizjak via Gcc-patches
On Tue, Jul 20, 2021 at 2:33 PM liuhongt wrote: > > Hi: > As mention in > https://gcc.gnu.org/pipermail/gcc-patches/2021-July/575420.html > > cut start- > > note for the lowpart we can just view-convert away the excess bits, > > fully re-using the mask. We generate surprisingly "good"

Re: [RFC] ipa: Adjust references to identify read-only globals

2021-07-20 Thread Martin Jambor
Hi, On Tue, Jul 20 2021, Richard Biener wrote: > On Tue, Jul 20, 2021 at 10:54 AM JiangNing OS via Gcc-patches > wrote: >> >> > -Original Message- >> > From: Gcc-patches > > bounces+jiangning=os.amperecomputing@gcc.gnu.org> On Behalf Of >> > Martin Jambor >> > Sent: Wednesday, June

[og11][committed] amdgcn: Add -mxnack and -msram-ecc [PR 100208]

2021-07-20 Thread Andrew Stubbs
This is now backported to devel/omp/gcc-11. Andrew On 19/07/2021 17:49, Andrew Stubbs wrote: This patch adds two new GCN-specific options: -mxnack and -msram-ecc={on,off,any}. The primary purpose is to ensure that we have an explicit default setting for these features and that this is

Re: [Patch] C, C++, Fortran, OpenMP: Add support for device-modifiers for 'omp target device'

2021-07-20 Thread Jakub Jelinek via Gcc-patches
On Wed, Jul 07, 2021 at 07:59:58PM +0200, Marcel Vollweiler wrote: > OpenMP: Add support for device-modifiers for 'omp target device' > > gcc/c/ChangeLog: > > * c-parser.c (c_parser_omp_clause_device): Add support for > device-modifiers for 'omp target device'. > >

[PATCH] simplify-rtx: Push sign/zero-extension inside vec_duplicate

2021-07-20 Thread Jonathan Wright via Gcc-patches
Hi, As a general principle, vec_duplicate should be as close to the root of an expression as possible. Where unary operations have vec_duplicate as an argument, these operations should be pushed inside the vec_duplicate. This patch modifies unary operation simplification to push

Re: [PATCH] Add QI vector mode support to by-pieces for memset

2021-07-20 Thread H.J. Lu via Gcc-patches
On Tue, Jul 20, 2021 at 5:48 AM H.J. Lu wrote: > > On Mon, Jul 19, 2021 at 11:38 PM Richard Sandiford > wrote: > > > > "H.J. Lu via Gcc-patches" writes: > > >> > + { > > >> > + /* First generate subreg of word mode if the previous mode is > > >> > + wider than word mode and

Re: [PATCH] Add QI vector mode support to by-pieces for memset

2021-07-20 Thread H.J. Lu via Gcc-patches
On Mon, Jul 19, 2021 at 11:38 PM Richard Sandiford wrote: > > "H.J. Lu via Gcc-patches" writes: > >> > + { > >> > + /* First generate subreg of word mode if the previous mode is > >> > + wider than word mode and word mode is wider than MODE. */ > >> > + prev_rtx =

Patch ping (was Re: [PATCH] rs6000: Fix up easy_vector_constant_msb handling [PR101384])

2021-07-20 Thread Jakub Jelinek via Gcc-patches
On Tue, Jul 13, 2021 at 09:30:43PM +0200, Jakub Jelinek via Gcc-patches wrote: > The following gcc.dg/pr101384.c testcase is miscompiled on > powerpc64le-linux. > easy_altivec_constant has code to try construct vector constants with > different element sizes, perhaps different from CONST_VECTOR's

RE: [PATCH 2/4]AArch64: correct usdot vectorizer and intrinsics optabs

2021-07-20 Thread Tamar Christina via Gcc-patches
> -Original Message- > From: Richard Sandiford > Sent: Thursday, July 15, 2021 8:35 PM > To: Tamar Christina > Cc: gcc-patches@gcc.gnu.org; nd ; Richard Earnshaw > ; Marcus Shawcroft > ; Kyrylo Tkachov > Subject: Re: [PATCH 2/4]AArch64: correct usdot vectorizer and intrinsics > optabs

[PATCH] Support logic shift left/right for avx512 mask type.

2021-07-20 Thread liuhongt via Gcc-patches
Hi: As mention in https://gcc.gnu.org/pipermail/gcc-patches/2021-July/575420.html cut start- > note for the lowpart we can just view-convert away the excess bits, > fully re-using the mask. We generate surprisingly "good" code: > > kmovb %k1, %edi > shrb$4, %dil >

[committed] libstdc++: Add more tests for filesystem::create_directory [PR101510]

2021-07-20 Thread Jonathan Wakely via Gcc-patches
Signed-off-by: Jonathan Wakely libstdc++-v3/ChangeLog: PR libstdc++/101510 * src/c++17/fs_ops.cc (create_dir): Adjust whitespace. * testsuite/27_io/filesystem/operations/create_directory.cc: Test creating directory with name of existing symlink to

Re: [PATCH] predcom: Refactor more using auto_vec

2021-07-20 Thread Richard Biener via Gcc-patches
On Mon, Jul 19, 2021 at 8:29 AM Kewen.Lin wrote: > > Hi Martin & Richard, > > >> A further improvement worth considering (if you're so inclined :) > >> is replacing the pcom_worker vec members with auto_vec (obviating > >> having to explicitly release them) and for the same reason also > >>

Re: [PATCH 2/2][RFC] Add loop masking support for x86

2021-07-20 Thread Richard Biener
On Tue, 20 Jul 2021, Hongtao Liu wrote: > On Tue, Jul 20, 2021 at 3:38 PM Richard Biener wrote: > > > > On Tue, 20 Jul 2021, Hongtao Liu wrote: > > > > > On Fri, Jul 16, 2021 at 5:11 PM Richard Biener wrote: > > > > > > > > On Thu, 15 Jul 2021, Richard Biener wrote: > > > > > > > > > On Thu, 15

Re: [PATCH 2/2][RFC] Add loop masking support for x86

2021-07-20 Thread Hongtao Liu via Gcc-patches
On Tue, Jul 20, 2021 at 3:38 PM Richard Biener wrote: > > On Tue, 20 Jul 2021, Hongtao Liu wrote: > > > On Fri, Jul 16, 2021 at 5:11 PM Richard Biener wrote: > > > > > > On Thu, 15 Jul 2021, Richard Biener wrote: > > > > > > > On Thu, 15 Jul 2021, Richard Biener wrote: > > > > > > > > > OK,

Re: [RFC] ipa: Adjust references to identify read-only globals

2021-07-20 Thread Richard Biener via Gcc-patches
On Tue, Jul 20, 2021 at 10:54 AM JiangNing OS via Gcc-patches wrote: > > > -Original Message- > > From: Gcc-patches > bounces+jiangning=os.amperecomputing@gcc.gnu.org> On Behalf Of > > Martin Jambor > > Sent: Wednesday, June 30, 2021 4:19 AM > > To: GCC Patches > > Cc: Jan Hubicka

Re: PING 2 [PATCH] handle sanitizer built-ins in -Wuninitialized (PR 101300)

2021-07-20 Thread Jeff Law via Gcc-patches
On 7/19/2021 6:01 PM, Martin Sebor via Gcc-patches wrote: Ping: https://gcc.gnu.org/pipermail/gcc-patches/2021-July/574385.html On 7/12/21 12:06 PM, Martin Sebor wrote: Ping: https://gcc.gnu.org/pipermail/gcc-patches/2021-July/574385.html On 7/2/21 1:21 PM, Martin Sebor wrote: To avoid a

[PATCH] aarch64: Don't include vec_select in SIMD multiply cost

2021-07-20 Thread Jonathan Wright via Gcc-patches
Hi, The Neon multiply/multiply-accumulate/multiply-subtract instructions can take various forms - multiplying full vector registers of values or multiplying one vector by a single element of another. Regardless of the form used, these instructions have the same cost, and this should be reflected

[committed] dir-locals: Use https for bug references

2021-07-20 Thread Richard Earnshaw via Gcc-patches
We've been using https for web references for some time now. ChangeLog: * .dir-locals.el (bug-reference-url-format): Use https. --- .dir-locals.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.dir-locals.el b/.dir-locals.el index b07a0dc50d8..fa031cbded9 100644

Re: [PATCH] debug/101473 - apply debug prefix maps before checksumming DIEs

2021-07-20 Thread Jakub Jelinek via Gcc-patches
On Tue, Jul 20, 2021 at 11:07:26AM +0200, Richard Biener wrote: > The following makes sure to apply the debug prefix maps to filenames > before checksumming DIEs to create the global symbol for the CU DIE > used by LTO to link the late debug to the early debug. This avoids > binary differences

Re: [RFC/PATCH] Use range-based for loops for traversing loops

2021-07-20 Thread Jonathan Wakely via Gcc-patches
On Tue, 20 Jul 2021 at 10:49, Jonathan Wakely wrote: > > On Tue, 20 Jul 2021 at 09:58, Kewen.Lin wrote: > > > > on 2021/7/19 下午11:59, Martin Sebor wrote: > > > On 7/19/21 12:20 AM, Kewen.Lin wrote: > > >> Hi, > > >> > > >> This patch follows Martin's suggestion here[1], to support > > >>

[PATCH] libcpp: __VA_OPT__ p1042r1 placemarker changes [PR101488]

2021-07-20 Thread Jakub Jelinek via Gcc-patches
Hi! So, besides missing #__VA_OPT__ patch for which I've posted patch last week, P1042R1 introduced some placemarker changes for __VA_OPT__, most notably the addition of before "removal of placemarker tokens," rescanning ... and the #define H4(X, ...) __VA_OPT__(a X ## X) ## b H4(, 1) //

Re: [RFC/PATCH] Use range-based for loops for traversing loops

2021-07-20 Thread Jonathan Wakely via Gcc-patches
On Tue, 20 Jul 2021 at 09:58, Kewen.Lin wrote: > > on 2021/7/19 下午11:59, Martin Sebor wrote: > > On 7/19/21 12:20 AM, Kewen.Lin wrote: > >> Hi, > >> > >> This patch follows Martin's suggestion here[1], to support > >> range-based for loops for traversing loops, analogously to > >> the patch for

[PATCH] debug/101473 - apply debug prefix maps before checksumming DIEs

2021-07-20 Thread Richard Biener
The following makes sure to apply the debug prefix maps to filenames before checksumming DIEs to create the global symbol for the CU DIE used by LTO to link the late debug to the early debug. This avoids binary differences (in said symbol) when compiling with toolchains installed under a

Re: [RFC/PATCH] Use range-based for loops for traversing loops

2021-07-20 Thread Kewen.Lin via Gcc-patches
on 2021/7/19 下午11:59, Martin Sebor wrote: > On 7/19/21 12:20 AM, Kewen.Lin wrote: >> Hi, >> >> This patch follows Martin's suggestion here[1], to support >> range-based for loops for traversing loops, analogously to >> the patch for vec[2]. >> >> Bootstrapped and regtested on powerpc64le-linux-gnu

Re: [RFC/PATCH] Use range-based for loops for traversing loops

2021-07-20 Thread Kewen.Lin via Gcc-patches
on 2021/7/19 下午10:34, Richard Biener wrote: > On Mon, Jul 19, 2021 at 8:20 AM Kewen.Lin wrote: >> >> Hi, >> >> This patch follows Martin's suggestion here[1], to support >> range-based for loops for traversing loops, analogously to >> the patch for vec[2]. >> >> Bootstrapped and regtested on

Re: [RFC/PATCH] Use range-based for loops for traversing loops

2021-07-20 Thread Kewen.Lin via Gcc-patches
on 2021/7/19 下午10:08, Jonathan Wakely wrote: > On Mon, 19 Jul 2021 at 07:20, Kewen.Lin wrote: >> >> Hi, >> >> This patch follows Martin's suggestion here[1], to support >> range-based for loops for traversing loops, analogously to >> the patch for vec[2]. >> >> Bootstrapped and regtested on

Re: [RFC/PATCH] Use range-based for loops for traversing loops

2021-07-20 Thread Kewen.Lin via Gcc-patches
on 2021/7/19 下午2:26, Andrew Pinski wrote: > On Sun, Jul 18, 2021 at 11:21 PM Kewen.Lin via Gcc-patches > wrote: >> >> Hi, >> >> This patch follows Martin's suggestion here[1], to support >> range-based for loops for traversing loops, analogously to >> the patch for vec[2]. >> >> Bootstrapped and

RE: [RFC] ipa: Adjust references to identify read-only globals

2021-07-20 Thread JiangNing OS via Gcc-patches
> -Original Message- > From: Gcc-patches bounces+jiangning=os.amperecomputing@gcc.gnu.org> On Behalf Of > Martin Jambor > Sent: Wednesday, June 30, 2021 4:19 AM > To: GCC Patches > Cc: Jan Hubicka > Subject: [RFC] ipa: Adjust references to identify read-only globals > > Hi, > >

'#pragma GCC diagnostic' (mis-)use in 'statement' of 'if' (was: [gcn] Work-around libgomp 'error: array subscript 0 is outside array bounds of ‘__lds struct gomp_thread * __lds[0]’ [-Werror=array-boun

2021-07-20 Thread Thomas Schwinge
Hi! On 2021-07-20T09:23:24+0200, I wrote: > On 2021-07-19T10:46:35+0200, I wrote: >> | On 7/16/21 11:42 AM, Thomas Schwinge wrote: >> |> On 2021-07-09T17:11:25-0600, Martin Sebor via Gcc-patches >> wrote: >> |>> The attached tweak avoids the new -Warray-bounds instances when >> |>> building

RE: [committed] add test for PR 86650

2021-07-20 Thread Kyrylo Tkachov via Gcc-patches
> -Original Message- > From: Bin.Cheng > Sent: 20 July 2021 09:26 > To: Martin Sebor ; Kyrylo Tkachov > > Cc: gcc-patches > Subject: Re: [committed] add test for PR 86650 > > On Wed, Jul 7, 2021 at 5:39 AM Martin Sebor via Gcc-patches > wrote: > > > > The recent patch series to

Re: [committed] add test for PR 86650

2021-07-20 Thread Bin.Cheng via Gcc-patches
On Wed, Jul 7, 2021 at 5:39 AM Martin Sebor via Gcc-patches wrote: > > The recent patch series to improve warning suppression for inlined > functions [PR98512] also implicitly includes the inlining context > in all warning messages for inlined code. In r12-2091 I have > committed the attached

Re: [committed] RISC-V: Detect python and pick best one for calling multilib-generator

2021-07-20 Thread Andreas Schwab
On Jul 20 2021, Kito Cheng wrote: > diff --git a/gcc/config.gcc b/gcc/config.gcc > index 93e2b3219b9..3df9b52cf25 100644 > --- a/gcc/config.gcc > +++ b/gcc/config.gcc > @@ -4730,9 +4730,10 @@ case "${target}" in > echo "--with-multilib-list= can't used with >

Re: [PATCH 2/2][RFC] Add loop masking support for x86

2021-07-20 Thread Richard Biener
On Tue, 20 Jul 2021, Hongtao Liu wrote: > On Fri, Jul 16, 2021 at 5:11 PM Richard Biener wrote: > > > > On Thu, 15 Jul 2021, Richard Biener wrote: > > > > > On Thu, 15 Jul 2021, Richard Biener wrote: > > > > > > > OK, guess I was more looking at > > > > > > > > #define N 32 > > > > int foo

Re: [gcn] Work-around libgomp 'error: array subscript 0 is outside array bounds of ‘__lds struct gomp_thread * __lds[0]’ [-Werror=array-bounds]'

2021-07-20 Thread Thomas Schwinge
Hi! On 2021-07-19T10:46:35+0200, I wrote: > | On 7/16/21 11:42 AM, Thomas Schwinge wrote: > |> On 2021-07-09T17:11:25-0600, Martin Sebor via Gcc-patches > wrote: > |>> The attached tweak avoids the new -Warray-bounds instances when > |>> building libatomic for arm. Christophe confirms it

Re: [PATCH] aarch64: Refactor TBL/TBX RTL patterns

2021-07-20 Thread Richard Sandiford via Gcc-patches
Jonathan Wright via Gcc-patches writes: > Hi, > > As subject, this patch renames the two-source-register TBL/TBX RTL > patterns so that their names better reflect what they do, rather than > confusing them with tbl3 or tbx4 patterns. Also use the correct > "neon_tbl2" type attribute for both

Re: [committed] .dir-locals.el: Set 'fill-column' to 80 for c-mode

2021-07-20 Thread Richard Sandiford via Gcc-patches
Richard Earnshaw via Gcc-patches writes: > On 19/07/2021 14:52, Richard Sandiford via Gcc-patches wrote: >> Richard Earnshaw via Gcc-patches writes: >>> On 14/12/2020 11:29, Andrea Corallo via Gcc-patches wrote: Hi all, I've committed the attached patch as obvious. This

Re: [PATCH] Add QI vector mode support to by-pieces for memset

2021-07-20 Thread Richard Sandiford via Gcc-patches
"H.J. Lu via Gcc-patches" writes: >> > + { >> > + /* First generate subreg of word mode if the previous mode is >> > + wider than word mode and word mode is wider than MODE. */ >> > + prev_rtx = simplify_gen_subreg (word_mode, prev_rtx, >> > +