[PATCH v4 09/12] x86: Also pass -mno-avx to cold-attribute-1.c

2021-05-18 Thread H.J. Lu via Gcc-patches
Also pass -mno-avx to pr72839.c to avoid copying data with YMM or ZMM registers. * gcc.target/i386/cold-attribute-1.c: Also pass -mno-avx. --- gcc/testsuite/gcc.target/i386/cold-attribute-1.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/testsuite/gcc.target/i386

[PATCH v4 10/12] x86: Also pass -mno-avx to sw-1.c for ia32

2021-05-18 Thread H.J. Lu via Gcc-patches
Also pass -mno-avx to sw-1.c for ia32 since copying data with YMM or ZMM registers disables shrink-wrapping when the second argument is passed on stack. * gcc.target/i386/sw-1.c: Also pass -mno-avx for ia32. --- gcc/testsuite/gcc.target/i386/sw-1.c | 1 + 1 file changed, 1 insertion(+) d

[PATCH v4 05/12] x86: Update piecewise move and store

2021-05-18 Thread H.J. Lu via Gcc-patches
We can use TImode/OImode/XImode integers for piecewise move and store. 1. Define MAX_MOVE_MAX to 64, which is the constant maximum number of bytes that a single instruction can move quickly between memory and registers or between two memory locations. 2. Define MOVE_MAX to MOVE_MAX_PIECES, which i

[PATCH v4 12/12] constructor: Check if it is faster to load constant from memory

2021-05-18 Thread H.J. Lu via Gcc-patches
When expanding a constant constructor, don't call expand_constructor if it is more efficient to load the data from the memory via move by pieces. gcc/ PR middle-end/90773 * expr.c (expand_expr_real_1): Don't call expand_constructor if it is more efficient to load the data

[PATCH v4 11/12] x86: Update gcc.target/i386/incoming-11.c

2021-05-18 Thread H.J. Lu via Gcc-patches
Expect no stack realignment since we no longer realign stack when copying data. * gcc.target/i386/incoming-11.c: Expect no stack realignment. --- gcc/testsuite/gcc.target/i386/incoming-11.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/testsuite/gcc.target/i386/i

[PATCH v4 07/12] x86: Add tests for piecewise move and store

2021-05-18 Thread H.J. Lu via Gcc-patches
* gcc.target/i386/pieces-memcpy-10.c: New test. * gcc.target/i386/pieces-memcpy-11.c: Likewise. * gcc.target/i386/pieces-memcpy-12.c: Likewise. * gcc.target/i386/pieces-memcpy-13.c: Likewise. * gcc.target/i386/pieces-memcpy-14.c: Likewise. * gcc.targe

[pushed] c++: "perfect" implicitly deleted move [PR100644]

2021-05-18 Thread Jason Merrill via Gcc-patches
Here we were ignoring the template constructor because the implicit move constructor had all perfect conversions. But CWG1402 says that an implicitly deleted move constructor is ignored by overload resolution; we implement that instead by preferring any other candidate in joust, to get better diag

[pushed] c++: non-static member, decltype, {} [PR100205]

2021-05-18 Thread Jason Merrill via Gcc-patches
This test was fixed by my second patch for PR93314, which distinguishes between constant-expression and potentially-constant-evaluated contexts in a way that my first patch did not. Tested x86_64-pc-linux-gnu, applying to trunk. PR c++/100205 PR c++/99314 gcc/testsuite/ChangeLog:

[PATCH] libstdc++: Implement missing P0896 changes to reverse_view [PR100639]

2021-05-18 Thread Patrick Palka via Gcc-patches
This implements the P0896 changes to reverse_view's member types value_type, difference_type and reference in C++20 mode, which fixes problems taking the reverse_iterator of an iterator with a non-integral difference_type (such as iota_view). Tested on x86_64-pc-linux-gnu, does this look OK for tr

Re: [PATCH] libstdc++: Implement missing P0896 changes to reverse_view [PR100639]

2021-05-18 Thread Patrick Palka via Gcc-patches
On Tue, 18 May 2021, Patrick Palka wrote: > This implements the P0896 changes to reverse_view's member types Whoops, s/reverse_view/reverse_iterator rather... consider this typo fixed throughout. > value_type, difference_type and reference in C++20 mode, which fixes > problems taking the reverse

Re: [PATCH][DOCS] Remove install-old.texi

2021-05-18 Thread Joseph Myers
On Tue, 18 May 2021, Martin Liška wrote: > +@quotation > +aix7.1, aix7.2, amdhsa, androideabi, aout, cygwin, darwin, darwin10, darwin7, > +darwin8, darwin9, eabi, eabialtivec, eabisim, eabisimaltivec, elf, elf32, > +elfbare, elfoabi, freebsd4, freebsd6, gnu, hpux, hpux10.1, hpux11.0, > hpux11.3,

[PATCH 0/2] Add power10 IEEE 128-bit min/max/conditional move support

2021-05-18 Thread Michael Meissner via Gcc-patches
The following two patches are new versions of the patches I've submitted in the past to add support for the power10 IEEE 128-bit XSMAXCQP, XSMINCQP, XSCMPEQQ, XSCMPGTQ, and XSCMPGEQ instructions. This time I'm not trying to share code with the DFmode/SFmode min, max, or conditional move support.

[PATCH 1/2] Add IEEE 128-bit min/max support on PowerPC.

2021-05-18 Thread Michael Meissner via Gcc-patches
[PATCH 1/2] Add IEEE 128-bit min/max support on PowerPC. This patch adds the support for the IEEE 128-bit floating point C minimum and maximum instructions. The next patch will add the support for using the compare and set mask instruction to implement conditional moves. This patch does not try

[PATCH 2/2] Add IEEE 128-bit fp conditional move on PowerPC.

2021-05-18 Thread Michael Meissner via Gcc-patches
[PATCH 2/2] Add IEEE 128-bit fp conditional move on PowerPC. This patch adds the support for power10 IEEE 128-bit floating point conditional move and for automatically generating min/max. In this patch, I simplified things compared to previous patches. Instead of allowing any four of the modes t

Re: [PATCH] c: don't drop typedef information in casts

2021-05-18 Thread Joseph Myers
On Tue, 18 May 2021, David Lamparter wrote: > On Fri, May 07, 2021 at 06:09:35PM +0200, David Lamparter wrote: > > The TYPE_MAIN_VARIANT() here was, for casts to a typedef'd type name, > > resulting in all information about the typedef's involvement getting > > lost. This drops necessary informat

[PATCH] Fix long double tests when default long double is not IBM.

2021-05-18 Thread Michael Meissner via Gcc-patches
[PATCH] Fix long double tests when default long double is not IBM. This patch adds 3 more selections to target-supports.exp to see if we can force the compiler to use a particular long double format (IEEE 128-bit, IBM extended double, 64-bit), and the library support will track the changes for the

[PATCH] Allow __ibm128 on older PowerPC systems.

2021-05-18 Thread Michael Meissner via Gcc-patches
[PATCH] Allow __ibm128 on older PowerPC systems. On January 8th, 2018, I added code to ibm-ldouble.c to use the built-in function __builtin_pack_ibm128 if long double is IEEE 128-bit and continue to use __builtin_pack_longdouble if long double is IBM extended double. This code was needed because

[PATCH] Change rs6000_const_f32_to_i32 return type.

2021-05-18 Thread Michael Meissner via Gcc-patches
[PATCH] Change rs6000_const_f32_to_i32 return type. The function rs6000_const_f32_to_i32 called REAL_VALUE_TO_TARGET_SINGLE with a long long type and returns it. This patch changes the type to long which is the proper type for REAL_VALUE_TO_TARGET_SINGLE. I have done bootstraps on little endian

[PATCH 0/2] Move xx* builtins to vsx.md.

2021-05-18 Thread Michael Meissner via Gcc-patches
[PATCH 0/2] Move xx* builtins to vsx.md. I noticed that the xx built-in functions (xxspltiw, xxspltidp, xxsplti32dx, xxeval, xxblend, and xxpermx) were all defined in altivec.md. However, since the XX instructions can take both traditional floating point and Altivec registers, these built-in func

[PATCH 1/2] Move xx* builtins to vsx.md.

2021-05-18 Thread Michael Meissner via Gcc-patches
[PATCH 1/2] Move xx* builtins to vsx.md. I noticed that the xx built-in functions (xxspltiw, xxspltidp, xxsplti32dx, xxeval, xxblend, and xxpermx) were all defined in altivec.md. However, since the XX instructions can take both traditional floating point and Altivec registers, these built-in func

[PATCH 2/2] Fix xxeval predicates.

2021-05-18 Thread Michael Meissner via Gcc-patches
[PATCH 2/2] Fix xxeval predicates. In doing the patch to move the XX* built-in functions from altivec.md to vsx.md, I noticed that the xxeval built-in function used the altivec_register_operand predicate. Since it takes vsx registers, this might force the register allocate to issue a move when it

[PATCH] Fix vec-splati-runnable.c test.

2021-05-18 Thread Michael Meissner via Gcc-patches
[PATCH] Fix vec-splati-runnable.c test. I noticed that the vec-splati-runnable.c did not have an abort after one of the tests. If the test was run with optimization, the optimizer could delete some of the tests and throw off the count. I have bootstraped this on LE power9 and BE power8 systems.

[PATCH 0/2]: Fix various problems if you configure with --with=power10

2021-05-18 Thread Michael Meissner via Gcc-patches
I decided to do a run on our prototype power10 hardware, comparing using --with-cpu=power9 and --with-cpu=power10. I noticed several tests were failing with power10 code generation. Most of the tests were failing because the regex's did not include prefixed loads and stores. These are fixed in t

[PATCH 1/2] Deal with prefixed loads/stores in tests, PR testsuite/100166

2021-05-18 Thread Michael Meissner via Gcc-patches
[PATCH 1/2] Deal with prefixed loads/stores in tests, PR testsuite/100166 This patch updates the various tests in the testsuite to treat plxv and pstxv as being vector loads/stores. This shows up if you run the testsuite with a compiler configured with the option: --with-cpu=power10. I have boot

[committed] d: Revert "Come up with startswith function."

2021-05-18 Thread Iain Buclaw via Gcc-patches
Hi, This reverts changes to the DMD front-end in commit 6ba3079dce89d9b63bf5dbd5e320ea2bf96f196b. Changes were incorrectly committed directly to the GCC repo instead of the master repository. Committed to mainline. Regards, Iain. --- gcc/d/ChangeLog: * dmd/dinterpret.c (evaluateIfBuil

[PATCH 2/2] Fix tests when running on power10, PR testsuite/100166

2021-05-18 Thread Michael Meissner via Gcc-patches
[PATCH 2/2] Fix tests when running on power10, PR testsuite/100166 This patch updates the various tests in the testsuite to adjust the test if power10 code generation is used. Some tests would not generate the expected instructions because power10 provides new instructions that the compiler now g

[committed] d: Use filename_ncmp instead of strncmp

2021-05-18 Thread Iain Buclaw via Gcc-patches
Hi, This patch updates prefixed_path in d-incpath.cc to use filename_ncmp instead of strncmp. Bootstrapped and regression tested on x86_64-linux-gnu, and committed to mainline. Regards, Iain. --- gcc/d/ChangeLog: * d-incpath.cc (prefixed_path): Use filename_ncmp instead of strncmp. ---

[PATCH] c++: Relax attribute on friend declaration checking [PR100596]

2021-05-18 Thread Marek Polacek via Gcc-patches
It turned out that there are codebases that profusely use GNU attributes on friend declarations, so we have to dial back our checking and allow them. And for C++11 attributes let's just warn instead of giving errors. Bootstrapped/regtested on x86_64-pc-linux-gnu, ok for trunk? PR c++/100

[committed] d: Use startswith function instead of strncmp

2021-05-18 Thread Iain Buclaw via Gcc-patches
Hi, This patch updates TypeVisitor in types.cc to use startswith instead of strncmp. Bootstrapped and regression tested on x86_64-linux-gnu, and committed to mainline. Regards, Iain. --- gcc/d/ChangeLog: * types.cc (TypeVisitor::visit (TypeEnum *)): Use startswith function inst

[pushed] c++: template template parm pack expansion [PR100372]

2021-05-18 Thread Jason Merrill via Gcc-patches
Here we have a pack expansion of a template template parameter pack, of which the pattern is a TEMPLATE_DECL, which strip_typedefs doesn't want to see. Tested x86_64-pc-linux-gnu, applying to trunk. PR c++/100372 gcc/cp/ChangeLog: * tree.c (strip_typedefs): Only look at the patt

[pushed] c++: ICE with bad definition of decimal32 [PR100261]

2021-05-18 Thread Jason Merrill via Gcc-patches
The change to only look at the global binding for non-classes meant that here, when dealing with decimal32 which is magically mangled like its first non-static data member, we got a collision with the mangling for float. Fixed by also looking up an existing binding for such magical classes. Tested

[PATCH] libgccjit: Add support for TLS variable [PR95415]

2021-05-18 Thread Antoni Boucher via Gcc-patches
Hello. This patch adds support for TLS variables. One thing to fix before we merge it is the libgccjit.map file which contains LIBGCCJIT_ABI_16 instead of LIBGCCJIT_ABI_17. LIBGCCJIT_ABI_16 was added in one of my other patches. Thanks for the review. From 6092e3d347972d331ed9ac6cae153168e98ecd0d Mo

Re: [PATCH] libtool.m4: update GNU/Hurd test from upstream

2021-05-18 Thread Ian Lance Taylor via Gcc-patches
Just a note that this patch should not have been committed to the libgo directory. As described in libgo/README.gcc, the libgo directory is a mirror of a repository stored elsewhere. Changes committed directly to the gcc repo will eventually be lost. Thanks. I'll take care of handling this patc

Use Windows line endings in libgo test file

2021-05-18 Thread Ian Lance Taylor via Gcc-patches
I've committed a trivial patch to use the correct Windows line endings in the libgo test file libgo/go/runtime/testdata/testwinsignal/main.go. Ian diff --git a/libgo/go/runtime/testdata/testwinsignal/main.go b/libgo/go/runtime/testdata/testwinsignal/main.go index 1e7c9475fd6..d8cd884ffac 100644 -

libgo patch committed: Update compression test cases

2021-05-18 Thread Ian Lance Taylor via Gcc-patches
I've committed a trivial patch to libgo to update two compression test cases to match the main sources: the file libgo/go/compress/bzip2/testdata/Mark.Twain-Tom.Sawyer.txt.bz2 is removed, and the file libgo/go/compress/bzip2/testdata/Isaac.Newton-Opticks.txt.bz2 is updated. No patch appended here

libgo patch committed: Regenerate configure script

2021-05-18 Thread Ian Lance Taylor via Gcc-patches
This patch updates the libgo configure script to the current source repo. This just fixes a couple of line numbers. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Ian commit c922c6539e63a775ee29751320d678f0a0a33d07 Author: Ian Lance Taylor Date: Tue May 18 18:09:27 2021 -0700

Re: [PATCH 1/3] Come up with startswith function.

2021-05-18 Thread Ian Lance Taylor via Gcc-patches
On Tue, May 18, 2021 at 5:32 AM Martin Liška wrote: > > On 5/18/21 12:07 PM, Iain Buclaw wrote: > > Excerpts from Martin Liska's message of March 17, 2021 4:36 pm: > >> > >> gcc/d/ChangeLog: > >> > >> * d-builtins.cc (do_build_builtin_fn): Use startswith > >> function instead of strncmp.

[PATCH] vect: Replace hardcoded weight factor with param

2021-05-18 Thread Kewen.Lin via Gcc-patches
Hi, This patch is to replace the current hardcoded weight factor 50 for those statements in an inner loop relative to the loop being vectorized with a specific parameter vect-inner-loop-weight-factor. The motivation behind this change is: if targets want to have one unique function to gather some

<    1   2