Re: [PATCH 1/5] libstdc++: Import the fast_float library

2021-11-16 Thread Florian Weimer via Gcc-patches
* Patrick Palka via Libstdc: > This copies the fast_float library[1] into the compiled-in library > sources. We're going to use this library in our floating-point > std::from_chars implementation for faster and more portable parsing of > binary32/64 decimal strings. > > [1]: https://github.com/fa

Re: [PATCH][GCC] arm: add armv9-a architecture to -march

2021-11-16 Thread Christophe Lyon via Gcc-patches
Hi, On Tue, Nov 9, 2021 at 12:36 PM Przemyslaw Wirkus via Gcc-patches < gcc-patches@gcc.gnu.org> wrote: > > > > -Original Message- > > > > From: Przemyslaw Wirkus > > > > Sent: 18 October 2021 10:37 > > > > To: gcc-patches@gcc.gnu.org > > > > Cc: Richard Earnshaw ; Ramana > > > > Radhakr

[PATCH] i386: vcvtph2ps and vcvtps2ph should be used to convert _Float16 to SFmode with -mf16c [PR 102811]

2021-11-16 Thread Kong, Lingling via Gcc-patches
Hi, vcvtph2ps and vcvtps2ph should be used to convert _Float16 to SFmode with -mf16c. So added define_insn extendhfsf2 and truncsfhf2 for target_f16c. OK for master? gcc/ChangeLog: PR target/102811 * config/i386/i386.md (extendhfsf2): Add extenndhfsf2 for f16c. (extendh

Re: Basic kill analysis for modref

2021-11-16 Thread Jan Hubicka via Gcc-patches
> chain_map isn't initialized. > > This caused: > > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103262 > Hi, this is patch I comitted that moves the misplaced hunk. gcc/ChangeLog: PR ipa/103262 * ipa-modref.c (merge_call_side_effects):

[PATCH] i386: add alias for f*mul_*ch intrinsics

2021-11-16 Thread Kong, Lingling via Gcc-patches
Hi, This patch is to add alias for f*mul_*ch intrinsics. Ok for master? gcc/ChangeLog: * config/i386/avx512fp16intrin.h (_mm512_mul_pch): Add alias for _mm512_fmul_pch. (_mm512_mask_mul_pch): Likewise. (_mm512_maskz_mul_pch): Likewise. (_mm512_mul_round_pch): L

Re: [PATCH] i386: add alias for f*mul_*ch intrinsics

2021-11-16 Thread Hongtao Liu via Gcc-patches
On Tue, Nov 16, 2021 at 4:23 PM Kong, Lingling via Gcc-patches wrote: > > Hi, > > This patch is to add alias for f*mul_*ch intrinsics. > > Ok for master? This patch just adds some macro definitions (new aliases for intrinsic) to the header file, and I think this should be low risk. And considering

Re: [PATCH] i386: vcvtph2ps and vcvtps2ph should be used to convert _Float16 to SFmode with -mf16c [PR 102811]

2021-11-16 Thread Hongtao Liu via Gcc-patches
On Tue, Nov 16, 2021 at 4:15 PM Kong, Lingling via Gcc-patches wrote: > > Hi, > > vcvtph2ps and vcvtps2ph should be used to convert _Float16 to SFmode with > -mf16c. So added define_insn extendhfsf2 and truncsfhf2 for target_f16c. > > OK for master? > > gcc/ChangeLog: > > PR target/102811

Re: [PATCH] x86_64: Avoid rorx rotation instructions with -Os

2021-11-16 Thread Uros Bizjak via Gcc-patches
On Mon, Nov 15, 2021 at 2:54 PM Roger Sayle wrote: > > > This patch teaches the i386 backend to avoid using BMI2's rorx > instructions when optimizing for size. The benefits are shown > with the following example: > > unsigned int ror1(unsigned int x) { return (x >> 1) | (x << 31); } > unsigned i

Re: [PATCH] gcc: implement AIX-style constructors

2021-11-16 Thread CHIGOT, CLEMENT via Gcc-patches
> Hi David, > > Here is the new version of the patch. > I've moved the startup function in crtcdtors files. > > I'm just wondering if the part dealing with the > __init_aix_libgcc_cxa_atexit is needed. I'm adding it because > the destructor created in crtcxa.o is following GCC format and > thus

Re: aix: Add FAT library support for libffi for AIX

2021-11-16 Thread CHIGOT, CLEMENT via Gcc-patches
> Even if GCC64 is able to boostrap without libffi being a > FAT library on AIX, the tests for "-maix32" are not working > without it. > > libffi/ChangeLog: > 2021-10-21  Clément Chigot   > >       * Makefile.am (tmake_file): Build and install AIX-style FAT >         libraries. >       * Makefil

Re: [PATCH] aix: handle 64bit inodes for include directories

2021-11-16 Thread CHIGOT, CLEMENT via Gcc-patches
Hi everyone, Gentle ping Thanks, Clément From: CHIGOT, CLEMENT Sent: Tuesday, October 26, 2021 4:51 PM To: Jeff Law ; David Malcolm Cc: gcc-patches@gcc.gnu.org ; David Edelsohn Subject: Re: [PATCH] aix: handle 64bit inodes for include directories Hi everyone,

Re: [PATCH] i386: vcvtph2ps and vcvtps2ph should be used to convert _Float16 to SFmode with -mf16c [PR 102811]

2021-11-16 Thread Uros Bizjak via Gcc-patches
On Tue, Nov 16, 2021 at 9:15 AM Kong, Lingling via Gcc-patches wrote: > > Hi, > > vcvtph2ps and vcvtps2ph should be used to convert _Float16 to SFmode with > -mf16c. So added define_insn extendhfsf2 and truncsfhf2 for target_f16c. > > OK for master? No, this is the wrong approach. There can be i

Re: [PATCH] pch: Add support for PCH for relocatable executables

2021-11-16 Thread Jakub Jelinek via Gcc-patches
On Sat, Nov 13, 2021 at 08:32:41PM +, Iain Sandoe wrote: > IMO both this series > - which restores the ability to work with PIE exes but requires a known > address for the PCH > and the series I posted > - which allows a configuration to opt out of PCH anyway > > could be useful - for Darw

[PATCH] waccess: Fix up pass_waccess::check_alloc_size_call [PR102009]

2021-11-16 Thread Jakub Jelinek via Gcc-patches
Hi! This function punts if the builtins have no arguments, but as can be seen on the testcase, even if it has some arguments but alloc_size attribute's arguments point to arguments that aren't passed, we get a warning earlier from the FE but should punt rather than ICE on it. Other users of alloc_

Re: [PATCH] waccess: Fix up pass_waccess::check_alloc_size_call [PR102009]

2021-11-16 Thread Richard Biener via Gcc-patches
On Tue, 16 Nov 2021, Jakub Jelinek wrote: > Hi! > > This function punts if the builtins have no arguments, but as can be seen > on the testcase, even if it has some arguments but alloc_size attribute's > arguments point to arguments that aren't passed, we get a warning earlier > from the FE but s

[committed] openmp: Regimplify operands of GIMPLE_COND in a few more places [PR103208]

2021-11-16 Thread Jakub Jelinek via Gcc-patches
Hi! As the testcase shows, the non-rectangular loop expansion code didn't try to regimplify operands of GIMPLE_CONDs it built in some cases. I have added a helper function which does that and used it in some places that were regimplifying already to simplify those spots, plus added it in a couple

[committed] libgomp: Mark thread_limit clause to target construct as implemented

2021-11-16 Thread Jakub Jelinek via Gcc-patches
On Mon, Nov 15, 2021 at 02:00:42PM +0100, Tobias Burnus wrote: > Fortran: openmp: Add support for thread_limit clause on target > > gcc/fortran/ChangeLog: > > * openmp.c (OMP_TARGET_CLAUSES): Add thread_limit. > * trans-openmp.c (gfc_split_omp_clauses): Add thread_limit also to >

Re: [PATCH 1/5] libstdc++: Import the fast_float library

2021-11-16 Thread Jonathan Wakely via Gcc-patches
On Tue, 16 Nov 2021 at 08:01, Florian Weimer wrote: > > * Patrick Palka via Libstdc: > > > This copies the fast_float library[1] into the compiled-in library > > sources. We're going to use this library in our floating-point > > std::from_chars implementation for faster and more portable parsing o

Re: [PATCH] libstdc++: Merge latest Ryu sources

2021-11-16 Thread Jonathan Wakely via Gcc-patches
On Tue, 16 Nov 2021 at 00:36, Patrick Palka wrote: > > The only source change is a speedup to pow5Factor. > > Tested on x86_64-pc-linux-gnu, does this look OK for trunk? OK, thanks.

[PATCH] ipa-sra: Testcase that removing a "returns_nonnull" retval works

2021-11-16 Thread Martin Jambor
Hi, since we can now remove return values of functions with return_nonnull type attribute, I'll feel a bit safer if we can test this does not ICE when someone attempts to access a non-existent call LHS. Eventually we should probably drop the attribute when this happens. Tested on x86_64-linux, I

Re: [PATCH 1/5] libstdc++: Import the fast_float library

2021-11-16 Thread Florian Weimer via Gcc-patches
* Jonathan Wakely: > On Tue, 16 Nov 2021 at 08:01, Florian Weimer wrote: >> >> * Patrick Palka via Libstdc: >> >> > This copies the fast_float library[1] into the compiled-in library >> > sources. We're going to use this library in our floating-point >> > std::from_chars implementation for faster

Re: [PATCH] Fix PR tree-optimization/103228 and 103228: folding of (type) X op CST where type is a nop convert

2021-11-16 Thread Richard Biener via Gcc-patches
On Tue, Nov 16, 2021 at 4:36 AM apinski--- via Gcc-patches wrote: > > From: Andrew Pinski > > Currently we fold (type) X op CST into (type) (X op ((type-x) CST)) when the > conversion widens > but not when the conversion is a nop. For the same reason why we move the > widening conversion > (the

[committed] arc: Update arc specific tests

2021-11-16 Thread Claudiu Zissulescu via Gcc-patches
Update assembly output test pattern. Take into consideration also for which platform we do execute the test (baremetal or linux). gcc/testsuite/ChangeLog: * gcc.target/arc/add_n-combine.c: Update test patterns. * gcc.target/arc/builtin_eh.c: Update test for linux platforms.

Re: [GCC-11 PATCH] aarch64: enable Ampere-1 CPU (backport to GCC11)

2021-11-16 Thread Richard Sandiford via Gcc-patches
Philipp Tomsich writes: > This adds support and a basic turning model for the Ampere Computing > "Ampere-1" CPU. > > The Ampere-1 implements the ARMv8.6 architecture in A64 mode and is > modelled as a 4-wide issue (as with all modern micro-architectures, > the chosen issue rate is a compromise bet

Re: [PATCH] tree-optimization: [PR103218] Fold ((type)(a<0)) << SIGNBITOFA into ((type)a) & signbit

2021-11-16 Thread Richard Biener via Gcc-patches
On Sat, Nov 13, 2021 at 9:14 PM apinski--- via Gcc-patches wrote: > > From: Andrew Pinski > > This folds Fold ((type)(a<0)) << SIGNBITOFA into ((type)a) & signbit inside > match.pd. > This was already handled in fold-cost by: > /* A < 0 ? : 0 is simply (A & ). */ > I have not removed as we onl

[PATCH 0/2][GCC] arm: Define MVE types internally

2021-11-16 Thread Murray Steele via Gcc-patches
Hi all, This patch series implements the arm MVE ACLE types currently found under config/arm/arm_mve_types.h internally via a new pragma. Exposing the MVE ACLE types internally allows for an MVE intrinsics implementation similar to the current SVE implementation. Any prefix of the patch series sh

[PATCH 1/2][GCC] arm: Move arm_simd_info array declaration into header

2021-11-16 Thread Murray Steele via Gcc-patches
Hi all, This patch moves the arm_simd_type and arm_type_qualifiers enums, and arm_simd_info struct from arm-builtins.c into arm-builtins.h header. This is a first step towards internalising the type definitions for MVE predicate, vector, and tuple types. By moving arm_simd_types into a header, w

[PATCH 2/2][GCC] arm: Declare MVE types internally via pragma

2021-11-16 Thread Murray Steele via Gcc-patches
Hi all, This patch moves the implementation of MVE ACLE types from arm_mve_types.h to inside GCC via a new pragma, which replaces the prior type definitions. This allows for the types to be used internally for intrinsic function definitions. Bootstrapped and regression tested on arm-none-linux-gn

Re: [PATCH] PR tree-optimization/103216: optimize some A ? (b op CST) : b into b op (A?CST:CST2)

2021-11-16 Thread Richard Biener via Gcc-patches
On Mon, Nov 15, 2021 at 1:09 AM apinski--- via Gcc-patches wrote: > > From: Andrew Pinski > > For this PR, we have: > if (d_5 < 0) > goto ; [INV] > else > goto ; [INV] > >: > v_7 = c_4 | -128; > >: > # v_1 = PHI > > Which PHI-OPT will try to simplify > "(d_5 < 0) ? (c_4 |

RE: [vect-patterns] Refactor widen_plus/widen_minus as internal_fns

2021-11-16 Thread Joel Hutton via Gcc-patches
Updated patch 2 with explanation included in commit message and changes requested. Bootstrapped and regression tested on aarch64 > -Original Message- > From: Joel Hutton > Sent: 12 November 2021 11:42 > To: Richard Biener > Cc: gcc-patches@gcc.gnu.org; Richard Sandiford > > Subject: RE:

[PATCH] tree-optimization/102880 - improve CD-DCE

2021-11-16 Thread Richard Biener via Gcc-patches
The PR shows a missed control-dependent DCE caused by CFG cleanup merging a forwarder resulting in a partially degenerate PHI node. With control-dependent DCE we need to mark control dependences of incoming edges into PHIs as necessary but that is unnecessarily conservative for the case when two ed

[committed] arc: Update (u)maddhisi4 patterns

2021-11-16 Thread Claudiu Zissulescu via Gcc-patches
The (u)maddsihi4 patterns are using the ARC's VMAC2H(U) instruction with null destination, however, VMAC2H(U) doesn't rewrite the accumulator. This patch solves the destination issue of VMAC2H by replacing it with DMACH(U) instruction. gcc/ * config/arc/arc.md (maddhisi4): Use a single m

POS Customers Database

2021-11-16 Thread Taylor Germain via Gcc-patches
Hi, I was in your website, and I got to know that you are one of the Point Of sales (POS) company. We can help you in providing customers/users and competitors' business contacts across USA and worldwide which includes entire business details that you would require. Technology Product we trac

Re: [PATCH 1/5] libstdc++: Import the fast_float library

2021-11-16 Thread Jonathan Wakely via Gcc-patches
On Tue, 16 Nov 2021 at 09:46, Florian Weimer via Libstdc++ < libstd...@gcc.gnu.org> wrote: > * Jonathan Wakely: > > > On Tue, 16 Nov 2021 at 08:01, Florian Weimer wrote: > >> > >> * Patrick Palka via Libstdc: > >> > >> > This copies the fast_float library[1] into the compiled-in library > >> > sou

[PATCH] regrename: Skip renaming if instruction is noop move.

2021-11-16 Thread Jojo R via Gcc-patches
Skip renaming if instruction is noop move, and it will been removed for performance. gcc/ * regrename.c (find_rename_reg): Return satisfied regno if instruction is noop move. --- gcc/regrename.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gcc/regrename.c b/gcc/regrename

Re: [PATCH][GCC] arm: add armv9-a architecture to -march

2021-11-16 Thread Richard Earnshaw via Gcc-patches
You can't make an omelette without breaking eggs, as they say. New architectures need new assemblers. However, I wonder if there's anything in v9-a that significantly affects the quality of the base multilib code needed for building the libraries. It might be that we can deal with v9-a by ju

[PATCH] OpenMP: Ensure that offloaded variables are public

2021-11-16 Thread Andrew Stubbs
Hi, This patch is needed for AMD GCN offloading when we use the assembler from LLVM 13+. The GCN runtime (libgomp+ROCm) requires that the location of all variables in the offloaded variables table are discoverable at runtime (using the "hsa_executable_symbol_get_info" API), and this only wor

[PATCH] middle-end/103248 - fix RDIV_EXPR handling with fixed point

2021-11-16 Thread Richard Biener via Gcc-patches
This fixes the previous adjustment to operation_could_trap_helper_p where I failed to realize that RDIV_EXPR is also used for fixed-point types. It also fixes that handling by properly checking for a fixed_zerop divisor. Bootstrapped and tested on x86_64-unknown-linux-gnu, OK? Thanks, Richard.

Re: Use modref kills in tree-ssa-dse

2021-11-16 Thread Richard Biener via Gcc-patches
On Mon, 15 Nov 2021, Jan Hubicka wrote: > Hi, > this patch extends tree-ssa-dse to use modref kill summary to clear > live_bytes. This makes it possible to remove calls that are killed > in parts. > > I noticed that DSE duplicates the logic of tree-ssa-alias that is > mathing bases of memory ac

Re: [AArch64] Enable generation of FRINTNZ instructions

2021-11-16 Thread Richard Biener via Gcc-patches
On Fri, 12 Nov 2021, Andre Simoes Dias Vieira wrote: > > On 12/11/2021 10:56, Richard Biener wrote: > > On Thu, 11 Nov 2021, Andre Vieira (lists) wrote: > > > >> Hi, > >> > >> This patch introduces two IFN's FTRUNC32 and FTRUNC64, the corresponding > >> optabs and mappings. It also creates a back

Re: [PATCH] regrename: Skip renaming if instruction is noop move.

2021-11-16 Thread Richard Biener via Gcc-patches
On Tue, Nov 16, 2021 at 12:45 PM Jojo R via Gcc-patches wrote: > > Skip renaming if instruction is noop move, and it will > been removed for performance. Is there any (target specific) testcase you can add? Such commits are problematic when later bisected to since the intent isn't clear. > gcc/

Re: [PATCH 5/5] vect: Support masked gather loads with SLP

2021-11-16 Thread Richard Biener via Gcc-patches
On Fri, Nov 12, 2021 at 7:06 PM Richard Sandiford via Gcc-patches wrote: > > This patch extends the previous SLP gather load support so > that it can handle masked loads too. > > Regstrapped on aarch64-linux-gnu and x86_64-linux-gnu. OK to install? OK. Thanks, Richard. > Richard > > > gcc/ >

Re: [PATCH][GCC] arm: add armv9-a architecture to -march

2021-11-16 Thread Ramana Radhakrishnan via Gcc-patches
Hi There, I think for AArch32 mapping it back to armv8-a sounds sufficient. Unless we have string or math routines in newlib that make use of any ACLE guards that are beyond armv8-a … Ramana From: Richard Earnshaw Date: Tuesday, 16 November 2021 at 11:48 To: Christophe Lyon , Przemyslaw Wir

Re: Use modref kills in tree-ssa-dse

2021-11-16 Thread Jan Hubicka via Gcc-patches
> > Not sure, tree-ssa-dse.c doesn't seem to handle MEM_REF with offset? > > VN has adjust_offsets_for_equal_base_address for this purpose. I > agree that some common functionality like > > bool > get_relative_extent_of (const ao_ref *base, const ao_ref *ref, > poly_int6

Re: [PATCH] ivopts: Improve code generated for very simple loops.

2021-11-16 Thread Richard Biener via Gcc-patches
On Mon, Nov 15, 2021 at 2:04 PM Roger Sayle wrote: > > > This patch tidies up the code that GCC generates for simple loops, > by selecting/generating a simpler loop bound expression in ivopts. > The original motivation came from looking at the following loop (from > gcc.target/i386/pr90178.c) > >

Re: Use modref kills in tree-ssa-dse

2021-11-16 Thread Richard Biener via Gcc-patches
On Tue, 16 Nov 2021, Jan Hubicka wrote: > > > > Not sure, tree-ssa-dse.c doesn't seem to handle MEM_REF with offset? > > > > VN has adjust_offsets_for_equal_base_address for this purpose. I > > agree that some common functionality like > > > > bool > > get_relative_extent_of (const ao_ref *bas

Re: [PATCH 3/3] elf: Add _dl_find_eh_frame function

2021-11-16 Thread Adhemerval Zanella via Gcc-patches
On 03/11/2021 13:28, Florian Weimer via Gcc-patches wrote: > This function is similar to __gnu_Unwind_Find_exidx as used on arm. > It can be used to speed up the libgcc unwinder. Besides the terse patch description, the design seems ok to accomplish the lock-free read and update. There are som

[PATCH, v5, OpenMP 5.0] Improve OpenMP target support for C++ [PR92120 v5]

2021-11-16 Thread Chung-Lin Tang
Hi Jakub, On 2021/6/24 9:15 PM, Jakub Jelinek wrote: On Fri, Jun 18, 2021 at 10:25:16PM +0800, Chung-Lin Tang wrote: Note, you'll need to rebase your patch, it clashes with r12-1768-g7619d33471c10fe3d149dcbb701d99ed3dd23528. Sorry for that. And sorry for patch review delay. --- a/gcc/c/c-typ

Re: [PATCH, rs6000] Optimization for vec_xl_sext

2021-11-16 Thread Bill Schmidt via Gcc-patches
Hi Hao Chen, I don't understand.  This patch was already approved and you committed it. :-) I know because I needed to make corresponding adjustments to the new builtins code. Thanks, Bill On 11/15/21 8:16 PM, HAO CHEN GUI wrote: > Hi, > >    The patch optimizes the code generation for vec_xl_

Re: [PATCH v4] Fix ICE when mixing VLAs and statement expressions [PR91038]

2021-11-16 Thread Uecker, Martin
Am Montag, den 08.11.2021, 19:13 +0100 schrieb Martin Uecker: > Am Montag, den 08.11.2021, 12:13 -0500 schrieb Jason Merrill: > > On 11/7/21 01:40, Uecker, Martin wrote: > > > Am Mittwoch, den 03.11.2021, 10:18 -0400 schrieb Jason Merrill: > > ... > > > > Thank you! I made these changes and ran >

Re: [PATCH] Loop unswitching: support gswitch statements.

2021-11-16 Thread Martin Liška
On 11/11/21 08:15, Richard Biener wrote: If you look at simplify_using_entry_checks then this is really really simple, so I'd try to abstract this, recording sth like a unswitch_predicate where we store the condition we unswitch on plus maybe cache the constant range of a VAR cmp CST variable con

[committed] libstdc++: Fix typos in tests

2021-11-16 Thread Jonathan Wakely via Gcc-patches
Tested x86_64-linux, pushed to trunk. libstdc++-v3/ChangeLog: * testsuite/21_strings/basic_string/allocator/71964.cc: Fix typo. * testsuite/23_containers/set/allocator/71964.cc: Likewise. --- .../testsuite/21_strings/basic_string/allocator/71964.cc| 2 +- libstdc

[committed] libstdc++: Fix out-of-bound array accesses in testsuite

2021-11-16 Thread Jonathan Wakely via Gcc-patches
Tested x86_64-linux, pushed to trunk. I fixed some undefined behaviour in string tests in r238609, but I only fixed the narrow char versions. This applies the same fixes to the wchar_t ones. These problems were found when testing a patch to make std::basic_string usable in constexpr. libstdc++-v

Re: [PATCH v2] configure: define TARGET_LIBC_GNUSTACK on musl

2021-11-16 Thread Dragan Mladjenovic
Hi, Looks fine to me. If possible, maybe it should even be back-ported to stable branches. Not sure if MIPS assembly sources (if any) in musl would need explicit .note.GNU-stack to complement this? Best regards, Dragan On 16-Nov-21 06:13, Ilya Lipnitskiy wrote: musl only uses PT_GNU_STA

Re: [PATCH] Fix spelling of ones' complement.

2021-11-16 Thread Koning, Paul via Gcc-patches
> On Nov 16, 2021, at 2:03 AM, Aldy Hernandez via Gcc-patches > wrote: > > On Tue, Nov 16, 2021, 03:20 Marek Polacek via Gcc-patches < > gcc-patches@gcc.gnu.org> wrote: > >> On Tue, Nov 16, 2021 at 02:01:47AM +, Koning, Paul via Gcc-patches >> wrote: >>> >>> On Nov 15, 2021, at 8:

Re: [PATCH] Loop unswitching: support gswitch statements.

2021-11-16 Thread Martin Liška
On 11/11/21 08:15, Richard Biener wrote: So I'd try to do no functional change first, improving the costing and setting up the transform to simply pick up the stmts to "fold" as discovered during analysis (as I hinted you possibly can use gimple_uid to mark the stmts that simplify, IIRC gimple_ui

Re: [PATCH] Fix spelling of ones' complement.

2021-11-16 Thread Aldy Hernandez via Gcc-patches
On Tue, Nov 16, 2021 at 3:40 PM Koning, Paul wrote: > > > > > On Nov 16, 2021, at 2:03 AM, Aldy Hernandez via Gcc-patches > > wrote: > > > > On Tue, Nov 16, 2021, 03:20 Marek Polacek via Gcc-patches < > > gcc-patches@gcc.gnu.org> wrote: > > > >> On Tue, Nov 16, 2021 at 02:01:47AM +, Koning,

[PATCH v2] c++: improve print_node of PTRMEM_CST

2021-11-16 Thread Jason Merrill via Gcc-patches
On 11/4/21 16:32, Jakub Jelinek wrote: On Thu, Nov 04, 2021 at 11:52:34AM -0400, Jason Merrill via Gcc-patches wrote: It's been inconvenient that pretty-printing of PTRMEM_CST didn't display what member the constant refers to. Adding that is complicated by the absence of a langhook for CONSTANT

[committed] analyzer: fix overeager sharing of bounded_range instances [PR102662]

2021-11-16 Thread David Malcolm via Gcc-patches
This was leading to an assertion failure ICE on a switch stmt when using -fstrict-enums, due to erroneously reusing a range involving one enum with a range involving a different enum. Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu. Pushed to trunk as r12-5307-ge1c0c908f85816240b685a

Re: [PATCH 1/5] libstdc++: Import the fast_float library

2021-11-16 Thread Patrick Palka via Gcc-patches
On Tue, 16 Nov 2021, Florian Weimer wrote: > * Patrick Palka via Libstdc: > > > This copies the fast_float library[1] into the compiled-in library > > sources. We're going to use this library in our floating-point > > std::from_chars implementation for faster and more portable parsing of > > bin

[PATCH]middle-end: Fix FMA detection when inspecting gimple which have no LHS.

2021-11-16 Thread Tamar Christina via Gcc-patches
Hi All, convert_mult_to_fma assumes that all gimple_assigns have a LHS set. This assumption is however not true when an IFN is kept around just for the side-effects. In those situations you have just the IFN and lhs will be null. Since there's no LHS, there also can't be any ADD and such it can

[PATCH][committed]AArch64 shrn-combine-10: update test to current codegen.

2021-11-16 Thread Tamar Christina via Gcc-patches
Hi All, When the rshrn commit was reverted I missed this testcase. This now updates it. Bootstrapped Regtested on aarch64-none-linux-gnu and no issues. Committed under the obvious rule. Thanks, Tamar gcc/testsuite/ChangeLog: * gcc.target/aarch64/shrn-combine-10.c: Use shrn. --- inlin

[PATCH][committed]middle-end signbit-2: make test check for scalar or vector versions

2021-11-16 Thread Tamar Christina via Gcc-patches
Hi All, This updates the signbit-2 test to check for the scalar optimization if the target does not support vectorization. Regtested on aarch64-none-linux-gnu, x86_64-pc-linux-gnu and no regressions. Committed under the gcc obvious rule. Thanks, Tamar gcc/testsuite/ChangeLog: * gcc.dg

Re: [PATCH 2/5] gimple-match: Add a gimple_extract_op function

2021-11-16 Thread Richard Sandiford via Gcc-patches
Richard Biener writes: > On Wed, Nov 10, 2021 at 1:46 PM Richard Sandiford via Gcc-patches > wrote: >> >> code_helper and gimple_match_op seem like generally useful ways >> of summing up a gimple_assign or gimple_call (or gimple_cond). >> This patch adds a gimple_extract_op function that can be u

Re: [PATCH 1/5] libstdc++: Import the fast_float library

2021-11-16 Thread Daniel Krügler via Gcc-patches
Am Di., 16. Nov. 2021 um 16:31 Uhr schrieb Patrick Palka via Libstdc++ : > [..] > -- >8 -- > > Subject: [PATCH 1/5] libstdc++: Import the fast_float library > [..] > +## Reference > + > +- Daniel Lemire, [Number Parsing at a Gigabyte per > Second](https://arxiv.org/abs/2101.11408), Software: Prati

Re: [PATCH 4/5] vect: Make reduction code handle calls

2021-11-16 Thread Richard Sandiford via Gcc-patches
Richard Biener via Gcc-patches writes: > On Wed, Nov 10, 2021 at 1:48 PM Richard Sandiford via Gcc-patches > wrote: >> >> This patch extends the reduction code to handle calls. So far >> it's a structural change only; a later patch adds support for >> specific function reductions. >> >> Most of

Re: [musl] Re: [PATCH v2] configure: define TARGET_LIBC_GNUSTACK on musl

2021-11-16 Thread Rich Felker
On Tue, Nov 16, 2021 at 03:40:00PM +0100, Dragan Mladjenovic wrote: > Hi, > > Looks fine to me. If possible, maybe it should even be back-ported > to stable branches. > > Not sure if MIPS assembly sources (if any) in musl would need > explicit ..note.GNU-stack > > to complement this? What are t

Re: [PATCH] simplify get_range_strlen interface

2021-11-16 Thread Martin Sebor via Gcc-patches
On 11/15/21 3:05 PM, Martin Sebor wrote: The deeply nested PHI handling in get_range_strlen_dynamic makes the code bigger and harder to follow than it would be if done in its own function.  The attached patch does that. In addition, the get_range_strlen family of functions use a bitmap to avoid

[committed 1/2] libstdc++: Use hidden friends for vector::reference swap overloads

2021-11-16 Thread Jonathan Wakely via Gcc-patches
Tested x86_64-linux, committed to trunk. These swap overloads are non-standard, but are needed to make swap work for vector::reference rvalues. They don't need to be called explicitly, only via ADL, so hide them from normal lookup. This is what I've proposed as the resolution to LWG 3638. libstdc

[committed 2/2] libstdc++: Implement constexpr std::basic_string for C++20

2021-11-16 Thread Jonathan Wakely via Gcc-patches
From: Michael de Lang Tested x86_64-linux, committed to trunk. This is only supported for the cxx11 ABI, not for COW strings. libstdc++-v3/ChangeLog: * include/bits/basic_string.h (basic_string, operator""s): Add constexpr for C++20. (basic_string::basic_string(basic_s

[PATCH] Do not abort compilation when dump file is /dev/*

2021-11-16 Thread Giuliano Belinassi via Gcc-patches
The `configure` scripts generated with autoconf often tests compiler features by setting output to `/dev/null`, which then sets the dump folder as being /dev/* and the compilation halts with an error because GCC cannot create files in /dev/. This is a problem when configure is testing for compiler

[PATCH RFC] c-family: don't cache large vecs

2021-11-16 Thread Jason Merrill via Gcc-patches
Patrick observed recently that an element of the vector cache could be arbitrarily large. Let's only cache relatively small vecs. This has no effect on compiling the libstdc++ stdc++.h, presumably because nothing in the library requires a vec that large. I figure that this makes it more likely t

Re: [committed 2/2] libstdc++: Implement constexpr std::basic_string for C++20

2021-11-16 Thread Jonathan Wakely via Gcc-patches
Oops, the subject line was not supposed to say 2/2 for this commit, and I was not supposed to have Michael de Lang as the author ... I messed up my git send-email and git cherry-pick commands! Sorry Michael, I originally tried to use your tests from https://github.com/Oipo/gcc/ but as noted in htt

Re: [PATCH 06/15] visium: Fix non-robust split condition in define_insn_and_split

2021-11-16 Thread Eric Botcazou via Gcc-patches
> gcc/ChangeLog: > > * config/visium/visium.md (*add3_insn, *addsi3_insn, *addi3_insn, > *sub3_insn, *subsi3_insn, *subdi3_insn, *neg2_insn, > *negdi2_insn, *and3_insn, *ior3_insn, *xor3_insn, > *one_cmpl2_insn, *ashl3_insn, *ashr3_insn, > *lshr3_insn, *trunchiqi2_insn

Re: [PATCH RFC] c-family: don't cache large vecs

2021-11-16 Thread Marek Polacek via Gcc-patches
On Tue, Nov 16, 2021 at 11:53:14AM -0500, Jason Merrill via Gcc-patches wrote: > Patrick observed recently that an element of the vector cache could be > arbitrarily large. Let's only cache relatively small vecs. > > This has no effect on compiling the libstdc++ stdc++.h, presumably because > not

[PATCH] rs6000: Add [power6-64] stanza to new builtin support

2021-11-16 Thread Bill Schmidt via Gcc-patches
Hi! While reviewing the recent 32-bit changes for the new builtin infrastructure, I realized that I needed another stanza to represent builtins requiring both -mcpu=power6 and -mpowerpc64. (There's only one of these, but nonetheless...) So this patch adds that support in the same fashion as [pow

Re: [PATCH] rs6000: Add [power6-64] stanza to new builtin support

2021-11-16 Thread Bill Schmidt via Gcc-patches
Sorry, I forgot to CC maintainers on this one. Thanks! Bill On 11/16/21 11:06 AM, Bill Schmidt wrote: > Hi! While reviewing the recent 32-bit changes for the new builtin > infrastructure, > I realized that I needed another stanza to represent builtins requiring both > -mcpu=power6 and -mpowerpc

[PATCH] rs6000: Better error messages for power8/9-vector builtins

2021-11-16 Thread Bill Schmidt via Gcc-patches
Hi! During a previous patch review, Segher asked that I provide better messages when builtins are unavailable because they require both a minimum CPU and the enablement of VSX instructions. This patch does just that. Bootstrapped and tested on powerpc64le-linux-gnu with no regressions. Is this o

Re: [musl] Re: [PATCH v2] configure: define TARGET_LIBC_GNUSTACK on musl

2021-11-16 Thread Ilya Lipnitskiy via Gcc-patches
On Tue, Nov 16, 2021 at 8:41 AM Rich Felker wrote: > > On Tue, Nov 16, 2021 at 03:40:00PM +0100, Dragan Mladjenovic wrote: > > Hi, > > > > Looks fine to me. If possible, maybe it should even be back-ported > > to stable branches. The change cherry-picks fine onto 10.x and 11.x branches. Should I s

Re: [PATCH 4/5] if-conv: Apply VN to hoisted conversions

2021-11-16 Thread Richard Sandiford via Gcc-patches
Richard Biener via Gcc-patches writes: > On Mon, Nov 15, 2021 at 3:00 PM Richard Sandiford > wrote: >> >> Richard Biener via Gcc-patches writes: >> > On Fri, Nov 12, 2021 at 7:05 PM Richard Sandiford via Gcc-patches >> > wrote: >> >> >> >> This patch is a prerequisite for a later one. At the m

Re: [PATCH] rs6000: MMA test case emits wrong code when building a vector pair

2021-11-16 Thread Peter Bergner via Gcc-patches
On 11/13/21 7:25 AM, Segher Boessenkool wrote: > On Wed, Oct 27, 2021 at 08:37:57PM -0500, Peter Bergner wrote: >> PR102976 shows a test case where we generate wrong code when building >> a vector pair from 2 vector registers. The bug here is that with unlucky >> register assignments, we can clobb

[PATCH] x86: Add -mharden-sls=[none|all|return|indirect-branch]

2021-11-16 Thread H.J. Lu via Gcc-patches
Add -mharden-sls= to mitigate against straight line speculation (SLS) for function return and indirect branch by adding an INT3 instruction after function return and indirect branch. gcc/ PR target/102952 * config/i386/i386-opts.h (harden_sls): New enum. * config/i386/i386

[PATCH] x86: Add -mindirect-branch-cs-prefix

2021-11-16 Thread H.J. Lu via Gcc-patches
Add -mindirect-branch-cs-prefix to add CS prefix to call and jmp to thunk via r8-r15 registers when converting indirect call and jump to increase the instruction length to 6, allowing the non-thunk form to be inlined. gcc/ PR target/102952 * config/i386/i386.c (ix86_output_jmp_thu

[PATCH v2] rs6000: Fix a handful of 32-bit built-in function problems

2021-11-16 Thread Bill Schmidt via Gcc-patches
Hi! I previously posted [1] to correct some problems with the new builtins support targeting 32-bit code gen. Based on the discussion, I've made some adjustments and would like to submit this for consideration. We eventually agreed that the strange behavior for -m32 -mpowerpc64 for certain HTM b

[r12-5292 Regression] FAIL: gcc.dg/tree-ssa/modref-dse-5.c scan-tree-dump dse2 "Deleted dead store: wrap" on Linux/x86_64

2021-11-16 Thread sunil.k.pandey via Gcc-patches
On Linux/x86_64, e69b7c5779863469479698f863ab25e0d9b4586e is the first bad commit commit e69b7c5779863469479698f863ab25e0d9b4586e Author: Jan Hubicka Date: Tue Nov 16 09:15:39 2021 +0100 Fix uninitialized access in merge_call_side_effects caused FAIL: gcc.dg/tree-ssa/modref-dse-5.c scan-

[r12-5301 Regression] FAIL: gcc.dg/tree-ssa/if-to-switch-3.c scan-tree-dump iftoswitch "Condition chain with [^\n\r]* BBs transformed into a switch statement." on Linux/x86_64

2021-11-16 Thread sunil.k.pandey via Gcc-patches
On Linux/x86_64, 045206450386bcd774db3bde0c696828402361c6 is the first bad commit commit 045206450386bcd774db3bde0c696828402361c6 Author: Richard Biener Date: Fri Nov 12 10:21:22 2021 +0100 tree-optimization/102880 - improve CD-DCE caused FAIL: gcc.dg/tree-ssa/if-to-switch-3.c scan-tree-

[pushed] configure, Darwin: Set appropriate defaults for host-shared.

2021-11-16 Thread Iain Sandoe via Gcc-patches
Darwin x86_64 and aarch64 platforms are PIC (shared) by default, and user-space code must be built in this mode. The patch ensures that this is set correctly and applies a default when --enable-host-shared is not set. tested on *-darwin*, x86_64,powerpc64le-linux-gnu, pushed to master, thanks Iai

[PATCH v2] libcpp: Implement -Wbidi-chars for CVE-2021-42574 [PR103026]

2021-11-16 Thread Marek Polacek via Gcc-patches
On Mon, Nov 15, 2021 at 06:15:40PM -0500, David Malcolm wrote: > > On Mon, Nov 08, 2021 at 04:33:43PM -0500, Marek Polacek wrote: > > > Ping, can we conclude on the name? IMHO, -Wbidirectional is just fine, > > > but changing the name is a trivial operation. > > > > Here's a patch with a better

Re: [PATCH v4] Fix ICE when mixing VLAs and statement expressions [PR91038]

2021-11-16 Thread Jason Merrill via Gcc-patches
On 11/16/21 08:48, Uecker, Martin wrote: Am Montag, den 08.11.2021, 19:13 +0100 schrieb Martin Uecker: Am Montag, den 08.11.2021, 12:13 -0500 schrieb Jason Merrill: On 11/7/21 01:40, Uecker, Martin wrote: Am Mittwoch, den 03.11.2021, 10:18 -0400 schrieb Jason Merrill: ... Thank you! I made

Re: [PATCH] Fix spelling of ones' complement.

2021-11-16 Thread Bernhard Reutner-Fischer via Gcc-patches
On Tue, 16 Nov 2021 15:55:55 +0100 Aldy Hernandez via Gcc-patches wrote: > All sources before Knuth are clearly wrong. How could they not? > Folks living in the pre-Knuth era lived without a deity. > > :-P Not sure if this one's a compliment. Speaking of which: $ git grep -i "complim" gcc/Ch

[PATCH, committed] PR fortran/103286 - ICE in resolve_select, at fortran/resolve.c:8848

2021-11-16 Thread Harald Anlauf via Gcc-patches
Committed to mainline as obvious after regtesting. When issuing an error on an invalid range in a SELECT CASE statement with a logical case expression, we need to be careful to use the right locus information. Thanks, Harald From 3b3c9932338650c9a402cf1bfbdf7dfc03e185e7 Mon Sep 17 00:00:00 2001

Re: [PATCH] restore ancient -Waddress for weak symbols [PR33925]

2021-11-16 Thread Jason Merrill via Gcc-patches
On 10/23/21 19:06, Martin Sebor wrote: On 10/4/21 3:37 PM, Jason Merrill wrote: On 10/4/21 14:42, Martin Sebor wrote: While resolving the recent -Waddress enhancement request (PR PR102103) I came across a 2007 problem report about GCC 4 having stopped warning for using the address of inline fun

Re: [RFC] c++: Print function template parms when relevant (was: [PATCH v4] c++: Add gnu::diagnose_as attribute)

2021-11-16 Thread Jason Merrill via Gcc-patches
On 11/8/21 15:00, Matthias Kretz wrote: I forgot to mention why I tagged it [RFC]: I needed one more bit of information on the template args TREE_VEC to encode EXPLICIT_TEMPLATE_ARGS_P. Its TREE_CHAIN already points to an integer constant denoting the number of non-default arguments, so I couldn'

[PATCH v2] rs6000: Test case adjustments for new builtins

2021-11-16 Thread Bill Schmidt via Gcc-patches
Hi! I recently submitted [1] to make adjustments to test cases for the new builtins support, mostly due to error messages changing for consistency. Thanks for the previous review. I've reviewed the reasons for the changes and removed unrelated changes as requested. A couple of comments: - F

Re: [RFC] c++: Print function template parms when relevant (was: [PATCH v4] c++: Add gnu::diagnose_as attribute)

2021-11-16 Thread Matthias Kretz
On Tuesday, 16 November 2021 21:25:33 CET Jason Merrill wrote: > On 11/8/21 15:00, Matthias Kretz wrote: > > I forgot to mention why I tagged it [RFC]: I needed one more bit of > > information on the template args TREE_VEC to encode > > EXPLICIT_TEMPLATE_ARGS_P. Its TREE_CHAIN already points to an

Re: [RFC] c++: Print function template parms when relevant (was: [PATCH v4] c++: Add gnu::diagnose_as attribute)

2021-11-16 Thread Jason Merrill via Gcc-patches
On 11/16/21 15:42, Matthias Kretz wrote: On Tuesday, 16 November 2021 21:25:33 CET Jason Merrill wrote: On 11/8/21 15:00, Matthias Kretz wrote: I forgot to mention why I tagged it [RFC]: I needed one more bit of information on the template args TREE_VEC to encode EXPLICIT_TEMPLATE_ARGS_P. Its T

Re: [RFC] c++: Print function template parms when relevant (was: [PATCH v4] c++: Add gnu::diagnose_as attribute)

2021-11-16 Thread Matthias Kretz
On Tuesday, 16 November 2021 21:49:31 CET Jason Merrill wrote: > On 11/16/21 15:42, Matthias Kretz wrote: > > On Tuesday, 16 November 2021 21:25:33 CET Jason Merrill wrote: > >> On 11/8/21 15:00, Matthias Kretz wrote: > >>> I forgot to mention why I tagged it [RFC]: I needed one more bit of > >>> i

Re: [PATCH] Fix spelling of ones' complement.

2021-11-16 Thread Mike Stump via Gcc-patches
On Nov 15, 2021, at 5:48 PM, Marek Polacek via Gcc-patches wrote: > > Nitpicking time. It's spelled "ones' complement" rather than "one's > complement". I didn't go into config/. > > Ok for trunk? So, is it two's complement or twos' complement then? Seems like it should be the same, but w

Re: [PATCH] Fix spelling of ones' complement.

2021-11-16 Thread Marek Polacek via Gcc-patches
On Tue, Nov 16, 2021 at 01:09:15PM -0800, Mike Stump via Gcc-patches wrote: > On Nov 15, 2021, at 5:48 PM, Marek Polacek via Gcc-patches > wrote: > > > > Nitpicking time. It's spelled "ones' complement" rather than "one's > > complement". I didn't go into config/. > > > > Ok for trunk? > > S

[committed] libstdc++: Fix tests for constexpr std::string

2021-11-16 Thread Jonathan Wakely via Gcc-patches
Tested powerpc64le-linux, pushed to trunk. Some tests fail when run with -D_GLIBCXX_USE_CXX11_ABI or -stdgnu++20. libstdc++-v3/ChangeLog: * include/bits/basic_string.h (operator<=>): Use constexpr unconditionally. * testsuite/21_strings/basic_string/modifiers/constexpr.c

  1   2   >