Re: [PATCH] AVX512FP16: Support vector shuffle builtins

2021-10-14 Thread Hongtao Liu via Gcc-patches
On Fri, Oct 15, 2021 at 1:37 PM Hongyu Wang wrote: > > > This part seems not related to vector shuffle. > Yes, have separated this part to another patch and checked-in. > > Updated patch. Ok for this one? > > Hongtao Liu via Gcc-patches 于2021年10月14日周四 下午2:33写道: > > > > On Thu, Oct 14, 2021 at

Re: [PATCH] Fix loop split incorrect count and probability

2021-10-14 Thread Xionghu Luo via Gcc-patches
On 2021/9/23 20:17, Richard Biener wrote: > On Wed, 22 Sep 2021, Xionghu Luo wrote: > >> >> >> On 2021/8/11 17:16, Richard Biener wrote: >>> On Wed, 11 Aug 2021, Xionghu Luo wrote: >>> On 2021/8/10 22:47, Richard Biener wrote: > On Mon, 9 Aug 2021, Xionghu Luo wrote: >

Re: [PATCH] AVX512FP16: Support vector shuffle builtins

2021-10-14 Thread Hongyu Wang via Gcc-patches
> This part seems not related to vector shuffle. Yes, have separated this part to another patch and checked-in. Updated patch. Ok for this one? Hongtao Liu via Gcc-patches 于2021年10月14日周四 下午2:33写道: > > On Thu, Oct 14, 2021 at 10:39 AM Hongyu Wang via Gcc-patches > wrote: > > > > Hi, > > > >

Re: [PATCH] AVX512FP16: Fix ICE for 2 v4hf vector concat

2021-10-14 Thread Hongtao Liu via Gcc-patches
On Fri, Oct 15, 2021 at 1:07 PM Hongyu Wang via Gcc-patches wrote: > > Hi, > > For V4HFmode, doing vector concat like > > __builtin_shufflevector (a, b, {0, 1, 2, 3, 4, 5, 6, 7}) > > could trigger ICE since it is not handled in ix86_vector_init (). > > Handle HFmode like HImode to avoid such ICE.

Re: [PATCH] libstdc++: Check [ptr,end) and [ptr,ptr+n) ranges with _GLIBCXX_ASSERTIONS

2021-10-14 Thread François Dumont via Gcc-patches
On 14/10/21 7:43 pm, Jonathan Wakely wrote: On Thu, 14 Oct 2021 at 18:11, François Dumont wrote: Hi On a related subject I am waiting for some feedback on: https://gcc.gnu.org/pipermail/libstdc++/2021-August/053005.html I'm concerned that this adds too much overhead for the

[PATCH] AVX512FP16: Fix ICE for 2 v4hf vector concat

2021-10-14 Thread Hongyu Wang via Gcc-patches
Hi, For V4HFmode, doing vector concat like __builtin_shufflevector (a, b, {0, 1, 2, 3, 4, 5, 6, 7}) could trigger ICE since it is not handled in ix86_vector_init (). Handle HFmode like HImode to avoid such ICE. Bootstrappted/regtested on x86_64-pc-linux-gnu{-m32,} and sde{-m32,} OK for

Re: [PATCH] include/longlong.h: Remove incorrect lvalue to rvalue conversion from asm output constraints

2021-10-14 Thread Fāng-ruì Sòng via Gcc-patches
On 2021-10-12, Jakub Jelinek wrote: On Tue, Oct 12, 2021 at 09:21:21AM -0700, Fāng-ruì Sòng wrote: > > An output constraint takes a lvalue. While GCC happily strips the > > incorrect lvalue to rvalue conversion, Clang rejects the code by default: > > > > error: invalid use of a cast in a

PING^2: [PATCH/RFC 2/2] WPD: Enable whole program devirtualization at LTRANS

2021-10-14 Thread Feng Xue OS via Gcc-patches
Thanks, Feng From: Feng Xue OS Sent: Thursday, September 16, 2021 5:26 PM To: Jan Hubicka; mjam...@suse.cz; Richard Biener; gcc-patches@gcc.gnu.org Cc: JiangNing OS Subject: [PATCH/RFC 2/2] WPD: Enable whole program devirtualization at LTRANS This patch

PING^2: [PATCH/RFC 1/2] WPD: Enable whole program devirtualization

2021-10-14 Thread Feng Xue OS via Gcc-patches
Hi, Honza & Martin, Would you please take some time to review proposal and patches of whole program devirtualization? We have to say, this feature is not 100% safe, but provides us a way to deploy correct WPD on C++ program if we elaborately prepare linked libraries to ensure rtti symbols are

[PATCH] AVX512FP16: Fix testcase for complex intrinsic

2021-10-14 Thread Hongyu Wang via Gcc-patches
Hi, -march=cascadelake which contains -mavx512vl produces unmatched scan for vf[c]maddcsh test, so add -mno-avx512vl to vf[c]maddcsh-1a.c. Also add scan for vblendmps to vf[c]maddcph tests to check correctness. Tested on unix{-m32,} with -march=cascadelake. Pushed to trunk as obvious fix.

[pushed] c++: instantiate less for constant folding

2021-10-14 Thread Jason Merrill via Gcc-patches
I've been experimenting with a change to make all inline functions implicitly constexpr; this revealed that we are instantiating too aggressively for speculative constant evaluation, leading to ordering difficulties with e.g. is_a_helper::test. This patch tries to avoid such instantiation until

Re: [PATCH] Convert strlen pass from evrp to ranger.

2021-10-14 Thread Andrew MacLeod via Gcc-patches
On 10/14/21 6:07 PM, Martin Sebor via Gcc-patches wrote: On 10/9/21 12:47 PM, Aldy Hernandez via Gcc-patches wrote: We seem to be passing a lot of context around in the strlen code.  I certainly don't want to contribute to more. Most of the handle_* functions are passing the gsi as well as

Re: [r12-4413 Regression] FAIL: gcc.dg/pr102738.c (test for excess errors) on Linux/x86_64

2021-10-14 Thread Andrew MacLeod via Gcc-patches
On 10/14/21 8:19 PM, sunil.k.pandey wrote: On Linux/x86_64, f0b7d4cc49ddb1c2c7474cc3f61e260aa93a96c0 is the first bad commit commit f0b7d4cc49ddb1c2c7474cc3f61e260aa93a96c0 Author: Andrew MacLeod Date: Thu Oct 14 10:43:58 2021 -0400 Simplification for right shift. caused FAIL:

Re: [COMMITTED] tree-optimization/102738 - Simplification for right shift.

2021-10-14 Thread Andrew MacLeod via Gcc-patches
On 10/14/21 7:42 PM, H.J. Lu wrote: On Thu, Oct 14, 2021 at 11:06 AM Andrew MacLeod via Gcc-patches wrote: As the PR observes, if the first operand of a right shift is 0 or -1, operand 2 doesn't matter and the result will be the same as op1, so it can be turned into a copy. This patch checks

[r12-4413 Regression] FAIL: gcc.dg/pr102738.c (test for excess errors) on Linux/x86_64

2021-10-14 Thread sunil.k.pandey via Gcc-patches
On Linux/x86_64, f0b7d4cc49ddb1c2c7474cc3f61e260aa93a96c0 is the first bad commit commit f0b7d4cc49ddb1c2c7474cc3f61e260aa93a96c0 Author: Andrew MacLeod Date: Thu Oct 14 10:43:58 2021 -0400 Simplification for right shift. caused FAIL: gcc.dg/pr102738.c (test for excess errors) with GCC

Re: [PATCH] middle-end/102682 - avoid invalid subreg on the LHS

2021-10-14 Thread Jeff Law via Gcc-patches
On 10/11/2021 7:39 AM, Richard Biener wrote: The following avoids generating (insn 6 5 7 2 (set (subreg:OI (concatn/v:TI [ (reg:DI 92 [ buffer ]) (reg:DI 93 [ buffer+8 ]) ]) 0) (subreg:OI (reg/v:V8SI 85 [ __x ]) 0))

Re: PING Re: [Patch][doc][PR101843]clarification on building gcc and binutils together

2021-10-14 Thread Jeff Law via Gcc-patches
On 10/14/2021 9:52 AM, John Henning wrote: Hi Jeff, not sure what you mean by "all", please can you clarify? Anything related to single tree builds needs to be removed. On 9/23/21, 7:08 AM, "Gcc-patches on behalf of John Henning via Gcc-patches" wrote: Hello Jeff, >I

Re: [PATCH] Convert strlen pass from evrp to ranger.

2021-10-14 Thread Jeff Law via Gcc-patches
On 10/14/2021 4:07 PM, Martin Sebor via Gcc-patches wrote: On 10/9/21 12:47 PM, Aldy Hernandez via Gcc-patches wrote: We seem to be passing a lot of context around in the strlen code.  I certainly don't want to contribute to more. Most of the handle_* functions are passing the gsi as well

Re: [COMMITTED] tree-optimization/102738 - Simplification for right shift.

2021-10-14 Thread H.J. Lu via Gcc-patches
On Thu, Oct 14, 2021 at 11:06 AM Andrew MacLeod via Gcc-patches wrote: > > As the PR observes, if the first operand of a right shift is 0 or -1, > operand 2 doesn't matter and the result will be the same as op1, so it > can be turned into a copy. > > This patch checks for that condition and

Re: [RFC][patch][PR102281]Clear padding for variables that are in registers

2021-10-14 Thread Qing Zhao via Gcc-patches
> On Oct 14, 2021, at 12:02 PM, Qing Zhao via Gcc-patches > wrote: > >> >> For !is_gimple_reg vars, yes, something like clear_padding_type_has_padding_p >> could be useful to avoid unnecessary IL growth, but it should be implemented >> more efficiently, Another thought on this: The

Re: [PATCH] Convert strlen pass from evrp to ranger.

2021-10-14 Thread Martin Sebor via Gcc-patches
On 10/9/21 12:47 PM, Aldy Hernandez via Gcc-patches wrote: We seem to be passing a lot of context around in the strlen code. I certainly don't want to contribute to more. Most of the handle_* functions are passing the gsi as well as either ptr_qry or rvals. That looks a bit messy. May I

[PATCH] PR fortran/102685 - ICE in output_constructor_regular_field, at varasm.c:5514

2021-10-14 Thread Harald Anlauf via Gcc-patches
Dear Fortranners, the attached patch adds a check for the shape of arrays in derived type constructors. This brings it in line with other major brands. Example: type t integer :: a(1) end type type(t), parameter :: y(2) = t([1,2]) end This was silently accepted before, but now

[committed] libstdc++: Simplify variant access functions

2021-10-14 Thread Jonathan Wakely via Gcc-patches
libstdc++-v3/ChangeLog: * include/std/variant (__variant::__get(in_place_index_t, U&&)): Rename to __get_n and remove first argument. Replace pair of overloads with a single function using 'if constexpr'. (__variant::__get(Variant&&)): Adjust to use __get_n.

[committed] libstdc++: Make filesystem::path(path&&) always noexcept

2021-10-14 Thread Jonathan Wakely via Gcc-patches
Since r12-4065 std::basic_string is always nothrow-move-constructible, so filesystem::path is too. That also means that path::_S_convert(T) is noexcept when returning its argument, because T is either a basci_string or basic_string_view, and will be moved into the return value.

[committed] c-family: Support DFP printf/scanf formats for C2X

2021-10-14 Thread Joseph Myers
When I enabled various decimal floating-point features for C2X / stopped them being diagnosed with -pedantic for C2X, I missed the format checking support. The DFP printf and scanf formats are included in C2X. Thus, adjust the data for those formats so that they are no longer diagnosed with

[r12-4397 Regression] FAIL: gcc.dg/guality/pr54200.c -Og -DPREVENT_OPTIMIZATION line 20 z == 3 on Linux/x86_64

2021-10-14 Thread sunil.k.pandey via Gcc-patches
On Linux/x86_64, 4cb52980e5d5fb64a393d385923da1b51ab34606 is the first bad commit commit 4cb52980e5d5fb64a393d385923da1b51ab34606 Author: Martin Liska Date: Tue Oct 12 14:31:50 2021 +0200 Eliminate AUTODETECT_VALUE usage in options. caused FAIL: gcc.dg/guality/pr54200.c -Og

[r12-4387 Regression] FAIL: gcc.target/i386/avx512fp16-vfmaddcsh-1a.c scan-assembler-times vblendvps[ \\t]+[^{\n]*%xmm[0-9]+[^\n\r]*%xmm[0-9]+[^\n\r]*%xmm[0-9]+[^\n\r]*%xmm[0-9]+(?:\n|[ \\t]+#) 2 on L

2021-10-14 Thread sunil.k.pandey via Gcc-patches
On Linux/x86_64, 2f9529fc62bcd7e5796c5c8c11879c9ba2ca133f is the first bad commit commit 2f9529fc62bcd7e5796c5c8c11879c9ba2ca133f Author: Hongyu Wang Date: Thu Sep 23 13:52:16 2021 +0800 AVX512FP16: Adjust builtin for mask complex fma caused FAIL:

Re: PATCH, rs6000] Optimization for vec_xl_sext

2021-10-14 Thread David Edelsohn via Gcc-patches
On Thu, Oct 14, 2021 at 2:17 AM HAO CHEN GUI wrote: > > Hi, > >The patch optimizes the code generation for vec_xl_sext builtin. Now all > the sign extensions are done on VSX registers directly. > >Bootstrapped and tested on powerpc64le-linux with no regressions. Is this > okay for

Re: [RFC][patch][PR102281]Clear padding for variables that are in registers

2021-10-14 Thread Qing Zhao via Gcc-patches
On Oct 14, 2021, at 4:06 AM, Jakub Jelinek wrote: On Tue, Oct 12, 2021 at 10:51:45PM +, Qing Zhao wrote: PR10228 1https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102281 Exposed an issue in the current implementation of the padding initialization of -ftrivial-auto-var-init. Currently, we add

[COMMITTED] tree-optimization/102738 - Simplification for right shift.

2021-10-14 Thread Andrew MacLeod via Gcc-patches
As the PR observes, if the first operand of a right shift is 0 or -1, operand 2 doesn't matter and the result will be the same as op1, so it can be turned into a copy. This patch checks for that condition and performs the operation in EVRP. Bootstrapped on x86_64-pc-linux-gnu with no

Re: [PATCH] libstdc++: Check [ptr, end) and [ptr, ptr+n) ranges with _GLIBCXX_ASSERTIONS

2021-10-14 Thread Jonathan Wakely via Gcc-patches
On Thu, 14 Oct 2021 at 18:11, François Dumont wrote: > > Hi > > On a related subject I am waiting for some feedback on: > > https://gcc.gnu.org/pipermail/libstdc++/2021-August/053005.html I'm concerned that this adds too much overhead for the _GLIBCXX_ASSERTIONS case. It adds function calls

Re: [PATCH] libstdc++: Check [ptr,end) and [ptr,ptr+n) ranges with _GLIBCXX_ASSERTIONS

2021-10-14 Thread François Dumont via Gcc-patches
Hi     On a related subject I am waiting for some feedback on: https://gcc.gnu.org/pipermail/libstdc++/2021-August/053005.html On 11/10/21 6:49 pm, Jonathan Wakely wrote: This enables lightweight checks for the __glibcxx_requires_valid_range and __glibcxx_requires_string_len macros when

Re: [RFC][patch][PR102281]Clear padding for variables that are in registers

2021-10-14 Thread Qing Zhao via Gcc-patches
> On Oct 14, 2021, at 4:06 AM, Jakub Jelinek wrote: > > On Tue, Oct 12, 2021 at 10:51:45PM +, Qing Zhao wrote: >> PR10228 1https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102281 >> Exposed an issue in the current implementation of the padding initialization >> of -ftrivial-auto-var-init. >>

Re: PATCH, rs6000] Optimization for vec_xl_sext

2021-10-14 Thread Bill Schmidt via Gcc-patches
Hi Haochen, The patch looks okay to me now.  Will defer to David for final call. :-) Thanks! Bill On 10/14/21 1:17 AM, HAO CHEN GUI wrote: > Hi, > >   The patch optimizes the code generation for vec_xl_sext builtin. Now all > the sign extensions are done on VSX registers directly. > >  

Re: [PATCH] Allow different vector types for stmt groups

2021-10-14 Thread Martin Jambor
Hi, On Thu, Oct 14 2021, Richard Biener wrote: > On Wed, 13 Oct 2021, Martin Jambor wrote: > >> Hi, >> >> On Mon, Sep 27 2021, Richard Biener via Gcc-patches wrote: >> > >> [...] >> > >> > The following is what I have pushed after re-bootstrapping and testing >> > on x86_64-unknown-linux-gnu. >>

[COMMIT] openmp: Mark declare variant directive as supported in Fortran

2021-10-14 Thread Kwok Cheung Yeung
Hello As declare variant is now supported in the Fortran FE, I have removed the 'Only C and C++' for the declare variant entry in the list of OpenMP 5.0 features supported. Committed as obvious. Thanks KwokFrom 2c4666fb0686a8f5a55821f1527351dc71c018b4 Mon Sep 17 00:00:00 2001 From: Kwok

Re: [PATCH] Allow `make tags` to work from top-level directory

2021-10-14 Thread Jeff Law via Gcc-patches
On 10/12/2021 1:56 PM, Eric Gallager wrote: On Tue, Oct 12, 2021 at 9:18 AM Jeff Law wrote: On 10/11/2021 4:05 PM, Eric Gallager via Gcc-patches wrote: On Thu, Oct 13, 2016 at 4:43 PM Eric Gallager wrote: On 10/13/16, Jeff Law wrote: On 10/06/2016 07:21 AM, Eric Gallager wrote: The

Re: [PATCH] libiberty: d-demangle: Add test case for function literals

2021-10-14 Thread Jeff Law via Gcc-patches
On 10/13/2021 12:43 PM, Luís Ferreira wrote: Coverage tests doesn't include a case for function literals Signed-off-by: Luís Ferreira libiberty/ChangeLog: * testsuite/d-demangle-expected: add test case for function literals THanks.  Installed. jeff

Re: [PATCH] libiberty: d-demangle: add test cases for simple special mangles

2021-10-14 Thread Jeff Law via Gcc-patches
On 10/13/2021 1:02 PM, Luís Ferreira wrote: Simple mangled names (only with identifiers) are not being covered by coverage tests. Signed-off-by: Luís Ferreira libiberty/ChangeLog: * testsuite/d-demangle-expected: add test cases for simple special mangles THanks.  Pushed to the

Re: [PATCH] Add ability to use full resolving path solver in the backward threader.

2021-10-14 Thread Jeff Law via Gcc-patches
On 10/14/2021 9:13 AM, Aldy Hernandez wrote: The path solver runs in two modes: a quick mode which assumes any unknown SSA names are VARYING, and a fully resolving mode using the ranger. The backward threader currently uses the quick mode, because the fully resolving mode was not available

Re: [PATCH] Allow different vector types for stmt groups

2021-10-14 Thread Michael Matz via Gcc-patches
Hello, On Thu, 14 Oct 2021, Richard Biener via Gcc-patches wrote: > > I have bisected an AMD zen2 10% performance regression of SPEC 2006 FP > > 433.milc bechmark when compiled with -Ofast -march=native -flto to this > > commit. See also: > > > > > >

PING Re: [Patch][doc][PR101843]clarification on building gcc and binutils together

2021-10-14 Thread John Henning via Gcc-patches
Hi Jeff, not sure what you mean by "all", please can you clarify? On 9/23/21, 7:08 AM, "Gcc-patches on behalf of John Henning via Gcc-patches" wrote: Hello Jeff, >I would strongly recommend removing all the documentation related to >single tree builds. Two

[PATCH] Add ability to use full resolving path solver in the backward threader.

2021-10-14 Thread Aldy Hernandez via Gcc-patches
The path solver runs in two modes: a quick mode which assumes any unknown SSA names are VARYING, and a fully resolving mode using the ranger. The backward threader currently uses the quick mode, because the fully resolving mode was not available initially. Since we now have the ability in the

Re: [PATCH] rs6000: Remove unnecessary option manipulation.

2021-10-14 Thread Bill Schmidt via Gcc-patches
Hi Martin, On 10/14/21 2:49 AM, Martin Liška wrote: > Hello. > > There's follow up flag handling simplification based on > 4ab51fa0e1705201420d87b601bd92bc643b3d52. > > Patch can bootstrap on ppc64le-linux-gnu and survives regression tests. > > Ready to be installed? > Thanks, > Martin > >

[committed] Fix mips testsuite fallout from vectorizer changes

2021-10-14 Thread Jeff Law via Gcc-patches
The mips ports have been failing msa-insert-split.c since the change to enabled the vectorizer at -O2. This test expects to see insve, instructions to move data around. Those come as a result of the gimple optimizers using BIT_FIELD_REF expressions. With vectorization we just emit a vector

Re: [PATCH] aix: ensure reference to __tls_get_addr is in text section.

2021-10-14 Thread David Edelsohn via Gcc-patches
On Thu, Oct 14, 2021 at 10:10 AM CHIGOT, CLEMENT wrote: > > Hi David, > > The fact that csect .data is referencing csect .text doesn't mean that > if .text is kept, .data is kept too. It means the opposite. if .data is kept > then .text must be kept. Yes, we are in agreement about the purpose of

Re: [PATCH 1/7] ifcvt: Check if cmovs are needed.

2021-10-14 Thread Richard Sandiford via Gcc-patches
Robin Dapp writes: > Hi Richard, > >> (2) Insert: >> >> if (SUBREG_P (src)) >>src = SUBREG_REG (src); >> >> here. >> >> OK with those changes if that works. Let me know if they don't — >> I'll try to be quicker with the next review. > > thank you, this looks good in a first

Re: [PATCH] Cleanup --params for backward threader.

2021-10-14 Thread Jeff Law via Gcc-patches
On 10/14/2021 8:25 AM, Aldy Hernandez wrote: The new backward threader makes some of the --param knobs used to control it questionable at best or no longer applicable at worst. The fsm-maximum-phi-arguments param is unused and can be removed. The max-fsm-thread-length param is block based

Re: [PATCH] Fix handling of flag_rename_registers.

2021-10-14 Thread Jeff Law via Gcc-patches
On 10/13/2021 4:02 AM, Martin Liška wrote: works and that it is not somehow dependent on ordering?  Otherwise we have to use EnabledBy(funroll-loops,funroll-all-loops) on frename-registers. I guess the EnabledBy doesn't work if the target decides to set flag_unroll_loop in one of its

[PATCH] Cleanup --params for backward threader.

2021-10-14 Thread Aldy Hernandez via Gcc-patches
The new backward threader makes some of the --param knobs used to control it questionable at best or no longer applicable at worst. The fsm-maximum-phi-arguments param is unused and can be removed. The max-fsm-thread-length param is block based which is a bit redundant, since we already restrict

[PATCH] Minor cleanups to backward threader.

2021-10-14 Thread Aldy Hernandez via Gcc-patches
I will commit this as obvious pending tests on x86-64 Linux. gcc/ChangeLog: * tree-ssa-threadbackward.c (class back_threader): Make m_imports an auto_bitmap. (back_threader::~back_threader): Do not release m_path. --- gcc/tree-ssa-threadbackward.c | 5 + 1 file

Re: [RFC] More jump threading restrictions in the presence of loops.

2021-10-14 Thread Jeff Law via Gcc-patches
On 10/14/2021 3:25 AM, Aldy Hernandez wrote: PING. Note, that there are no PRs and nothing really dependent on this patch. This has just been suggested as the right thing to do wrt loops. This patch fixes 6 XFAILs in our testsuite and has the added side-effect of fixing the aarch64

Re: [RFC] Replace VRP with EVRP passes

2021-10-14 Thread Jeff Law via Gcc-patches
On 10/13/2021 2:58 PM, Andrew MacLeod wrote: As work has progressed, we're pretty close to being able to functionally replace VRP with another EVRP pass.  At least it seems close enough that we should discuss if thats something we might want to consider for this release.   Replacing just

Re: [PATCH 1/7] ifcvt: Check if cmovs are needed.

2021-10-14 Thread Robin Dapp via Gcc-patches
Hi Richard, (2) Insert: if (SUBREG_P (src)) src = SUBREG_REG (src); here. OK with those changes if that works. Let me know if they don't — I'll try to be quicker with the next review. thank you, this looks good in a first testsuite run on s390. If you have time, would you

[committed] libstdc++: Fix brainwrong in path::_S_convert(T) [PR102743]

2021-10-14 Thread Jonathan Wakely via Gcc-patches
On 13/10/21 20:41 +0100, Jonathan Wakely wrote: Adjust the __detail::__effective_range overloads so they always return a string or string view using std::char_traits, because we don't care about the traits of an incoming string. Use std::contiguous_iterator in the __effective_range(const

[committed] libstdc++: Use more descriptive feature test macro

2021-10-14 Thread Jonathan Wakely via Gcc-patches
The out-of-class definitions of the static constants are redundant if the __cpp_inline_variables feature is supported, so use that macro to decide whether to define them or not. libstdc++-v3/ChangeLog: * include/bits/regex.h: Check __cpp_inline_variables instead of __cplusplus.

Re: [PATCH] aix: ensure reference to __tls_get_addr is in text section.

2021-10-14 Thread CHIGOT, CLEMENT via Gcc-patches
Hi David, The fact that csect .data is referencing csect .text doesn't mean that if .text is kept, .data is kept too. It means the opposite. if .data is kept then .text must be kept. That's actually what is being done by the linker with the TLS support test in configure. $ cat test.c __thread

Re: [PATCH] rs6000: Fix memory leak in rs6000_density_test

2021-10-14 Thread David Edelsohn via Gcc-patches
On Thu, Oct 14, 2021 at 9:00 AM Richard Sandiford wrote: > > rs6000_density_test has an early exit test between a call > to get_loop_body and the corresponding free. This would > lead to a memory leak if the early exit is taken. > > Tested on powerpc64le-linux-gnu. It's obvious that moving the

RE: [PATCH] arm: Remove add_stmt_cost hook

2021-10-14 Thread Kyrylo Tkachov via Gcc-patches
> -Original Message- > From: Richard Sandiford > Sent: Thursday, October 14, 2021 11:57 AM > To: gcc-patches@gcc.gnu.org > Cc: ni...@redhat.com; Richard Earnshaw ; > Ramana Radhakrishnan ; Kyrylo > Tkachov > Subject: [PATCH] arm: Remove add_stmt_cost hook > > The arm implementation

Re: [PATCH 2/3][vect] Consider outside costs earlier for epilogue loops

2021-10-14 Thread Andre Vieira (lists) via Gcc-patches
Hi, I completely forgot I still had this patch out as well, I grouped it together with the unrolling because it was what motivated the change, but it is actually wider applicable and can be reviewed separately. On 17/09/2021 16:32, Andre Vieira (lists) via Gcc-patches wrote: Hi, This patch

[committed] Fix predcom-3.c on arc-elf after vectorizer changes

2021-10-14 Thread Jeff Law via Gcc-patches
The change to turn on the vectorizer by default has caused predcom-3 to fail on arc-elf. The test seems to want to verify that the loop was unrolled 3 times as part of the predcom pass.  Not surprisingly, vectorization changes the number of iterations and thus impacts unrolling decisions.

[COMMITTED] Add FIXME note to backward threader.

2021-10-14 Thread Aldy Hernandez via Gcc-patches
There's a limitation in the path discovery bits in the backward threader that I ran into recently and I'd like to document it so we don't lose track of it. Basically we stop looking if we find a threadable path through a PHI, without taking into account that there could be multiple paths through

Re: [PATCH] aix: ensure reference to __tls_get_addr is in text section.

2021-10-14 Thread David Edelsohn via Gcc-patches
The reference to __tls_get_addr is in the data section. And the code just above creates a symbol in the text section referenced from the data section to ensure the text section is retained. So this change doesn't make sense. You're essentially saying that the data section is not used, which

Re: [PATCH][RFC] Introduce TREE_AOREFWRAP to cache ao_ref in the IL

2021-10-14 Thread Michael Matz via Gcc-patches
Hello, On Thu, 14 Oct 2021, Richard Biener wrote: > > So, at _this_ write-through of the email I think I like the above idea > > best: make ao_ref be a tree (at least its storage, because it currently > > is a one-member-function class), make ao_ref.volatile_p be > > tree_base.volatile_flag

Re: [RFC] Replace VRP with EVRP passes

2021-10-14 Thread Andrew MacLeod via Gcc-patches
On 10/14/21 8:54 AM, Richard Biener wrote: On Thu, Oct 14, 2021 at 2:46 PM Andrew MacLeod wrote: I always test ada, objc.. anything that can be built as part of my normal build :-) so yes. As far as I am aware, we are not missing any symbolic/relational cases, that has all been functioning

Re: [PATCH][RFC] Introduce TREE_AOREFWRAP to cache ao_ref in the IL

2021-10-14 Thread Richard Biener via Gcc-patches
On Wed, 13 Oct 2021, Michael Matz wrote: > Hello, > > [this is the fourth attempt to write a comment/review/opinion for this > ao_ref-in-tcc_reference, please accept some possible incoherence] > > On Tue, 12 Oct 2021, Richard Biener via Gcc-patches wrote: > > > This prototype hack introduces

Re: [PATCH] Add forgotten documentation of param ipa-cp-recursive-freq-factor

2021-10-14 Thread Martin Liška
On 10/14/21 15:03, Martin Jambor wrote: |OK for trunk?| Please push it as obvious. Martin

[RFC] vect: Convert cost hooks to classes

2021-10-14 Thread Richard Sandiford via Gcc-patches
The current vector cost interface has a quite a bit of redundancy built in. Each target that defines its own hooks has to replicate the basic unsigned[3] management. Currently each target also duplicates the cost adjustment for inner loops. This patch instead defines a vector_costs class for

[PATCH] Add forgotten documentation of param ipa-cp-recursive-freq-factor

2021-10-14 Thread Martin Jambor
Hi, Martin Liška has noticed that I forgot to document the recently added parameter in the invoke.texi documentation. This patch fixes it. Tested by running make info and make pdf and examining the output. OK for trunk? Thanks, Martin gcc/ChangeLog: 2021-10-14 Martin Jambor *

[PATCH] rs6000: Fix memory leak in rs6000_density_test

2021-10-14 Thread Richard Sandiford via Gcc-patches
rs6000_density_test has an early exit test between a call to get_loop_body and the corresponding free. This would lead to a memory leak if the early exit is taken. Tested on powerpc64le-linux-gnu. It's obvious that moving the test avoids the leak, but there are multiple ways to write it, so: OK

[PATCH] tree-optimization/102659 - really avoid undef overflow in if-conversion

2021-10-14 Thread Richard Biener via Gcc-patches
This plugs the remaining hole of POINTER_PLUS_EXPR with undefined overflow. Unfortunately we have to go through some lengths to not put invariant conversions into the loop body since that confuses the vectorizers gather/scatter discovery which relies on identifying an invariant component of plus

Re: [RFC] Replace VRP with EVRP passes

2021-10-14 Thread Richard Biener via Gcc-patches
On Thu, Oct 14, 2021 at 2:46 PM Andrew MacLeod wrote: > > On 10/14/21 4:27 AM, Richard Biener wrote: > > On Wed, Oct 13, 2021 at 10:58 PM Andrew MacLeod wrote: > >> As work has progressed, we're pretty close to being able to functionally > >> replace VRP with another EVRP pass. At least it

Re: [PATCH] Replace VRP threader with a hybrid forward threader.

2021-10-14 Thread Richard Biener via Gcc-patches
On Thu, Oct 14, 2021 at 2:29 PM Aldy Hernandez wrote: > > On Mon, Sep 27, 2021 at 7:29 PM Richard Biener > wrote: > > > > On September 27, 2021 6:07:40 PM GMT+02:00, Aldy Hernandez via Gcc-patches > > wrote: > > > > > > > > >On 9/27/21 5:27 PM, Aldy Hernandez wrote: > > >> > > >> > > >> On

Re: [PATCH] openmp, fortran: Add support for declare variant in Fortran

2021-10-14 Thread Jakub Jelinek via Gcc-patches
On Thu, Oct 14, 2021 at 11:04:59AM +0100, Kwok Cheung Yeung wrote: > I have now dropped this. This affects test2 in > gfortran.dg/gomp/declare-variant-8.f90, which I have added a comment to. Thanks. > I have added Fortran-specific tests as > gfortran.dg/gomp/declare-variant-15.f90 to

Re: [RFC] Replace VRP with EVRP passes

2021-10-14 Thread Andrew MacLeod via Gcc-patches
On 10/14/21 4:27 AM, Richard Biener wrote: On Wed, Oct 13, 2021 at 10:58 PM Andrew MacLeod wrote: As work has progressed, we're pretty close to being able to functionally replace VRP with another EVRP pass. At least it seems close enough that we should discuss if thats something we might want

Re: [PATCH] aarch64: Fix pointer parameter type in LD1 Neon intrinsics

2021-10-14 Thread Richard Sandiford via Gcc-patches
Jonathan Wright via Gcc-patches writes: > The pointer parameter to load a vector of signed values should itself > be a signed type. This patch fixes two instances of this unsigned- > signed implicit conversion in arm_neon.h. > > Tested relevant intrinsics with -Wpointer-sign and warnings no

[PATCH] aarch64: Fix pointer parameter type in LD1 Neon intrinsics

2021-10-14 Thread Jonathan Wright via Gcc-patches
The pointer parameter to load a vector of signed values should itself be a signed type. This patch fixes two instances of this unsigned- signed implicit conversion in arm_neon.h. Tested relevant intrinsics with -Wpointer-sign and warnings no longer present. Ok for master? Thanks, Jonathan ---

Re: [PATCH] Replace VRP threader with a hybrid forward threader.

2021-10-14 Thread Aldy Hernandez via Gcc-patches
On Mon, Sep 27, 2021 at 7:29 PM Richard Biener wrote: > > On September 27, 2021 6:07:40 PM GMT+02:00, Aldy Hernandez via Gcc-patches > wrote: > > > > > >On 9/27/21 5:27 PM, Aldy Hernandez wrote: > >> > >> > >> On 9/27/21 5:01 PM, Jeff Law wrote: > >>> > >>> > >>> On 9/24/2021 9:46 AM, Aldy

[pushed] Darwin: Update quotes in driver warning messages.

2021-10-14 Thread Iain Sandoe via Gcc-patches
This adds some missing quotes around options and option argument terms in warning messages. Avoid contractions in warning messages. tested on x86_64 darwin, pushed to master, thanks Iain Signed-off-by: Iain Sandoe gcc/ChangeLog: * config/darwin-driver.c

[COMMITTED] Do not call range_on_path_entry for SSAs defined within the path

2021-10-14 Thread Aldy Hernandez via Gcc-patches
In the path solver, when requesting the range of an SSA for which we know nothing, we ask the ranger for the range incoming to the path. We do this by asking for all the incoming ranges to the path entry block and unioning them. The problem here is that we're asking for a range on path entry for

Re: [PATCH] options: Fix variable tracking option processing.

2021-10-14 Thread Richard Biener via Gcc-patches
On Thu, Oct 14, 2021 at 1:10 PM Martin Liška wrote: > > On 10/13/21 15:29, Richard Biener wrote: > > On Wed, Oct 13, 2021 at 3:12 PM Martin Liška wrote: > >> > >> On 10/13/21 14:50, Richard Biener wrote: > >>> It does, yes. But that's a ^ with flag_var_tracking_assignments_toggle;) > >>> > >>>

Re: [PATCH, OpenMP 5.1, Fortran] Strictly-structured block support for OpenMP directives

2021-10-14 Thread Jakub Jelinek via Gcc-patches
On Thu, Oct 14, 2021 at 12:20:51PM +0200, Jakub Jelinek via Gcc-patches wrote: > Thinking more about the Fortran case for !$omp sections, there is an > ambiguity. > !$omp sections > block > !$omp section > end block > is clear and !$omp end sections is optional, but > !$omp sections > block >

Re: [PATCH] options: Fix variable tracking option processing.

2021-10-14 Thread Martin Liška
On 10/13/21 15:29, Richard Biener wrote: On Wed, Oct 13, 2021 at 3:12 PM Martin Liška wrote: On 10/13/21 14:50, Richard Biener wrote: It does, yes. But that's a ^ with flag_var_tracking_assignments_toggle;) It's also one of the more weird flags, so it could be applied after the otherwise

Re: [PATCH] c++: fix cases of core1001/1322 by not dropping cv-qualifier of function parameter of type of typename or decltype[PR101402, PR102033, PR102034, PR102039, PR102

2021-10-14 Thread Nick Huang via Gcc-patches
hi Jason, IMHO, I think your patch probably finally solved this long-standing Core 1001 issue. Of course it is not up to me to say so. I just want to point out that it even solves the following case, even though it is more or less expected if concept and lambda all work expectedly. template

[committed] aarch64: Remove redundant flag_vect_cost_model test

2021-10-14 Thread Richard Sandiford via Gcc-patches
The aarch64 version of add_stmt_cost has a redundant test of flag_vect_cost_model. The current structure was based on the contemporaneous definition of default_add_stmt_cost, but g:d6d1127249564146429009e0682f25bd58d7a791 later removed the flag_vect_cost_model test from the default version.

[PATCH] arm: Remove add_stmt_cost hook

2021-10-14 Thread Richard Sandiford via Gcc-patches
The arm implementation of add_stmt_cost was added alongside arm_builtin_vectorization_cost. At that time it was necessary to override the latter when overriding the former, since default_add_stmt_cost didn't indirect through the builtin_vectorization_cost target hook: int stmt_cost =

Re: [PATCH] Adjust testcase for O2 vectorization.

2021-10-14 Thread Kewen.Lin via Gcc-patches
Hi Hongtao, on 2021/10/14 下午3:11, liuhongt wrote: > Hi Kewen: > Cound you help to verify if this patch fix those regressions > for rs6000 port. > The ppc64le run just finished, there are still some regresssions: NA->XPASS: c-c++-common/Wstringop-overflow-2.c -Wc++-compat (test for

Re: [PATCH, OpenMP 5.1, Fortran] Strictly-structured block support for OpenMP directives

2021-10-14 Thread Jakub Jelinek via Gcc-patches
On Thu, Oct 07, 2021 at 07:09:07PM +0200, Jakub Jelinek wrote: > The workshare/parallel workshare case is unclear, I've filed > https://github.com/OpenMP/spec/issues/3153 > for it. Either don't allow block if workshare_stmts_only for now > until that is clarified, or if we do, we need to make

[ping^2] Make sure that we get unique test names if several DejaGnu directives refer to the same line [PR102735]

2021-10-14 Thread Thomas Schwinge
Hi! Ping, again. Commit log updated for "privatization-1-compute.c results in both XFAIL and PASS". Grüße Thomas On 2021-09-30T08:42:25+0200, I wrote: > Hi! > > Ping. > > On 2021-09-22T13:03:46+0200, I wrote: >> On 2021-09-19T11:35:00-0600, Jeff Law via

Ping: [PATCH] Add a simulate_record_decl lang hook

2021-10-14 Thread Richard Sandiford via Gcc-patches
Ping Richard Sandiford via Gcc-patches writes: > This patch adds a lang hook for defining a struct/RECORD_TYPE > “as if” it had appeared directly in the source code. It follows > the similar existing hook for enums. > > It's the caller's responsibility to create the fields > (as FIELD_DECLs)

Re: [RFC] More jump threading restrictions in the presence of loops.

2021-10-14 Thread Aldy Hernandez via Gcc-patches
PING. Note, that there are no PRs and nothing really dependent on this patch. This has just been suggested as the right thing to do wrt loops. This patch fixes 6 XFAILs in our testsuite and has the added side-effect of fixing the aarch64 bootstrap problem (though the problem in the uninit code

Re: [PATCH 4/5]AArch64 sve: optimize add reduction patterns

2021-10-14 Thread Richard Sandiford via Gcc-patches
Tamar Christina writes: > Hi All, > > The following loop does a conditional reduction using an add: > > #include > > int32_t f (int32_t *restrict array, int len, int min) > { > int32_t iSum = 0; > > for (int i=0; i if (array[i] >= min) >iSum += array[i]; > } > return iSum; >

Re: [RFC] Port git gcc-descr to Python

2021-10-14 Thread Jakub Jelinek via Gcc-patches
On Thu, Oct 14, 2021 at 11:06:55AM +0200, Tobias Burnus wrote: > Additionally, I observe the following (independent of the conversion): > For 7433458d871f6bfe2169b9d7d04fec64bb142924, I get: >r0-80854-g7433458d871f6b > The question is whether we are happy that only reversions since >

Re: [PATCH 3/5]AArch64 sve: do not keep negated mask and inverse mask live at the same time

2021-10-14 Thread Richard Sandiford via Gcc-patches
Sorry for the slow reply. Tamar Christina writes: > Hi All, > > The following example: > > void f11(double * restrict z, double * restrict w, double * restrict x, >double * restrict y, int n) > { > for (int i = 0; i < n; i++) { > z[i] = (w[i] > 0) ? w[i] : y[i]; > } > } >

Re: [RFC] Port git gcc-descr to Python

2021-10-14 Thread Tobias Burnus
Hi Martin, On 12.10.21 10:59, Martin Liška wrote: There's a complete patch that implements both git gcc-descr and gcc-undesrc and sets corresponding git aliases to use them. When invoking ./contrib/git-describe.py directly, I get the error: fatal: Not a valid object name /master I think you

Re: [RFC][patch][PR102281]Clear padding for variables that are in registers

2021-10-14 Thread Jakub Jelinek via Gcc-patches
On Tue, Oct 12, 2021 at 10:51:45PM +, Qing Zhao wrote: > PR10228 1https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102281 > Exposed an issue in the current implementation of the padding initialization > of -ftrivial-auto-var-init. > > Currently, we add __builtin_clear_padding call _AFTER_ every

Re: [PATCH] combine: Check for paradoxical subreg

2021-10-14 Thread Richard Sandiford via Gcc-patches
Sorry for the slow review. Robin Dapp via Gcc-patches writes: > Hi, > > while evaluating another patch that introduces more lvalue paradoxical > subregs I ran into an ICE in combine at > > wide_int o = wi::insert (rtx_mode_t (outer, temp_mode), >

Re: [PATCH 1/7] ifcvt: Check if cmovs are needed.

2021-10-14 Thread Richard Sandiford via Gcc-patches
Hi Robin, Thanks for the update and sorry for the late response. Robin Dapp writes: > Hi Richard, > >> Don't we still need this code (without the REG_DEAD handling) for the >> case in which… >> >>> + /* As we are transforming >>> +if (x > y) >>> + { >>> +a = b; >>> +

Re: [PATCH, rs6000] punish reload of lfiwzx when loading an int variable [PR102169, PR102146]

2021-10-14 Thread HAO CHEN GUI via Gcc-patches
On 14/10/2021 上午 8:12, Segher Boessenkool wrote: On Wed, Sep 29, 2021 at 04:32:19PM +0800, HAO CHEN GUI wrote:   The patch punishes reload of alternative pair of "d, Z" for movsi_internal1. The reload occurs if 'Z' doesn't match and generates an additional insn. So the memory reload should

Re: [RFC] Replace VRP with EVRP passes

2021-10-14 Thread Richard Biener via Gcc-patches
On Wed, Oct 13, 2021 at 10:58 PM Andrew MacLeod wrote: > > As work has progressed, we're pretty close to being able to functionally > replace VRP with another EVRP pass. At least it seems close enough that > we should discuss if thats something we might want to consider for this > release.

  1   2   >