[PATCH] libcpp: Implement C++23 P2290R3 - Delimited escape sequences [PR106645]

2022-08-17 Thread Jakub Jelinek via Gcc-patches
Hi! The following patch implements the C++23 P2290R3 paper. Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk? 2022-08-17 Jakub Jelinek PR c++/106645 libcpp/ * include/cpplib.h (struct cpp_options): Implement P2290R3 - Delimited escape sequences. Ad

Re: [PATCH] fortran: Add -static-libquadmath support [PR46539]

2022-08-17 Thread Jakub Jelinek via Gcc-patches
On Tue, Aug 16, 2022 at 04:31:03PM +0200, Jakub Jelinek via Gcc-patches wrote: > So far slightly tested on x86_64-linux (and will bootstrap/regtest > it there tonight), but I unfortunately don't have a way to test it FYI, successfully bootstrapped/regtested on x86_64-linux and i686-linux. > 2022-

[PATCH] RISC-V: Add runtime invariant support

2022-08-17 Thread juzhe . zhong
From: zhongjuzhe RISC-V 'V' Extension support scalable vector like ARM SVE. To support RVV, we need to introduce runtime invariant. - For zve32*, the runtime invariant uses 32-bit chunk. - For zve64*, the runtime invariant uses 64-bit chunk. [1] https://github.com/riscv/riscv-v-spec/blob/maste

Re: [PATCH] Refactor back_threader_profitability

2022-08-17 Thread Aldy Hernandez via Gcc-patches
I just have a few high level comments. On Tue, Aug 16, 2022 at 4:05 PM Richard Biener wrote: > > The following refactors profitable_path_p in the backward threader, > splitting out parts that can be computed once the exit block is known, > parts that contiguously update and that can be checked al

Re: [PATCH] Support threading of just the exit edge

2022-08-17 Thread Richard Biener via Gcc-patches
On Tue, 16 Aug 2022, Andrew MacLeod wrote: > > On 8/16/22 05:18, Richard Biener wrote: > > On Mon, 15 Aug 2022, Aldy Hernandez wrote: > > > >> On Mon, Aug 15, 2022 at 9:24 PM Andrew MacLeod wrote: > >>> heh. or just > >>> > >>> > >>> + int_range<2> r; > >>> + if (!fold_range (r, const_

Re: [PATCH] Refactor back_threader_profitability

2022-08-17 Thread Richard Biener via Gcc-patches
On Wed, 17 Aug 2022, Aldy Hernandez wrote: > I just have a few high level comments. > > On Tue, Aug 16, 2022 at 4:05 PM Richard Biener wrote: > > > > The following refactors profitable_path_p in the backward threader, > > splitting out parts that can be computed once the exit block is known, > >

Re: [PATCH] fortran: Add -static-libquadmath support [PR46539]

2022-08-17 Thread Tobias Burnus
On 16.08.22 16:31, Jakub Jelinek via Gcc-patches wrote: The following patch is a revival of the https://gcc.gnu.org/legacy-ml/gcc-patches/2014-10/msg00771.html patch. While trunk configured against recent glibc and with linker --as-needed support doesn't really need to link against -lquadmath an

Re: [PATCH] Refactor back_threader_profitability

2022-08-17 Thread Aldy Hernandez via Gcc-patches
On Wed, Aug 17, 2022 at 9:54 AM Richard Biener wrote: > > On Wed, 17 Aug 2022, Aldy Hernandez wrote: > > > I just have a few high level comments. > > > > On Tue, Aug 16, 2022 at 4:05 PM Richard Biener wrote: > > > > > > The following refactors profitable_path_p in the backward threader, > > > spl

Re: [PATCH] fortran: Add -static-libquadmath support [PR46539]

2022-08-17 Thread Mikael Morin
Hello, Tobias approved it already, but I spotted what looks like typos. See below. Mikael gcc/ * common.opt (static-libquadmath): New option. * gcc.c (driver_handle_option): Always accept -static-libquadmath. * config/darwin.h (LINK_SPEC): Handle -static-libquadmath.

[PATCH] arm: Define with_float to hard when target name ends with hf

2022-08-17 Thread Christophe Lyon via Gcc-patches
On arm, the --with-float= configure option is used to define include files search path (among other things). However, when targeting arm-linux-gnueabihf, one would expect to automatically default to the hard-float ABI, but this is not the case. As a consequence, GCC bootstrap fails on an arm-linux

Re: [PATCH] Refactor back_threader_profitability

2022-08-17 Thread Richard Biener via Gcc-patches
On Wed, 17 Aug 2022, Aldy Hernandez wrote: > On Wed, Aug 17, 2022 at 9:54 AM Richard Biener wrote: > > > > On Wed, 17 Aug 2022, Aldy Hernandez wrote: > > > > > I just have a few high level comments. > > > > > > On Tue, Aug 16, 2022 at 4:05 PM Richard Biener wrote: > > > > > > > > The following r

Re: [PATCH] Refactor back_threader_profitability

2022-08-17 Thread Aldy Hernandez via Gcc-patches
On Wed, Aug 17, 2022 at 10:38 AM Richard Biener wrote: > > On Wed, 17 Aug 2022, Aldy Hernandez wrote: > > > On Wed, Aug 17, 2022 at 9:54 AM Richard Biener wrote: > > > > > > On Wed, 17 Aug 2022, Aldy Hernandez wrote: > > > > > > > I just have a few high level comments. > > > > > > > > On Tue, Aug

Re: [PATCH] Refactor back_threader_profitability

2022-08-17 Thread Richard Biener via Gcc-patches
On Wed, 17 Aug 2022, Aldy Hernandez wrote: > On Wed, Aug 17, 2022 at 10:38 AM Richard Biener wrote: > > > > On Wed, 17 Aug 2022, Aldy Hernandez wrote: > > > > > On Wed, Aug 17, 2022 at 9:54 AM Richard Biener wrote: > > > > > > > > On Wed, 17 Aug 2022, Aldy Hernandez wrote: > > > > > > > > > I ju

Re: [PATCH] Refactor back_threader_profitability

2022-08-17 Thread Aldy Hernandez via Gcc-patches
On Wed, Aug 17, 2022 at 10:59 AM Richard Biener wrote: > > On Wed, 17 Aug 2022, Aldy Hernandez wrote: > > > On Wed, Aug 17, 2022 at 10:38 AM Richard Biener wrote: > > > > > > On Wed, 17 Aug 2022, Aldy Hernandez wrote: > > > > > > > On Wed, Aug 17, 2022 at 9:54 AM Richard Biener > > > > wrote: >

Re: [PATCH] xtensa: Prevent emitting integer additions of constant zero

2022-08-17 Thread Takayuki 'January June' Suwa via Gcc-patches
On 2022/08/17 4:58, Max Filippov wrote: > Hi Suwa-san, Hi! > > On Tue, Aug 16, 2022 at 5:42 AM Takayuki 'January June' Suwa > wrote: >> >> In a few cases, obviously omitable add instructions can be emitted via >> invoking gen_addsi3. >> >> gcc/ChangeLog: >> >> * config/xtensa/xtensa.md (

Re: add more C++ name hints

2022-08-17 Thread Ulrich Drepper via Gcc-patches
Any comment on this? These changes are low-risk so the only real objection I can see is that people don't deem these messages useful in the first place. I would hope, though, that some editors/IDEs provide one-click solutions to add the #includes. On Fri, Aug 5, 2022 at 9:35 PM Ulrich Drepper

[PATCH] fortran, v2: Add -static-libquadmath support [PR46539]

2022-08-17 Thread Jakub Jelinek via Gcc-patches
On Wed, Aug 17, 2022 at 10:28:29AM +0200, Mikael Morin wrote: > Tobias approved it already, but I spotted what looks like typos. > See below. Thanks for catching that. > > --- gcc/config/darwin.h.jj 2022-08-16 14:51:14.529544492 +0200 > > +++ gcc/config/darwin.h 2022-08-16 14:53:54.402460097

[PATCH] Support bitmap_copy across representations

2022-08-17 Thread Richard Biener via Gcc-patches
The following started as making the backward threader m_imports use the tree representation. Since that interfaces to a list representation bitmap in ranger by copying rewriting the tree to list to perform the copy is inefficient in that it loses balancing. The following adds bitmap_copy_tree_to_

Re: [PATCH] Fix bogus -Wstringop-overflow warning in Ada

2022-08-17 Thread Richard Biener via Gcc-patches
On Tue, Aug 16, 2022 at 3:57 PM Eric Botcazou via Gcc-patches wrote: > > Hi, > > the following bogus warning: > > In function 'lto26', > inlined from 'main' at /home/eric/gnat/bugs/V721-018/b~lto26.adb:237:7: > lto26.adb:11:13: warning: writing 1 byte into a region of size 0 [-Wstringop- > ove

Re: ICE after folding svld1rq to vec_perm_expr duing forwprop

2022-08-17 Thread Richard Biener via Gcc-patches
On Tue, Aug 16, 2022 at 6:30 PM Richard Sandiford wrote: > > Prathamesh Kulkarni writes: > > On Tue, 9 Aug 2022 at 18:42, Richard Biener > > wrote: > >> > >> On Tue, Aug 9, 2022 at 12:10 PM Prathamesh Kulkarni > >> wrote: > >> > > >> > On Mon, 8 Aug 2022 at 14:27, Richard Biener > >> > w>> >

Re: Restore 'GOMP_offload_unregister_ver' functionality (was: [Patch][v5] OpenMP: Move omp requires checks to libgomp)

2022-08-17 Thread Jakub Jelinek via Gcc-patches
On Wed, Jul 06, 2022 at 03:59:59PM +0200, Tobias Burnus wrote: > > @@ -2436,12 +2452,15 @@ GOMP_offload_unregister_ver (unsigned version, > > const void *host_table, > > } > > > > /* Remove image from array of pending images. */ > > + bool found = false; > > for (i = 0; i < num_of

Re: [PATCH] arm: Define with_float to hard when target name ends with hf

2022-08-17 Thread Richard Earnshaw via Gcc-patches
On 17/08/2022 09:35, Christophe Lyon via Gcc-patches wrote: On arm, the --with-float= configure option is used to define include files search path (among other things). However, when targeting arm-linux-gnueabihf, one would expect to automatically default to the hard-float ABI, but this is no

Re: [Patch] OpenMP: Fix folding with simd's linear clause [PR106492]

2022-08-17 Thread Jakub Jelinek via Gcc-patches
On Thu, Aug 04, 2022 at 09:32:22AM +0200, Tobias Burnus wrote: > Rather obvious fix and similar to PR106449. > > OK for mainline and backporting (how far?). I would like to backport it > at least to GCC 12. It can go even to 11 and 10 if you are willing to test the backports there (after a while)

[PATCH] IBM zSystems: Fix function_ok_for_sibcall [PR106355]

2022-08-17 Thread Stefan Schulze Frielinghaus via Gcc-patches
For a parameter with BLKmode we cannot use REG_NREGS in order to determine the number of consecutive registers. Streamlined this with the implementation of s390_function_arg. Fix some indentation whitespace, too. Assuming bootstrap and regtest are ok for mainline and gcc-{10,11,12}, ok to instal

[PATCH] Make path_range_query standalone and add reset_path.

2022-08-17 Thread Aldy Hernandez via Gcc-patches
These are a bunch of cleanups inspired by Richi's suggestion of making path_range_query standalone, instead of having to call compute_ranges() for each path. I've made the ranger need explicit, and moved the responsibility for its creation to the caller. I've also investigated and documented why

Re: [PATCH] IBM zSystems: Fix function_ok_for_sibcall [PR106355]

2022-08-17 Thread Richard Biener via Gcc-patches
On Wed, Aug 17, 2022 at 1:57 PM Stefan Schulze Frielinghaus via Gcc-patches wrote: > > For a parameter with BLKmode we cannot use REG_NREGS in order to > determine the number of consecutive registers. Streamlined this with > the implementation of s390_function_arg. > > Fix some indentation whites

[PATCH] config/rs6000/t-float128: Don't encode full build paths into headers

2022-08-17 Thread Richard Purdie via Gcc-patches
Avoid encoding full build paths into headers, just use the basename of the file. This aids build reproducibility where the build paths vary and source is saved for debugging purposes. libgcc/ChangeLog: * config/rs6000/t-float128: Don't encode full build paths into headers Signed-off-by: Rich

Re: [PATCH, OpenMP, C++] Allow classes with static members to be mappable

2022-08-17 Thread Jakub Jelinek via Gcc-patches
On Wed, Jul 27, 2022 at 01:45:30PM +0200, Tobias Burnus wrote: > OpenMP/C++: Allow classes with static members to be mappable > > As this is the last lang-specific user of the omp_mappable_type hook, > the hook is removed, keeping only a generic omp_mappable_type for > incomplete types (or error_n

[PATCH 1/2] gcc/file-prefix-map: Allow remapping of relative paths

2022-08-17 Thread Richard Purdie via Gcc-patches
Relative paths currently aren't remapped by -ffile-prefix-map and friends. When cross compiling with separate 'source' and 'build' directories, the same relative paths between directories may not be available on target as compared to build time. In order to be able to remap these relative build pa

[PATCH 2/2] libcpp: Avoid remapping filenames within directives

2022-08-17 Thread Richard Purdie via Gcc-patches
Code such as: can interact poorly with file-prefix-map options when cross compiling. In general you're after to remap filenames for use in target context but the local paths should be used to find include files at compile time. Ingoring filename remapping for directives is one way to avoid such

Re: add more C++ name hints

2022-08-17 Thread Marek Polacek via Gcc-patches
On Fri, Aug 05, 2022 at 09:35:33PM +0200, Ulrich Drepper via Gcc-patches wrote: > How about adding a few more names from the std namespace to get appropriate > hints? This patch compiles and the appropriate messages are printed. Is > there a problem with just adding more or even at some point all

Re: [Patch] OpenMP: Fix var replacement with 'simd' and linear-step vars [PR106548]

2022-08-17 Thread Jakub Jelinek via Gcc-patches
On Tue, Aug 16, 2022 at 05:28:40PM +0200, Tobias Burnus wrote: > The testcase is just a copy of linear-1 with 'omp ... for' replaced by 'omp > ... for simd', > matching what the PR report referred to. > > The problem occurs for 'omp ... for simd linear( i : step)' when 'step' is a > variable > w

Extend fold_vec_perm to fold VEC_PERM_EXPR in VLA manner

2022-08-17 Thread Prathamesh Kulkarni via Gcc-patches
Hi, The attached prototype patch extends fold_vec_perm to fold VEC_PERM_EXPR in VLA manner, and currently handles the following cases: (a) fixed len arg0, arg1 and fixed len sel. (b) fixed len arg0, arg1 and vla sel (c) vla arg0, arg1 and vla sel with arg0, arg1 being VECTOR_CST. It seems to work

Re: [PATCH] Teach vectorizer to deal with bitfield accesses (was: [RFC] Teach vectorizer to deal with bitfield reads)

2022-08-17 Thread Richard Biener via Gcc-patches
On Tue, 16 Aug 2022, Andre Vieira (lists) wrote: > Hi, > > New version of the patch attached, but haven't recreated the ChangeLog yet, > just waiting to see if this is what you had in mind. See also some replies to > your comments in-line below: > > On 09/08/2022 15:34, Richard Biener wrote: >

Re: [PATCH] PR106342 - IBM zSystems: Provide vsel for all vector modes

2022-08-17 Thread Ilya Leoshkevich via Gcc-patches
On Thu, 2022-08-11 at 07:45 +0200, Andreas Krebbel wrote: > On 8/10/22 13:42, Ilya Leoshkevich wrote: > > On Wed, 2022-08-03 at 12:20 +0200, Ilya Leoshkevich wrote: > > > Bootstrapped and regtested on s390x-redhat-linux.  Ok for master? > > > > > > > > > > > > dg.exp=pr104612.c fails with an ICE

Re: [Patch] Fortran: OpenMP fix declare simd inside modules and absent linear step [PR106566]

2022-08-17 Thread Jakub Jelinek via Gcc-patches
On Tue, Aug 16, 2022 at 04:45:07PM +0200, Tobias Burnus wrote: > Fixed subject line: "absent linear" should be "absent linear step" in the > subject line; > i.e. with "step" added: "Fortran: OpenMP fix declare simd inside modules and > absent linear step [PR106566]" > > I have also decided to mo

Re: [patch] libgomp/splay-tree.h: Fix splay_tree_prefix handling

2022-08-17 Thread Jakub Jelinek via Gcc-patches
On Fri, Jul 22, 2022 at 11:47:42AM +0200, Tobias Burnus wrote: > As is, it is only a cleanup/consistency patch. > > However, I did run into this issue when working on the reverse-offload > implementation (to handle reverse lookups of vars and functions). > > OK for mainline? > > Tobias > ---

Re: [Patch] Fortran: OpenMP fix declare simd inside modules and absent linear step [PR106566]

2022-08-17 Thread Tobias Burnus
On 17.08.22 15:09, Jakub Jelinek wrote: On Tue, Aug 16, 2022 at 04:45:07PM +0200, Tobias Burnus wrote: Fortran: OpenMP fix declare simd inside modules and absent linear step [PR106566] ... LGTM. +! { dg-final { scan-tree-dump-times "__attribute__\\(\\(omp declare simd \\(linear\\(0:ref,step

Re: [PATCH] Fix bogus -Wstringop-overflow warning in Ada

2022-08-17 Thread Eric Botcazou via Gcc-patches
> Hmm, can we instead do > > if (!integer_zerop (lowbnd) && tree_fits_shwi_p (lowbnd)) >{ > const offset_int lb = offset_int::from (lowbnd, SIGNED); > ... > > ? Apparently not: In file included from /home/eric/cvs/gcc/gcc/coretypes.h:460, from /home/eric/cvs/gcc/gcc

Re: [Patch] OpenMP requires: Fix diagnostic filename corner case

2022-08-17 Thread Jakub Jelinek via Gcc-patches
On Fri, Jul 22, 2022 at 12:38:31PM +0200, Tobias Burnus wrote: > OpenMP requires: Fix diagnostic filename corner case > > The issue occurs when there is, e.g., main._omp_fn.0 in two files with > different OpenMP requires clauses. The function entries in the offload > table ends up having the same

[PATCH] Add further FOR_EACH_ macros

2022-08-17 Thread Stefan Schulze Frielinghaus via Gcc-patches
For my current use case only some FOR_EACH_MODE macros were missing. Though I thought I will give it a try and grep'ed through the source code and added further ones. I didn't manually check all of them but so far it looks good to me. Ok for mainline? contrib/ChangeLog: * clang-format:

Re: [PATCH 2/2] libcpp: Avoid remapping filenames within directives

2022-08-17 Thread Richard Purdie via Gcc-patches
On Wed, 2022-08-17 at 13:15 +0100, Richard Purdie via Gcc-patches wrote: > Code such as: > > can interact poorly with file-prefix-map options when cross compiling. In > general you're after to remap filenames for use in target context but the > local paths should be used to find include files at c

Re: [PATCH] Support threading of just the exit edge

2022-08-17 Thread Andrew MacLeod via Gcc-patches
On 8/17/22 03:42, Richard Biener wrote: On Tue, 16 Aug 2022, Andrew MacLeod wrote: On 8/16/22 05:18, Richard Biener wrote: On Mon, 15 Aug 2022, Aldy Hernandez wrote: On Mon, Aug 15, 2022 at 9:24 PM Andrew MacLeod wrote: heh. or just + int_range<2> r; + if (!fold_range (r, cons

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

2022-08-17 Thread Qing Zhao via Gcc-patches
Hi, This is the 3rd version of the patch set. Compare to the 2nd version, the following are the major change: 1. change the name of the option from -fstrict-flex-array to -fstrict-flex-arrays (per Kees' suggestion, this will be consistent with LLVM's option); 2. -std=c89 and ISO C++ will d

[[GCC13][Patch][V3] 2/2] Use array_at_struct_end_p in __builtin_object_size [PR101836]

2022-08-17 Thread Qing Zhao via Gcc-patches
Use array_at_struct_end_p to determine whether the trailing array of a structure is flexible array member in __builtin_object_size. gcc/ChangeLog: PR tree-optimization/101836 * tree-object-size.cc (addr_object_size): Use array_at_struct_end_p to determine a flexible array

[[GCC13][Patch][V3] 1/2] Add a new option -fstrict-flex-array[=n] and new attribute strict_flex_array

2022-08-17 Thread Qing Zhao via Gcc-patches
Add the following new option -fstrict-flex-array[=n] and a corresponding attribute strict_flex_array to GCC: '-fstrict-flex-array' Treat the trailing array of a structure as a flexible array member in a stricter way. The positive form is equivalent to '-fstrict-flex-array=3', which

Re: [PATCH] openmp: fix max_vf setting for amdgcn offloading

2022-08-17 Thread Jakub Jelinek via Gcc-patches
On Tue, Jul 12, 2022 at 03:16:35PM +0100, Andrew Stubbs wrote: > --- a/gcc/gimple-loop-versioning.cc > +++ b/gcc/gimple-loop-versioning.cc > @@ -555,7 +555,10 @@ loop_versioning::loop_versioning (function *fn) > unvectorizable code, since it is the largest size that can be > handled eff

[PATCH] Reset root oracle from path_oracle::reset_path.

2022-08-17 Thread Aldy Hernandez via Gcc-patches
When we cross a backedge in the path solver, we reset the path relations and nuke the root oracle. However, we forget to reset it for the next path. This is causing us to miss threads because subsequent paths will have no root oracle to use. With this patch we get 201 more threads in the threadf

Re: [PATCH] c++: Extend -Wpessimizing-move to other contexts

2022-08-17 Thread Jason Merrill via Gcc-patches
On 8/16/22 14:09, Marek Polacek wrote: On Tue, Aug 16, 2022 at 03:23:18PM -0400, Jason Merrill wrote: On 8/2/22 16:04, Marek Polacek wrote: In my recent patch which enhanced -Wpessimizing-move so that it warns about class prvalues too I said that I'd like to extend it so that it warns in more c

Re: [PATCH] Avoid further recomputations in path_range_query once path is finalized.

2022-08-17 Thread Aldy Hernandez via Gcc-patches
On Tue, Aug 16, 2022 at 4:12 PM Richard Biener wrote: > > On Tue, Aug 16, 2022 at 3:59 PM Aldy Hernandez wrote: > > > > [Richi, I'm trying to make things more obvious for others working for the > > cose base. What do you think?] > > > > This makes a few things explicit to avoid misuse. First, w

Re: [PATCH] Reset root oracle from path_oracle::reset_path.

2022-08-17 Thread Andrew MacLeod via Gcc-patches
works for me. On 8/17/22 12:09, Aldy Hernandez wrote: When we cross a backedge in the path solver, we reset the path relations and nuke the root oracle. However, we forget to reset it for the next path. This is causing us to miss threads because subsequent paths will have no root oracle to use

[PATCH] wwwdocs: Add D language changes and caveats to gcc-12/changes.html

2022-08-17 Thread Iain Buclaw via Gcc-patches
Hi, This patch belatedly adds the new features and changes to the D front-end during the GCC 12 development cycle, as well as a bullet in the caveat section for D's new bootstrapping requirements. If nothing stands out being really wrong, I'll go ahead and commit it by end of week. OK? Regards,

Re: [PATCH] xtensa: Prevent emitting integer additions of constant zero

2022-08-17 Thread Max Filippov via Gcc-patches
On Wed, Aug 17, 2022 at 2:52 AM Takayuki 'January June' Suwa wrote: > As a matter of fact, "in a few cases" is just only one: > > [xtensa_expand_epilogue() in /gcc/config/xtensa/xtensa.cc] > > if (cfun->machine->current_frame_size > 0) > > { > > if (frame_pointer_needed || /* al

Re: [PATCH] bug in emergency cxa pool free()

2022-08-17 Thread Keef Aragon
Thank you! I was working on a modified version that I could LD_PRELOAD to investigate some issues I was having in my asynchronous application code. It used a higher order collection of pool instances instead of malloc/free, with extra context (an array of pc register values) packed into the buffer

Re: [PATCH v2] c++: Extend -Wredundant-move for const-qual objects [PR90428]

2022-08-17 Thread Marek Polacek via Gcc-patches
On Mon, Aug 15, 2022 at 03:43:38PM -0400, Jason Merrill wrote: > On 8/8/22 13:27, Marek Polacek wrote: > > This is to warn about this: > > > > T f5(const T t) > > { > >return std::move(t); // { dg-warning "redundant move" } > > } > > > > where OR fails because there's no T(const T&&) (or it's

[PATCH] xtensa: Optimize stack pointer updates in function pro/epilogue under certain conditions

2022-08-17 Thread Takayuki 'January June' Suwa via Gcc-patches
This patch enforces the use of "addmi" machine instruction instead of addition/subtraction with two source registers for adjusting the stack pointer, if the adjustment fits into a signed 16-bit and is also a multiple of 256. /* example */ void test(void) { char buffer[4096]; __

[pushed] c++: Add new std::move test [PR67906]

2022-08-17 Thread Marek Polacek via Gcc-patches
As discussed in 67906, let's make sure we don't warn about a std::move when initializing when there's a T(const T&&) ctor. Tested x86_64-pc-linux-gnu, applying to trunk. PR c++/67906 gcc/testsuite/ChangeLog: * g++.dg/cpp0x/Wredundant-move11.C: New test. --- .../g++.dg/cpp0x/Wre

Re: [PATCH] libcpp: Implement C++23 P2290R3 - Delimited escape sequences [PR106645]

2022-08-17 Thread Jason Merrill via Gcc-patches
On 8/17/22 00:17, Jakub Jelinek wrote: Hi! The following patch implements the C++23 P2290R3 paper. Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk? 2022-08-17 Jakub Jelinek PR c++/106645 libcpp/ * include/cpplib.h (struct cpp_options): Implement

Re: [PATCH] libcpp: Implement C++23 P2290R3 - Delimited escape sequences [PR106645]

2022-08-17 Thread Jakub Jelinek via Gcc-patches
On Wed, Aug 17, 2022 at 04:47:19PM -0400, Jason Merrill via Gcc-patches wrote: > > + length = 32; > > /* Magic value to indicate no digits seen. */ Indeed, will add the comment. > > + delimited = true; > > + if (loc_reader) > > + char_range->m_finish = loc_reader->get_next ().

[Committed] PR target/106640: Fix use of XINT in TImode compute_convert_gain.

2022-08-17 Thread Roger Sayle
Thanks to Zdenek Sojka for reporting PR target/106640 where an RTL checking build reveals a thinko in my recent patch to support TImode shifts/rotates in STV. My "senior moment" was to inappropriately use XINT where I should be using INTVAL of XEXP. I can't imagine what I was thinking. Correcte

[PATCH v2] stack-protector: Check stack canary before throwing exception

2022-08-17 Thread H.J. Lu via Gcc-patches
Check stack canary before throwing exception to avoid stack corruption. gcc/ PR middle-end/58245 * calls.cc: Include "tree-eh.h". (expand_call): Check stack canary before throwing exception. gcc/testsuite/ PR middle-end/58245 * g++.dg/fstack-protector-str

Re: [PATCH] stack-protector: Check stack canary for noreturn function

2022-08-17 Thread H.J. Lu via Gcc-patches
On Wed, Aug 3, 2022 at 10:27 AM H.J. Lu wrote: > > On Tue, Aug 2, 2022 at 4:34 PM Jeff Law wrote: > > > > > > > > On 8/2/2022 11:43 AM, H.J. Lu wrote: > > > On Sat, Jul 30, 2022 at 1:30 PM Jeff Law via Gcc-patches > > > wrote: > > >> > > >> > > >> On 7/14/2022 3:55 PM, H.J. Lu via Gcc-patches wr

Re: [PATCH] RISC-V/testsuite: Restrict remaining `fmin'/`fmax' tests to hard float

2022-08-17 Thread Maciej W. Rozycki
On Thu, 11 Aug 2022, Kito Cheng wrote: > LGTM, thanks :) I have committed this change now. Thank you for your review. Maciej

Re: [PATCH, GCC, AARCH64, 5/6] Enable BTI : Add new pass for BTI.

2022-08-17 Thread Andrew Pinski via Gcc-patches
On Fri, Nov 2, 2018 at 11:39 AM Sudakshina Das wrote: > > Hi > > This patch is part of a series that enables ARMv8.5-A in GCC and > adds Branch Target Identification Mechanism. > (https://developer.arm.com/products/architecture/cpu-architecture/a-profile/exploration-tools) > > This patch adds a ne

[r13-2098 Regression] FAIL: gcc.dg/tree-prof/cmpsf-1.c scan-tree-dump-not dom2 "Invalid sum" on Linux/x86_64

2022-08-17 Thread haochen.jiang via Gcc-patches
On Linux/x86_64, 5adfb6540db95da5faf1f77fbe9ec38b4cf8eb1f is the first bad commit commit 5adfb6540db95da5faf1f77fbe9ec38b4cf8eb1f Author: Aldy Hernandez Date: Wed Aug 17 17:47:21 2022 +0200 Reset root oracle from path_oracle::reset_path. caused FAIL: gcc.dg/tree-prof/cmpsf-1.c scan-tree-

Re: [PATCH] xtensa: Optimize stack pointer updates in function pro/epilogue under certain conditions

2022-08-17 Thread Max Filippov via Gcc-patches
On Wed, Aug 17, 2022 at 12:32 PM Takayuki 'January June' Suwa wrote: > > This patch enforces the use of "addmi" machine instruction instead of > addition/subtraction with two source registers for adjusting the stack > pointer, if the adjustment fits into a signed 16-bit and is also a multiple > of

Re: [PATCH] Add pattern to convert vector shift + bitwise and + multiply to vector compare in some cases.

2022-08-17 Thread Hans-Peter Nilsson
On Sat, 13 Aug 2022, mtsamis wrote: > When using SWAR (SIMD in a register) techniques a comparison operation within *within > such a register can be made by using a combination of shifts, bitwise and and > multiplication. If code using this scheme is vectorized then there is > potential > to rep

Re: [PATCH] Add pattern to convert vector shift + bitwise and + multiply to vector compare in some cases.

2022-08-17 Thread Andrew Pinski via Gcc-patches
On Sat, Aug 13, 2022 at 2:59 AM mtsamis wrote: > > When using SWAR (SIMD in a register) techniques a comparison operation within > such a register can be made by using a combination of shifts, bitwise and and > multiplication. If code using this scheme is vectorized then there is > potential > to

Re: [commited PATCH] LoongArch: Get __tls_get_addr address through got table when disable plt.

2022-08-17 Thread Lulu Cheng
2022/8/11 下午7:35, Lulu Cheng 写道: thread.c: __attribute__ ((tls_model ("global-dynamic"))) __thread int a; void test (void) { a = 10; } Compile the tests with -fno-plt, error message is as follows: thread.c: In function 'test': thread.c:7:1: error: unrecognizable insn: 7 | } | ^

[PATCH v3] rs6000: Rework ELFv2 support for -fpatchable-function-entry* [PR99888]

2022-08-17 Thread Kewen.Lin via Gcc-patches
Hi, As PR99888 and its related show, the current support for -fpatchable-function-entry on powerpc ELFv2 doesn't work well with global entry existence. For example, with one command line option -fpatchable-function-entry=3,2, it got below w/o this patch: .LPFE1: nop nop

Re: [PATCH] libcpp: Implement C++23 P2290R3 - Delimited escape sequences [PR106645]

2022-08-17 Thread Jason Merrill via Gcc-patches
On 8/17/22 14:19, Jakub Jelinek wrote: On Wed, Aug 17, 2022 at 04:47:19PM -0400, Jason Merrill via Gcc-patches wrote: + length = 32; /* Magic value to indicate no digits seen. */ Indeed, will add the comment. + delimited = true; + if (loc_reader) + char_r

Re: [PATCH v6] LoongArch: add addr_global attribute

2022-08-17 Thread Hans-Peter Nilsson
On Mon, 15 Aug 2022, Xi Ruoyao via Gcc-patches wrote: > Can we make a final solution to this soon? Now the merge window of > Linux 6.0 is closed and we have two Linux kernel releases not possible > to be built with Binutils or GCC with new relocation types. This is > just ugly... > > On Fri, 202

Re: [PATCH v6] LoongArch: add addr_global attribute

2022-08-17 Thread Lulu Cheng
在 2022/8/18 上午10:56, Hans-Peter Nilsson 写道: On Mon, 15 Aug 2022, Xi Ruoyao via Gcc-patches wrote: Can we make a final solution to this soon? Now the merge window of Linux 6.0 is closed and we have two Linux kernel releases not possible to be built with Binutils or GCC with new relocation typ

Re: [PATCH v6] LoongArch: add addr_global attribute

2022-08-17 Thread Xi Ruoyao via Gcc-patches
On Thu, 2022-08-18 at 11:54 +0800, Lulu Cheng wrote: > Sorry, I have already added the code of cmodel=extreme, and I am sorting out > the code and test cases. > I still insist on using __attribute__(model(extreme)) to describe the > variables of precpu. > I will send my patch today. Ok, I can li

Re: [PATCH] PR106342 - IBM zSystems: Provide vsel for all vector modes

2022-08-17 Thread Richard Biener via Gcc-patches
On Wed, 17 Aug 2022, Ilya Leoshkevich wrote: > On Thu, 2022-08-11 at 07:45 +0200, Andreas Krebbel wrote: > > On 8/10/22 13:42, Ilya Leoshkevich wrote: > > > On Wed, 2022-08-03 at 12:20 +0200, Ilya Leoshkevich wrote: > > > > Bootstrapped and regtested on s390x-redhat-linux.  Ok for master? > > > >

[PATCH] Enhance final_value_replacement_loop to handle bitop with an invariant induction.[PR105735]

2022-08-17 Thread Kong, Lingling via Gcc-patches
Hi, This patch is for pr105735/pr101991. It will enable below optimization: { - long unsigned int bit; - - [local count: 32534376]: - - [local count: 1041207449]: - # tmp_10 = PHI - # bit_12 = PHI - tmp_7 = bit2_6(D) & tmp_10; - bit_8 = bit_12 + 1; - if (bit_8 != 32) -goto ; [96.97