[PATCH v3] Modify gas uleb128 support test

2023-09-19 Thread mengqinggang
Some assemblers (GNU as for LoongArch) generates relocations for leb128 symbol arithmetic for relaxation, we need to disable relaxation probing leb128 support then. gcc/ChangeLog: * configure: Regenerate. * configure.ac: Checking assembler for -mno-relax support. Disable relaxation wh

C++ patch ping

2023-09-19 Thread Jakub Jelinek via Gcc-patches
Hi! I'd like to ping a couple of C++ patches. All of them together with the 2 updated patches posted yesterday have been bootstrapped/regtested on x86_64-linux and i686-linux again yesterday. - c++: Implement C++26 P2361R6 - Unevaluated strings [PR110342] https://gcc.gnu.org/pipermail/gcc-patc

Patch ping: [PATCH] testsuite work-around compound-assignment-1.c C++ failures on various targets [PR111377]

2023-09-19 Thread Jakub Jelinek via Gcc-patches
Hi! On Tue, Sep 12, 2023 at 09:02:55AM +0200, Jakub Jelinek via Gcc-patches wrote: > On Mon, Sep 11, 2023 at 11:11:30PM +0200, Jakub Jelinek via Gcc-patches wrote: > > On Mon, Sep 11, 2023 at 07:27:57PM +0200, Benjamin Priour via Gcc-patches > > wrote: > > > Thanks for the report, > > > > > > Af

[PATCH] v2: small _BitInt tweaks

2023-09-19 Thread Jakub Jelinek via Gcc-patches
Hi! On Tue, Sep 12, 2023 at 05:27:30PM +, Joseph Myers wrote: > On Tue, 12 Sep 2023, Jakub Jelinek via Gcc-patches wrote: > > > And by ensuring we never create 1-bit signed BITINT_TYPE e.g. the backends > > don't need to worry about them. > > > > But I admit I don't feel strongly about that.

PING^5: [PATCH] rtl-optimization/110939 Really fix narrow comparison of memory and constant

2023-09-19 Thread Xi Ruoyao via Gcc-patches
Ping^5. > > > On Thu, Aug 10, 2023 at 03:04:03PM +0200, Stefan Schulze Frielinghaus > > > wrote: > > > > In the former fix in commit 41ef5a34161356817807be3a2e51fbdbe575ae85 I > > > > completely missed the fact that the normal form of a generated constant > > > > for a > > > > mode with fewer bi

[committed] libgomp: Handle NULL environ like pointer to NULL pointer [PR111413]

2023-09-19 Thread Jakub Jelinek via Gcc-patches
Hi! clearenv function just sets environ to NULL (after sometimes freeing it), rather than setting it to a pointer to NULL, and our code was assuming it is always non-NULL. Fixed thusly, the change seems to be large but actually is just + if (environ) for (env = environ; *env != 0; env++) pl

Re: [PATCH] v2: small _BitInt tweaks

2023-09-19 Thread Richard Biener via Gcc-patches
On Tue, 19 Sep 2023, Jakub Jelinek wrote: > Hi! > > On Tue, Sep 12, 2023 at 05:27:30PM +, Joseph Myers wrote: > > On Tue, 12 Sep 2023, Jakub Jelinek via Gcc-patches wrote: > > > > > And by ensuring we never create 1-bit signed BITINT_TYPE e.g. the backends > > > don't need to worry about the

[PATCH] match.pd: Some build_nonstandard_integer_type tweaks

2023-09-19 Thread Jakub Jelinek via Gcc-patches
Hi! As discussed earlier, using build_nonstandard_integer_type blindly for all INTEGRAL_TYPE_Ps is problematic now that we have BITINT_TYPE, because it always creates an INTEGRAL_TYPE with some possibly very large precision. The following patch attempts to deal with 3 such spots in match.pd, other

Re: Re: [PATCH v1] RISC-V: Fix one ICE for vect test vect-multitypes-5

2023-09-19 Thread juzhe.zh...@rivai.ai
Thanks for reporting it. Could you try this and verify for me? - rtx src_op_0 = XEXP (src, 0); - - if (GET_CODE (src) == CONST && GET_CODE (src_op_0) == PLUS -&& CONST_POLY_INT_P (XEXP (src_op_0, 1))) + if (GET_CODE (src) == CONST && GET_CODE (XEXP (src, 0)) == PLUS +&& CONST_POLY_INT_

[Committed] RISC-V: Support integer FMA/FNMA VLS modes autovectorization

2023-09-19 Thread Juzhe-Zhong
Simpily extend the current VLA iterator and patterns. Regression passed with no difference. gcc/ChangeLog: * config/riscv/autovec.md: Add VLS modes. * config/riscv/vector.md: Ditto. gcc/testsuite/ChangeLog: * gcc.target/riscv/rvv/autovec/vls/def.h: Add VLS FMA/FNMA test

Re: gcc-patches From rewriting mailman settings (Was: [Linaro-TCWG-CI] gcc patch #75674: FAIL: 68 regressions)

2023-09-19 Thread Mark Wielaard
Hi all, On Sun, Sep 17, 2023 at 10:04:37PM +0200, Mark Wielaard wrote: > > We (Jeff or anyone else with mailman admin privs) could use the same > > settings for gcc-patches. The settings that need to be set are in that > > bug: > > > > - subject_prefix (general): (empty) > > - from_is_list (gener

Re: [PATCH] match.pd: Some build_nonstandard_integer_type tweaks

2023-09-19 Thread Richard Biener
On Tue, 19 Sep 2023, Jakub Jelinek wrote: > Hi! > > As discussed earlier, using build_nonstandard_integer_type blindly for all > INTEGRAL_TYPE_Ps is problematic now that we have BITINT_TYPE, because it > always creates an INTEGRAL_TYPE with some possibly very large precision. > The following patc

[RFC 1/2] RISC-V: Add support for _Bfloat16.

2023-09-19 Thread Jin Ma
gcc/ChangeLog: * config/riscv/iterators.md (HFBF): New. * config/riscv/riscv-builtins.cc (riscv_init_builtin_types): Initialize data type_Bfloat16. * config/riscv/riscv-modes.def (FLOAT_MODE): New. (ADJUST_FLOAT_FORMAT): New. * config/riscv/riscv.cc

[RFC 2/2] RISC-V: Add 'Zfbfmin' extension.

2023-09-19 Thread Jin Ma
This patch adds the 'Zfbfmin' extension for riscv, which is based on spec of bfloat16: https://github.com/riscv/riscv-bfloat16/commit/5578e34e15a44e9ad13246072a29f51274b4d999 The 'Zfbfmin' extension of binutils-gdb (REVIEW ONLY): https://sourceware.org/pipermail/binutils/2023-August/128773.html

[PING] More '#ifdef ASM_OUTPUT_DEF' -> 'if (TARGET_SUPPORTS_ALIASES)' etc. (was: [PATCH][v2] Introduce TARGET_SUPPORTS_ALIASES)

2023-09-19 Thread Thomas Schwinge
Hi! Ping. Grüße Thomas On 2023-09-08T14:02:50+0200, I wrote: > Hi! > > On 2017-08-10T15:42:13+0200, Jan Hubicka wrote: >>> On 07/31/2017 11:57 AM, Yuri Gribov wrote: >>> > On Mon, Jul 31, 2017 at 9:04 AM, Martin Liška wrote: >>> >> Doing the transformation suggested by Honza. > > ... which

Re: [PATCH] AArch64: Improve immediate expansion [PR105928]

2023-09-19 Thread Richard Sandiford
Wilco Dijkstra writes: > Hi Richard, > >> I was worried that reusing "dest" for intermediate results would >> prevent CSE for cases like: >> >> void g (long long, long long); >> void >> f (long long *ptr) >> { >> g (0xee11ee22ee11ee22LL, 0xdc23dc44ee11ee22LL); >> } > > Note that aarch64_internal

[PATCH v7 4/4] ree: Improve ree pass for rs6000 target using defined ABI interfaces

2023-09-19 Thread Ajit Agarwal
This new version of patch 7 use improve ree pass for rs6000 target using defined ABI interfaces. Bootstrapped and regtested on power64-linux-gnu. Review comments incorporated. Thanks & Regards Ajit ree: Improve ree pass for rs6000 target using defined abi interfaces For rs6000 target we see re

Re: PATCH v6 4/4] ree: Improve ree pass for rs6000 target using defined ABI interfaces.

2023-09-19 Thread Ajit Agarwal
Hello Maxim: Version 7 of the patch solves this problem. Sorry for the inconvenience caused. Thanks & Regards Ajit On 18/09/23 2:36 pm, Maxim Kuvyrkov wrote: > Hi Ajit, > > Is this patch supposed to be applied on top of another patch? As is, this > patch fails build on AArch64 and AArch32, an

Re: [PATCH v7 4/4] ree: Improve ree pass for rs6000 target using defined ABI interfaces

2023-09-19 Thread Xi Ruoyao
On Tue, 2023-09-19 at 14:29 +0530, Ajit Agarwal wrote: > This new version of patch 7 use improve ree pass for rs6000 target > using defined ABI interfaces. > Bootstrapped and regtested on power64-linux-gnu. You should drop the "4/4" in subject if it does not depends on other non-committed patches.

Re: PATCH v6 4/4] ree: Improve ree pass for rs6000 target using defined ABI interfaces.

2023-09-19 Thread Ajit Agarwal
Hello Vineet: Version 7 of the patch incorporates the below review comments. Please review. Thanks & Regards Ajit On 19/09/23 1:57 am, Vineet Gupta wrote: > Hi Ajit, > > On 9/17/23 22:59, Ajit Agarwal wrote: >> This new version of patch 6 use improve ree pass for rs6000 target using >> defined

Re: [PATCH v7 4/4] ree: Improve ree pass for rs6000 target using defined ABI interfaces

2023-09-19 Thread Ajit Agarwal
On 19/09/23 2:36 pm, Xi Ruoyao wrote: > On Tue, 2023-09-19 at 14:29 +0530, Ajit Agarwal wrote: >> This new version of patch 7 use improve ree pass for rs6000 target >> using defined ABI interfaces. >> Bootstrapped and regtested on power64-linux-gnu. > > You should drop the "4/4" in subject if i

[PATCH v2 3/4] Improve functionality of ree pass with various constants with AND operation.

2023-09-19 Thread Ajit Agarwal
Hello Jeff: This patch eliminates redundant zero and sign extension with ree pass for rs6000 target. Bootstrapped and regtested for powerpc64-linux-gnu. Thanks & Regards Ajit ree: Improve ree pass For rs6000 target we see redundant zero and sign extension and ree pass s improved to eliminat

[Committed] RISC-V: Support VLS floating-point FMA/FNMA/FMS auto-vectorization

2023-09-19 Thread Juzhe-Zhong
Support VLS floating-point FMA/FNMA/FMS patterns. Regression no difference after this patch, Committed. gcc/ChangeLog: * config/riscv/autovec.md: Extend VLS floating-point modes. * config/riscv/vector.md: Ditto. gcc/testsuite/ChangeLog: * gcc.target/riscv/rvv/autovec/vl

[PATCH] c/111468 - add unordered compare and pointer diff to GIMPLE FE parsing

2023-09-19 Thread Richard Biener
The following adds __UN{LT,LE,GT,GE,EQ}, __UNORDERED and __ORDERED operator parsing support and support for parsing - as POINTER_DIFF_EXPR. Bootstrapped and tested on x86_64-unknown-linux-gnu, will push later. PR c/111468 gcc/c/ * gimple-parser.cc (c_parser_gimple_binary_expressio

[PATCH] tree-optimization/111465 - bougs jump threading with no-copy src block

2023-09-19 Thread Richard Biener
The following avoids to forward thread a path with a EDGE_NO_COPY_SRC_BLOCK block that became non-empty due to folding. Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed to unbreak bootstrap on powerpc. PR tree-optimization/111465 * tree-ssa-threadupdate.cc (fwd_jt_path_

[Committed] RISC-V: Support VLS unary floating-point patterns

2023-09-19 Thread Juzhe-Zhong
Extend current VLA patterns with VLS modes. Regression all passed. gcc/ChangeLog: * config/riscv/autovec.md: Extend VLS modes. * config/riscv/vector.md: Ditto. gcc/testsuite/ChangeLog: * gcc.target/riscv/rvv/autovec/vls/def.h: Add unary test. * gcc.target/riscv/

[COMMITTED] ada: Crash processing type invariants on child subprogram

2023-09-19 Thread Marc Poulhiès
From: Javier Miranda gcc/ada/ * contracts.adb (Has_Public_Visibility_Of_Subprogram): Add missing support for child subprograms. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/contracts.adb | 25 - 1 file changed, 24 insertions(+

[COMMITTED] ada: Refine upper array bound for bit packed array

2023-09-19 Thread Marc Poulhiès
When using bit-packed arrays, the compiler creates new array subtypes of 1-bit component indexed by integers. The existing routine checks the index subtype to find the min/max values. Bit-packed arrays being indexed by integers, the routines gives up as returning the maximum possible integer carrie

Re: [PATCH] ipa: Self-DCE of uses of removed call LHSs (PR 108007)

2023-09-19 Thread Martin Jambor
Hello, and ping. Thanks, Martin On Fri, Sep 01 2023, Martin Jambor wrote: > Hello > > and ping. > > Thanks, > > Martin > > > On Fri, May 12 2023, Martin Jambor wrote: >> Hi, >> >> PR 108007 is another manifestation where we rely on DCE to clean-up >> after IPA-SRA and if the user explicitely s

[COMMITTED] ada: Private extensions with the keyword "synchronized" are always limited.

2023-09-19 Thread Marc Poulhiès
From: Richard Wai GNAT was relying on synchronized private type extensions deriving from a concurrent interface to determine its limitedness. This does not cover the case where such an extension derives a limited interface. RM-7.6(6/2) makes is clear that "synchronized" in a private extension imp

Re: [PATCH V2] RISC-V: Fix RVV can change mode class bug

2023-09-19 Thread Robin Dapp
Hi Juzhe, I'd agree that punting is reasonable for now, therefore LGTM. Regards Robin

Re: [PATCH V2] RISC-V: Fix RVV can change mode class bug

2023-09-19 Thread Lehua Ding
Committed, thanks Robin. On 2023/9/19 20:04, Robin Dapp wrote: Hi Juzhe, I'd agree that punting is reasonable for now, therefore LGTM. Regards Robin -- Best, Lehua

[COMMITTED] ada: TSS finalize address subprogram generation for constrained...

2023-09-19 Thread Marc Poulhiès
From: Richard Wai ...subtypes of unconstrained synchronized private extensions should take care to designate the corresponding record of the underlying concurrent type. When generating TSS finalize address subprograms for class-wide types of constrained root types, it follows the parent chain lo

[PATCH] RISC-V: Add FNMS floating-point VLS tests

2023-09-19 Thread Juzhe-Zhong
Add tests and committed. gcc/testsuite/ChangeLog: * gcc.target/riscv/rvv/autovec/vls/def.h: Add FNMS VLS modes tests. * gcc.target/riscv/rvv/autovec/vls/fnms-1.c: New test. * gcc.target/riscv/rvv/autovec/vls/fnms-2.c: New test. * gcc.target/riscv/rvv/autovec/vls/fn

[PATCH]middle-end: relax validate_subreg to allow paradoxical subregs that change mode

2023-09-19 Thread Tamar Christina
Hi All, This patch relaxes the subreg invariant that you can only change modes or make it paradoxical in one conversion. i.e. it now allows subreg:V2DI (reg:DF ..)) This is well defined in the generic sense and allowing it would enable you to write RTL without the extra moves which can be interf

[PATCH] c/111468 - dump unordered compare operators in their GIMPLE form with -gimple

2023-09-19 Thread Richard Biener
The following adjusts -gimple dumping to dump the unordered compare ops and *h in their GIMPLE form. It also adds parsing for __LTGT which I missed before. Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed. PR c/111468 gcc/c/ * gimple-parser.cc (c_parser_gimple_binary_e

[PATCH] target/30484 - testcase for exploration

2023-09-19 Thread Richard Biener
The following adds a testcase for the unfixed PR, skipped on the known affected target. The intent is to discover targets that suffer from the same issue or whose sdiv do not wrap as expected with -fwrapv. Tested on x86_64-unknown-linux-gnu. OK? Jeff, do you want to put this on your tester firs

Re: [PATCH 1/2] using overflow_free_p to simplify pattern

2023-09-19 Thread Richard Biener
On Tue, 19 Sep 2023, Jiufu Guo wrote: > Hi, > > In r14-3582, an "overflow_free_p" interface is added. > The pattern of "(t * 2) / 2" in match.pd can be simplified > by using this interface. > > Bootstrap & regtest pass on ppc64{,le} and x86_64. > Is this ok for trunk? > > BR, > Jeff (Jiufu) >

Re: [PATCH 2/2] testcase: rename pr111303.c to pr111324.c

2023-09-19 Thread Richard Biener
On Tue, 19 Sep 2023, Jiufu Guo wrote: > Hi, > > When commit the fix for pr111324, the test cases was named as pr111303.c > by mistake. Here, rename it to pr111324.c > > Is this ok for trunk? OK. > BR, > Jeff (Jiufu Guo) > > gcc/testsuite/ChangeLog: > > * gcc.dg/tree-ssa/pr111303.c: Re

Re: [PATCH] [RFC] New early __builtin_unreachable processing.

2023-09-19 Thread Richard Biener
On Mon, Sep 18, 2023 at 3:48 PM Andrew MacLeod wrote: > > > On 9/18/23 02:53, Richard Biener wrote: > > On Fri, Sep 15, 2023 at 4:45 PM Andrew MacLeod wrote: > >> Ive been looking at __builtin_unreachable () regressions. The > >> fundamental problem seems to be a lack of consistent expectation

Re: [PATCH] debug/111409 - don't generate COMDAT macro sections for split DWARF

2023-09-19 Thread Richard Biener
On Thu, Sep 14, 2023 at 8:42 AM Omar Sandoval wrote: > > Split DWARF files aren't processed by the linker, so DW_MACRO_import > offsets aren't relocated and the .debug_macro.dwo sections aren't > deduplicated and merged. There's no clear way for this to work for > split DWARF, so disable it. OK.

Re: [PATCH] AArch64: Improve immediate expansion [PR105928]

2023-09-19 Thread Wilco Dijkstra
Hi Richard, >> Note that aarch64_internal_mov_immediate may be called after reload, >> so it would end up even more complex. > > The sequence I quoted was supposed to work before and after reload.  The: > >    rtx tmp = aarch64_target_reg (dest, DImode); > > would create a fresh tempor

Re: [PATCH v7] c++: Move consteval folding to cp_fold_r

2023-09-19 Thread Marek Polacek
On Mon, Sep 18, 2023 at 09:36:31PM -0400, Jason Merrill wrote: > On 9/18/23 17:42, Marek Polacek wrote: > > + /* The purpose of this is not to emit errors for mce_unknown. */ > > + const tsubst_flags_t complain = (data->flags == ff_fold_immediate > > + ? tf_none : tf

Re: [PATCH v7] c++: Move consteval folding to cp_fold_r

2023-09-19 Thread Jason Merrill
On 9/19/23 09:01, Marek Polacek wrote: On Mon, Sep 18, 2023 at 09:36:31PM -0400, Jason Merrill wrote: On 9/18/23 17:42, Marek Polacek wrote: + /* The purpose of this is not to emit errors for mce_unknown. */ + const tsubst_flags_t complain = (data->flags == ff_fold_immediate +

Re: [PATCH] [RFC] New early __builtin_unreachable processing.

2023-09-19 Thread Andrew MacLeod
On 9/19/23 08:56, Richard Biener wrote: On Mon, Sep 18, 2023 at 3:48 PM Andrew MacLeod wrote: OK. I dont see anything in the early VRP processing now that would allow a later pass to remove the unreachable unless it does its own analysis like DOM might do. Isn't it as simple as if (i_2

Re: [PATCH] RISC-V: Support combine cond extend and reduce sum to cond widen reduce sum

2023-09-19 Thread Robin Dapp
Hi Lehua, >> Would it hurt to allow any nonmemory operand here and just force the >> "unsupported" constants into a register? > > Are you talking about why operand 2 doesn't use nonmemory_operand > predicate? If so, I think this is because our vmerge.v[vxi]m insns > only supports that operand 1 i

[PATCH]middle-end ifcvt: replace C++ sort with vec::qsort [PR109154]

2023-09-19 Thread Tamar Christina
Hi All, As requested later on, this replaces the C++ sort with vec::qsort. Bootstrapped Regtested on aarch64-none-linux-gnu and no issues. Ok for master? Thanks, Tamar gcc/ChangeLog: PR tree-optimization/109154 * tree-if-conv.cc (INCLUDE_ALGORITHM): Remove. (cmp_arg_en

Re: RFC: Introduce -fhardened to enable security-related flags

2023-09-19 Thread Qing Zhao
> On Sep 17, 2023, at 12:36 PM, Hans-Peter Nilsson via Gcc-patches > wrote: > >> From: Sam James >> Date: Sun, 17 Sep 2023 05:00:37 +0100 > >> Hans-Peter Nilsson via Gcc-patches writes: >> Date: Tue, 29 Aug 2023 15:42:27 -0400 From: Marek Polacek via Gcc-patches >>> Surel

Re: [PATCH]middle-end ifcvt: replace C++ sort with vec::qsort [PR109154]

2023-09-19 Thread Richard Biener
On Tue, 19 Sep 2023, Tamar Christina wrote: > Hi All, > > As requested later on, this replaces the C++ sort with vec::qsort. > > Bootstrapped Regtested on aarch64-none-linux-gnu and no issues. > > Ok for master? OK. > Thanks, > Tamar > > gcc/ChangeLog: > > PR tree-optimization/109154

Re: Patch ping: [PATCH] testsuite work-around compound-assignment-1.c C++ failures on various targets [PR111377]

2023-09-19 Thread David Malcolm
On Tue, 2023-09-19 at 09:20 +0200, Jakub Jelinek wrote: > Hi! > > On Tue, Sep 12, 2023 at 09:02:55AM +0200, Jakub Jelinek via Gcc- > patches wrote: > > On Mon, Sep 11, 2023 at 11:11:30PM +0200, Jakub Jelinek via Gcc- > > patches wrote: > > > On Mon, Sep 11, 2023 at 07:27:57PM +0200, Benjamin Priou

Re: [PATCH] gcc: Introduce -fhardened

2023-09-19 Thread Marek Polacek
On Mon, Sep 18, 2023 at 08:57:39AM +0200, Richard Biener wrote: > On Fri, Sep 15, 2023 at 5:09 PM Marek Polacek via Gcc-patches > wrote: > > > > Bootstrapped/regtested on x86_64-pc-linux-gnu, > > powerpc64le-unknown-linux-gnu, > > and aarch64-unknown-linux-gnu; ok for trunk? > > > > -- >8 -- > >

Re: RISC-V sign extension query

2023-09-19 Thread Jeff Law
On 9/18/23 21:37, Vineet Gupta wrote: On 9/18/23 19:41, Jeff Law wrote: On 9/18/23 13:45, Vineet Gupta wrote: For the cases which do require sign extends, but not being eliminated due to "missing definition(s)" I'm working on adapting Ajit's REE ABI interfaces work [2] to work for RISC-V

[PATCH] c++: further optimize tsubst_template_decl

2023-09-19 Thread Patrick Palka
Bootstrapped and regtested on x86_64-pc-linux-gnu, does this look OK for trunk? -- >8 -- This patch makes tsubst_template_decl use use_spec_table=false also in the non-class non-function template case, to avoid computing 'argvec' and doing a hash table lookup from tsubst_decl (when partially inst

[PATCH 0/2] RISC-V: Support CORE-V XCVMAC and XCVALU extensions

2023-09-19 Thread Mary Bennett
This patch series presents the comprehensive implementation of the MAC and ALU extension for CORE-V. Tested with riscv-gnu-toolchain on binutils, ld, gas and gcc testsuites to ensure its correctness and compatibility with the existing codebase. However, your input, reviews, and suggestions are inv

[PATCH 1/2] RISC-V: Add support for XCVmac extension in CV32E40P

2023-09-19 Thread Mary Bennett
Spec: github.com/openhwgroup/core-v-sw/blob/master/specifications/corev-builtin-spec.md Contributors: Mary Bennett Nandni Jamnadas Pietra Ferreira Charlie Keaney Jessica Mills Craig Blackmore Simon Cook Jeremy Bennett Helene Chelin gcc

[PATCH 2/2] RISC-V: Add support for XCValu extension in CV32E40P

2023-09-19 Thread Mary Bennett
Spec: github.com/openhwgroup/core-v-sw/blob/master/specifications/corev-builtin-spec.md Contributors: Mary Bennett Nandni Jamnadas Pietra Ferreira Charlie Keaney Jessica Mills Craig Blackmore Simon Cook Jeremy Bennett Helene Chelin gcc

Re: [PATCH] gcc: Introduce -fhardened

2023-09-19 Thread Jakub Jelinek
On Tue, Sep 19, 2023 at 10:58:19AM -0400, Marek Polacek wrote: > > > In > > > I proposed -fhardened, a new umbrella option that enables a reasonable set > > > of hardening flags. The read of the room seems to be that the option >

[pushed] c++: inherited default constructor [CWG2799]

2023-09-19 Thread Jason Merrill
Tested x86_64-pc-linux-gnu, applying to trunk. -- 8< -- In this testcase, it seems clear that B should be trivially default-constructible, since the inherited default constructor is trivial and there are no other subobjects to initialize. But we were saying no because we don't define triviality

Re: [PATCH] RISC-V: Support combine cond extend and reduce sum to cond widen reduce sum

2023-09-19 Thread Lehua Ding
Hi Robin, Would it hurt to allow any nonmemory operand here and just force the "unsupported" constants into a register? Are you talking about why operand 2 doesn't use nonmemory_operand predicate? If so, I think this is because our vmerge.v[vxi]m insns only supports that operand 1 is a scalar

Re: PING^5: [PATCH] rtl-optimization/110939 Really fix narrow comparison of memory and constant

2023-09-19 Thread Stefan Schulze Frielinghaus
Since this patch is sitting in the queue for quite some time and (more importantly?) solves a bootstrap problem let me reiterate: While writing the initial commit 7cdd0860949c6c3232e6cff1d7ca37bb5234074c and the subsequent (potential) fix 41ef5a34161356817807be3a2e51fbdbe575ae85 I was not aware of

[COMMITTED] [frange] Add op2_range for operator_not_equal.

2023-09-19 Thread Aldy Hernandez
We're missing an op2_range entry for operator_not_equal so GORI can calculate an outgoing edge. The false side of != is true and guarantees we don't have a NAN, so it's important to get this right. We eventually get it through an intersection of various ranges in ranger, but it's best to get thing

gcc-patches@gcc.gnu.org

2023-09-19 Thread Aldy Hernandez
We can set_nan() with a nan_state so it's good form to have the analogous form for update_nan(). gcc/ChangeLog: * value-range.h (frange::update_nan): New. --- gcc/value-range.h | 28 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/gcc/value-ra

[COMMITTED] [frange] Remove redundant known_isnan() checks.

2023-09-19 Thread Aldy Hernandez
The known_isnan() method is a subset of maybe_isnan(). This patch removes redundant calls to known_isnan(). gcc/ChangeLog: * range-op-float.cc (operator_lt::op1_range): Remove known_isnan check. (operator_lt::op2_range): Same. (operator_le::op1_range): Same. (oper

Re: [PATCH v3][RFC] c-family: Implement __has_feature and __has_extension [PR60512]

2023-09-19 Thread Jason Merrill
On 8/3/23 05:21, Alex Coplan wrote: Hi, This patch implements clang's __has_feature and __has_extension in GCC. This is a v3 which addresses feedback for the v2 patch posted here: https://gcc.gnu.org/pipermail/gcc-patches/2023-August/626058.html Main changes since v2: - As per Jason's feedba

[PATCH] c++: improve class NTTP object pretty printing [PR111471]

2023-09-19 Thread Patrick Palka
Tested on x86_64-pc-linux-gnu, does this look OK for trunk/13? -- >8 -- 1. Move class NTTP object pretty printing to a more general spot in the pretty printer. 2. Print the type of an class NTTP object alongside its CONSTRUCTOR value, like dump_expr would have done. 3. Don't pretty print co

Re: [PATCH] match.pd: Some build_nonstandard_integer_type tweaks

2023-09-19 Thread Richard Sandiford
Jakub Jelinek via Gcc-patches writes: > Hi! > > As discussed earlier, using build_nonstandard_integer_type blindly for all > INTEGRAL_TYPE_Ps is problematic now that we have BITINT_TYPE, because it > always creates an INTEGRAL_TYPE with some possibly very large precision. > The following patch att

Re: [PATCH v14 16/40] c, c++: Use 16 bits for all use of enum rid for more keyword space

2023-09-19 Thread Jason Merrill
On 9/15/23 19:51, Ken Matsui via Gcc-patches wrote: Now that RID_MAX has reached 255, we need to update the bit sizes of every use of the enum rid from 8 to 16 to support more keywords. Sorry to bring this up so late, but this does raise the question of whether we actually want to use keyword

Re: [PATCH] c++: improve class NTTP object pretty printing [PR111471]

2023-09-19 Thread Jason Merrill
On 9/19/23 12:40, Patrick Palka wrote: Tested on x86_64-pc-linux-gnu, does this look OK for trunk/13? OK for trunk. What's your argument for backporting? -- >8 -- 1. Move class NTTP object pretty printing to a more general spot in the pretty printer. 2. Print the type of an class NTTP o

Re: [PATCH] libcpp: Fix ICE on #include after a line marker directive [PR61474]

2023-09-19 Thread Richard Sandiford
Lewis Hyatt via Gcc-patches writes: > Hello- > > This fixes an old PR, bootstrap + regtest on x86-64 Linux. Please let me know > if it's ok? Thanks! > > -Lewis > > -- >8 -- > > As noted in the PR, GCC will segfault if a file name is first seen in a > linemarker directive, and then later seen in a

Re: [PATCH] libcpp: Fix ICE on #include after a line marker directive [PR61474]

2023-09-19 Thread Marek Polacek
On Tue, Sep 19, 2023 at 06:08:50PM +0100, Richard Sandiford wrote: > Lewis Hyatt via Gcc-patches writes: > > Hello- > > > > This fixes an old PR, bootstrap + regtest on x86-64 Linux. Please let me > > know if it's ok? Thanks! > > > > -Lewis > > > > -- >8 -- > > > > As noted in the PR, GCC will se

Re: [PATCH] RISC-V: Finish Typing Un-Typed Instructions and Turn on Assert

2023-09-19 Thread Jeff Law
On 9/18/23 01:29, Lehua Ding wrote: Hi Jeff, Thank you for your comments, I'm not fully convinced yet but I will follow the current rules. I won't dwell on this for now. Sounds reasonable. Of all the things we need to do, this isn't that big :-) jeff

[committed] Fix bogus operand predicate on iq2000

2023-09-19 Thread Jeff Law
The iq2000-elf port regressed these tests recently: iq2000-sim: gcc.c-torture/execute/20040703-1.c -O2 (test for excess errors) iq2000-sim: gcc.c-torture/execute/20040703-1.c -O2 -flto -fno-use-linker-plugin -flto-partition=none (test for excess errors) iq2000-sim: gcc.c-torture/execute/2

Re: [PATCH] c++: improve class NTTP object pretty printing [PR111471]

2023-09-19 Thread Patrick Palka
On Tue, 19 Sep 2023, Jason Merrill wrote: > On 9/19/23 12:40, Patrick Palka wrote: > > Tested on x86_64-pc-linux-gnu, does this look OK for trunk/13? > > OK for trunk. What's your argument for backporting? Thanks. I don't feel strongly about it, but I was thinking that since we typically backp

Re: [PATCH v2 2/2] c++: convert_to_void and volatile references

2023-09-19 Thread Patrick Palka
On Mon, 18 Sep 2023, Jason Merrill wrote: > On 9/18/23 12:12, Patrick Palka wrote: > > Jason pointed out that even implicit loads of volatile references need > > to undergo lvalue-to-rvalue conversion, but we currently emit a warning > > in this case and discard the load. This patch changes this

[PATCH] RISC-V: Fix --enable-checking=rtl ICE on rv32gc bootstrap

2023-09-19 Thread Patrick O'Neill
Resolves PR 111461. during RTL pass: expand offtime.c: In function '__offtime': offtime.c:79:6: internal compiler error: RTL check: expected elt 0 type 'e' or 'u', have 'w' (rtx const_int) in riscv_legitimize_const_move, at config/riscv/riscv.cc:2176 79 | ip = __mon_yday[__isleap(y)]; Tes

[PATCH] Fixes for profile count/probability maintenance

2023-09-19 Thread Eugene Rozenfeld
Verifier checks have recently been strengthened to check that all counts and probabilities are initialized. The checks fired during autoprofiledbootstrap build and this patch fixes it. gcc/ChangeLog: * auto-profile.cc (afdo_calculate_branch_prob): Fix count comparisons * ipa-utils

[PATCH] Remove .PHONY targets when building .fda files during autoprofiledbootstrap

2023-09-19 Thread Eugene Rozenfeld
These .PHONY targets are always executed and were breaking `make install` for autoprofiledbootstrap build. gcc/ChangeLog: * c/Make-lang.in: Make create_fdas_for_cc1 target not .PHONY * cp/Make-lang.in: Make create_fdas_for_cc1plus target not .PHONY * lto/Make-lang.in: Make

[pushed] c++: fix cxx_print_type's template-info dumping

2023-09-19 Thread Patrick Palka
Tested on x86_64-pc-linux-gnu, pushed to trunk as obvious. -- >8 -- Unlike DECL_TEMPLATE_INFO which is stored in DECL_LANG_SPECIFIC, TYPE_TEMPLATE_INFO isn't stored in TYPE_LANG_SPECIFIC, so we don't need to check for both in cxx_print_type. This fixes dumping the template-info of ENUMERAL_TYPE

Re: [PATCH] c++: further optimize tsubst_template_decl

2023-09-19 Thread Jason Merrill
On 9/19/23 11:04, Patrick Palka wrote: Bootstrapped and regtested on x86_64-pc-linux-gnu, does this look OK for trunk? -- >8 -- This patch makes tsubst_template_decl use use_spec_table=false also in the non-class non-function template case, to avoid computing 'argvec' and doing a hash table loo

Re: [PATCH] [frange] Relax floating point relational folding.

2023-09-19 Thread Aldy Hernandez
Hi Jakub. I wasn't ignoring you, just quietly thinking, making sure we weren't missing anything. In the process I cleaned everything, which hopefully makes it easier to see why we don't need relationals (the key is to look at frelop_early_resolve() and the op1/op2_range entries which clear the NA

Re: [PATCH V4, rs6000] Disable generation of scalar modulo instructions

2023-09-19 Thread Pat Haugen
On 9/13/23 3:48 PM, Segher Boessenkool wrote: - "TARGET_POWER10 && TARGET_POWERPC64" + "TARGET_POWER10 && TARGET_POWERPC64 && !RS6000_DISABLE_SCALAR_MODULO" "vmoduq %0,%1,%2" Did we ever test if this insn in fact is slower as well? I don't mean either way, orthogonality is good, but ju

Re: [PATCH v2 1/2] c++: Initial support for P0847R7 (Deducing This) [PR102609]

2023-09-19 Thread Jason Merrill
On 9/11/23 09:49, waffl3x via Gcc-patches wrote: Bootstrapped and tested on x86_64-linux with no regressions. Hopefully I fixed all the issues. I also took the opportunity to remove the small mistake present in v1, so that is no longer a concern. Thanks again for all the patience. -Alex Th

Re: [PATCH 1/2] c++: Initial support for P0847R7 (Deducing This) [PR102609]

2023-09-19 Thread Jason Merrill
On 8/31/23 04:33, Jakub Jelinek wrote: On Thu, Aug 31, 2023 at 06:02:36AM +, waffl3x via Gcc-patches wrote: +++ b/gcc/testsuite/g++.dg/cpp23/explicit-object-param-valid2.C @@ -0,0 +1,24 @@ +// P0847R7 +// { dg-do run { target c++23 } } This raises an important question whether we as an ex

Re: [PATCH v5] c++: extend cold, hot attributes to classes

2023-09-19 Thread Jason Merrill
On 9/6/23 06:20, Javier Martinez wrote: reminder: ready for commit? Pushed, thanks! - Javier On Wed 23. Aug 2023 at 15:02, Javier Martinez > wrote: On Tue, Aug 22, 2023 at 7:50 PM Jason Merrill mailto:ja...@redhat.com>> wrote: > You stil

Re: [PATCH] debug/111409 - don't generate COMDAT macro sections for split DWARF

2023-09-19 Thread Omar Sandoval
On Tue, Sep 19, 2023 at 02:56:36PM +0200, Richard Biener wrote: > On Thu, Sep 14, 2023 at 8:42 AM Omar Sandoval wrote: > > > > Split DWARF files aren't processed by the linker, so DW_MACRO_import > > offsets aren't relocated and the .debug_macro.dwo sections aren't > > deduplicated and merged. Th

Re: [PATCH] RISC-V: Fix --enable-checking=rtl ICE on rv32gc bootstrap

2023-09-19 Thread 钟居哲
LGTM. You can commit it. Thanks. juzhe.zh...@rivai.ai From: Patrick O'Neill Date: 2023-09-20 02:04 To: gcc-patches CC: juzhe.zhong; patrick; pan2.li; kito.cheng; yanzhang.wang; gnu-toolchain Subject: [PATCH] RISC-V: Fix --enable-checking=rtl ICE on rv32gc bootstrap Resolves PR 111461. during

[PATCH v8 4/4] ree: Improve ree pass for rs6000 target using defined ABI interfaces

2023-09-19 Thread Ajit Agarwal
Hello All: This version 8 of the patch uses abi interfaces to remove zero and sign extension elimination. Bootstrapped and regtested on powerpc-linux-gnu. Incorporated all the review comments of version 6. Added sign extension elimination using abi interfaces. Thanks & Regards Ajit ree: Impr

Re: [PATCH v7 4/4] ree: Improve ree pass for rs6000 target using defined ABI interfaces

2023-09-19 Thread Ajit Agarwal
Hello Vineet: This patch is without sign_extension implementation. I have sent patch 8 that incorporates sign_extension using abi interfaces. Please review. Thanks & Regards Ajit On 19/09/23 2:48 pm, Ajit Agarwal wrote: > > > On 19/09/23 2:36 pm, Xi Ruoyao wrote: >> On Tue, 2023-09-19 at 14:2

[Committed] RISC-V: Fix --enable-checking=rtl ICE on rv32gc bootstrap

2023-09-19 Thread Patrick O'Neill
Committed, thanks! The pre-commit hook didn't like the Authored-by format so I changed it into: 2023-09-19 Juzhe Zhong Patrick From 0b9c51dc2fb58911b91889895d00437673d9f4cf Mon Sep 17 00:00:00 2001 From: Patrick O'Neill Date: Tue, 19 Sep 2023 10:03:35 -0700 Subject: [PATCH] RISC-V: Fix --ena

Re: [PATCH v2] c++: Catch indirect change of active union member in constexpr [PR101631]

2023-09-19 Thread Jason Merrill
On 9/1/23 08:22, Nathaniel Shead wrote: On Wed, Aug 30, 2023 at 04:28:18PM -0400, Jason Merrill wrote: On 8/29/23 09:35, Nathaniel Shead wrote: This is an attempt to improve the constexpr machinery's handling of union lifetime by catching more cases that cause UB. Is this approach OK? I'd also

Re: [PATCH v8 0/4] P1689R5 support

2023-09-19 Thread Jason Merrill
On 9/1/23 09:04, Ben Boeckel wrote: Hi, This patch series adds initial support for ISO C++'s [P1689R5][], a format for describing C++ module requirements and provisions based on the source code. This is required because compiling C++ with modules is not embarrassingly parallel and need to be ord

Re: [PATCH] RISC-V: Refactor and cleanup fma patterns

2023-09-19 Thread Robin Dapp
Hi Patrick, thanks for reporting. Before seeing your message here I already opened a PR https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111488 Regards Robin

Re: [PATCH] RISC-V: Support combine cond extend and reduce sum to cond widen reduce sum

2023-09-19 Thread Robin Dapp
Hi Lehua, thanks for the explanation. > My current method is still to keep the operand 2 of vcond_mask as a > register, but the pattern of mov_vec_const_0 is simplified, so that > the corresponding combine pattern can be more simple. That's the only > reason I split the vcond_mask into three patt

Re: [PATCH] libcpp: Fix ICE on #include after a line marker directive [PR61474]

2023-09-19 Thread Lewis Hyatt
On Tue, Sep 19, 2023 at 1:13 PM Marek Polacek wrote: > > On Tue, Sep 19, 2023 at 06:08:50PM +0100, Richard Sandiford wrote: > > Lewis Hyatt via Gcc-patches writes: > > > Hello- > > > > > > This fixes an old PR, bootstrap + regtest on x86-64 Linux. Please let me > > > know if it's ok? Thanks! > >

Re: [PATCH v14 16/40] c, c++: Use 16 bits for all use of enum rid for more keyword space

2023-09-19 Thread Ken Matsui
On Tue, Sep 19, 2023 at 9:59 AM Jason Merrill wrote: > > On 9/15/23 19:51, Ken Matsui via Gcc-patches wrote: > > Now that RID_MAX has reached 255, we need to update the bit sizes of every > > use of the enum rid from 8 to 16 to support more keywords. > > Sorry to bring this up so late, but this do

Re: [PATCH v2 2/2] c++: convert_to_void and volatile references

2023-09-19 Thread Jason Merrill
On 9/19/23 13:53, Patrick Palka wrote: On Mon, 18 Sep 2023, Jason Merrill wrote: On 9/18/23 12:12, Patrick Palka wrote: Jason pointed out that even implicit loads of volatile references need to undergo lvalue-to-rvalue conversion, but we currently emit a warning in this case and discard the lo

[PATCH v2 1/2] c++: Initial support for P0847R7 (Deducing This) [PR102609]

2023-09-19 Thread waffl3x
> Thank you, this is great! Thanks! > One legal hurdle to start with: our DCO policy > (https://gcc.gnu.org/dco.html) requires real names in the sign-off, not > pseudonyms. If you would prefer to contribute under this pseudonym, I > encourage you to file a copyright assignment with the FSF, who a

Re: [Committed] RISC-V: Support VLS unary floating-point patterns

2023-09-19 Thread Patrick O'Neill
Hi, This patch highlights an issue Edwin and I have been having with the testsuite where rv64 testcases are run when testing rv32gcv. There's a large number of new failures in the rv32gcv testsuite from this seemingly innocuous patch. https://github.com/ewlu/riscv-gnu-toolchain/issues/166 (The

Re: Re: [Committed] RISC-V: Support VLS unary floating-point patterns

2023-09-19 Thread juzhe.zh...@rivai.ai
I didn't see this issue. They should be the bogus FAILs. We should either fix testcases or ignore them. juzhe.zh...@rivai.ai From: Patrick O'Neill Date: 2023-09-20 08:34 To: Juzhe-Zhong; Robin Dapp; gcc-patches CC: kito.cheng; kito.cheng; jeffreyalaw; Palmer Dabbelt; Edwin Lu; joern.rennecke;

Re: Re: [Committed] RISC-V: Support VLS unary floating-point patterns

2023-09-19 Thread Kito Cheng
It seems because math.h, similar issue as stdint.h, does math.h necessary for the test case? juzhe.zh...@rivai.ai 於 2023年9月20日 週三 08:44 寫道: > I didn't see this issue. > They should be the bogus FAILs. > We should either fix testcases or ignore them. > > -- > juzhe.zh.

  1   2   >