[PATCH] hardcfr: libgcc sym versioning

2023-11-29 Thread Alexandre Oliva
The libgcc-exported runtime component of control flow redundancy hardening was missing symbol versioning information. Add it. Regstrapped on x86_64-linux-gnu. Ok to install? for libgcc/ChangeLog * libgcc-std.ver.in (__hardcfr_check): Add to GCC_14.0.0. --- libgcc/libgcc-std.ver.in

RE: RE: [PATCH v1] RISC-V: Bugfix for legitimize move when get vec mode in zve32f

2023-11-29 Thread Li, Pan2
Take this file riscv-gnu-toolchain/newlib/newlib/libc/stdlib/mprec.c for example, the arguments and/or related local variables list as below riscv_legitimize_move mode = E_DFmode dest = (reg:DF 144 [ ]) src = (subreg:DF (reg:V2SI 170) 0) nunits = 1 smode = {m_mode = E_DFmode} Pan From:

RE: [PATCH v1] RISC-V: Bugfix for legitimize move when get vec mode in zve32f

2023-11-29 Thread Li, Pan2
> Why does get_vector_mode doesn't exist a vector mode ? Because we set the zve32f here, but try to get_vect_mode with E_V1DFmode. According to the ISA, FP64 is not support when zve32F. Pan From: juzhe.zh...@rivai.ai Sent: Thursday, November 30, 2023 3:24 PM To: Li, Pan2 ; gcc-patches Cc: Li,

Re: [PATCH v1] RISC-V: Bugfix for legitimize move when get vec mode in zve32f

2023-11-29 Thread juzhe.zh...@rivai.ai
Why does get_vector_mode doesn't exist a vector mode ? It must exist a vector mode, otherwise, it will cause ICE in other situations. juzhe.zh...@rivai.ai From: pan2.li Date: 2023-11-30 15:21 To: gcc-patches CC: juzhe.zhong; pan2.li; yanzhang.wang; kito.cheng Subject: [PATCH v1] RISC-V: Bugfi

Re: [PATCH #2/4] c++: mark short-enums as packed

2023-11-29 Thread Alexandre Oliva
On Nov 29, 2023, Jason Merrill wrote: > On 11/29/23 04:39, Alexandre Oliva wrote: >> Hello, Jason, >> On Nov 22, 2023, Jason Merrill wrote: >> >>> On 11/22/23 13:12, Jason Merrill wrote: I'm coming to the conclusion that your C++ patch is fine but we should remove the TYPE_PACKED warn

[PATCH v1] RISC-V: Bugfix for legitimize move when get vec mode in zve32f

2023-11-29 Thread pan2 . li
From: Pan Li When require mode after get_vec_mode in riscv_legitimize_move, there will be precondition that the mode is exists. Or we will have E_VOIDMode and of course have ICE when required. Typically we should first check the mode exists or not before require, or more friendly like leverage e

Re: [PATCH] RISC-V: Update crypto vector ISA info with latest spec

2023-11-29 Thread Kito Cheng
LGTM On Thu, Nov 30, 2023 at 2:16 PM Feng Wang wrote: > > This patch add the Zvkb subset of crypto vector extension. The > corresponding test cases have aslo been modified. > > gcc/ChangeLog: > > * common/config/riscv/riscv-common.cc: Add zvkb ISA info. > * config/riscv/riscv.opt:

Re: [PATCH] RISC-V: Support widening register overlap for vf4/vf8

2023-11-29 Thread Kito Cheng
LGTM, thanks :) On Thu, Nov 30, 2023 at 2:49 PM Juzhe-Zhong wrote: > > > size_t > foo (char const *buf, size_t len) > { > size_t sum = 0; > size_t vl = __riscv_vsetvlmax_e8m8 (); > size_t step = vl * 4; > const char *it = buf, *end = buf + len; > for (; it + step <= end;) > { >

[PATCH] RISC-V: Support widening register overlap for vf4/vf8

2023-11-29 Thread Juzhe-Zhong
size_t foo (char const *buf, size_t len) { size_t sum = 0; size_t vl = __riscv_vsetvlmax_e8m8 (); size_t step = vl * 4; const char *it = buf, *end = buf + len; for (; it + step <= end;) { vint8m1_t v0 = __riscv_vle8_v_i8m1 ((void *) it, vl); it += vl; vint8m1_t v1

Re: hurd: Add multilib paths for gnu-x86_64

2023-11-29 Thread rep . dot . nop
On 27 November 2023 15:48:33 CET, Thomas Schwinge wrote: >Hi! > >On 2023-10-28T21:19:59+0200, Samuel Thibault wrote: >> We need the multilib paths in gcc to find e.g. glibc crt files on >> Debian. > >ACK. > >> This is essentially based on t-linux64 version. > >Yes, but isn't the overall setup di

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

2023-11-29 Thread waffl3x
On Wednesday, November 29th, 2023 at 10:00 PM, Jason Merrill wrote: > > > On 11/27/23 00:35, waffl3x wrote: > > > I think this is cleaned up enough to be presentable. Bootstrapped but > > not tested but I don't think I changed anything substantial. I am > > running tests right now and

[PATCH] RISC-V: Update crypto vector ISA info with latest spec

2023-11-29 Thread Feng Wang
This patch add the Zvkb subset of crypto vector extension. The corresponding test cases have aslo been modified. gcc/ChangeLog: * common/config/riscv/riscv-common.cc: Add zvkb ISA info. * config/riscv/riscv.opt: Add Mask(ZVKB) gcc/testsuite/ChangeLog: * gcc.target/riscv/

Re: [PATCH v4] Introduce strub: machine-independent stack scrubbing

2023-11-29 Thread Alexandre Oliva
On Nov 29, 2023, Richard Biener wrote: > On Wed, Nov 29, 2023 at 9:53 AM Alexandre Oliva wrote: >> Because &arg_#(D)[n_#] is good gimple, but &(*byref_arg_#(D))[n_#] isn't. > 'arg_#(D)' looks like a SSA name, and no, taking the address doesn't work, > so I assume it was &MEM[arg_(D)][n_#] whic

[pushed] c++: remove LAMBDA_EXPR_MUTABLE_P

2023-11-29 Thread Jason Merrill
Tested x86_64-pc-linux-gnu, applying to trunk. -- 8< -- In review of the deducing 'this' patch it came up that LAMBDA_EXPR_MUTABLE_P doesn't make sense for a lambda with an explicit object parameter. And it was never necessary, so let's remove it. gcc/cp/ChangeLog: * cp-tree.h (LAMBDA_

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

2023-11-29 Thread Jason Merrill
On 11/27/23 00:35, waffl3x wrote: I think this is cleaned up enough to be presentable. Bootstrapped but not tested but I don't think I changed anything substantial. I am running tests right now and will report if anything fails. I have not fixed the problem in tsubst_lambda_expr that we talked ab

Re: [PATCH] testsuite: scev: expect fail on ilp32

2023-11-29 Thread Alexandre Oliva
On Nov 29, 2023, Hans-Peter Nilsson wrote: >> XPASS: gcc.dg/tree-ssa/scev-3.c scan-tree-dump-times ivopts "&a" 1 >> XPASS: gcc.dg/tree-ssa/scev-4.c scan-tree-dump-times ivopts "&a" 1 >> XPASS: gcc.dg/tree-ssa/scev-5.c scan-tree-dump-times ivopts "&a" 1 > It XPASSes on the ilp32 targets I've trie

Re: [PATCH v4] Introduce strub: machine-independent stack scrubbing

2023-11-29 Thread Alexandre Oliva
On Nov 29, 2023, Richard Biener wrote: >> Because &arg_#(D)[n_#] is good gimple, but &(*byref_arg_#(D))[n_#] isn't. > 'arg_#(D)' looks like a SSA name, and no, taking the address doesn't work, > so I assume it was &MEM[arg_(D)][n_#] which is indeed OK. Yeah. > But you shouldn't need to change

Re: [V2] New pass for sign/zero extension elimination -- not ready for "final" review

2023-11-29 Thread Joern Rennecke
I originally computed mmask in carry_backpropagate from XEXP (x, 0), but abandoned that when I realized we also get called for RTX_OBJ things. I forgot to adjust the SIGN_EXTEND code, though. Fixed in the attached revised patch. Also made sure to not make inputs of LSHIFTRT / ASHIFTRT live if t

[PATCH 9/21]middle-end: implement vectorizable_early_exit for codegen of exit code

2023-11-29 Thread juzhe.zh...@rivai.ai
Hi, Richard and Tamar. I am sorry for bothering you. Hope you don't mind I give some comments: Can we support partial vector for length ? IMHO, we can do that as follows: bool length_loop_p = LOOP_VINFO_FULLY_WITH_LENGTH_P (loop_vinfo); if (LOOP_VINFO_CAN_USE_PARTIAL_VECTORS_P (loop_vinfo))

[PATCH v2] LoongArch: Add intrinsic function descriptions for LSX and LASX instructions to doc.

2023-11-29 Thread Lulu Cheng
From: chenxiaolong gcc/ChangeLog: * doc/extend.texi: Add information about the intrinsic function of the vector instruction. Change-Id: I0117d6f5d68731f1596b6c3016fd82f3d5e2a98d --- gcc/doc/extend.texi | 1662 +++ 1 file changed, 1662 in

[committed (pre-approved)] RISC-V: Fix 'E' extension version to test

2023-11-29 Thread Tsukasa OI
From: Tsukasa OI Commit 006e90e1 ("RISC-V: Initial RV64E and LP64E support") caused a regression (test failure) but this is caused by failing to track GCC changes in that test case (not a true GCC bug). This commit fixes the test case to track the latest GCC with 'E' extension version 2.0 (ratif

Re: [V2] New pass for sign/zero extension elimination -- not ready for "final" review

2023-11-29 Thread Joern Rennecke
On Wed, 29 Nov 2023 at 20:05, Joern Rennecke wrote: > > I suspect it'd be more useful to add handling of LSHIFTRT and ASHIFTRT > > . Some ports do > > a lot of static shifting. > > > +case SS_ASHIFT: > > +case US_ASHIFT: > > + if (!mask || XEXP (x, 1) == const0_rtx) > > + retu

[Committed] RISC-V: Support highpart overlap for floating-point widen instructions

2023-11-29 Thread Juzhe-Zhong
This patch leverages the approach of vwcvt/vext.vf2 which has been approved. Their approaches are totally the same. Tested no regression and committed. PR target/112431 gcc/ChangeLog: * config/riscv/vector.md: Add widenning overlap. gcc/testsuite/ChangeLog: * gcc.targe

Re: [PATCH v1 1/1] RISC-V: Initial RV64E and LP64E support

2023-11-29 Thread Kito Cheng
Pre-approve the fix :) On Thu, Nov 30, 2023 at 6:07 AM Tsukasa OI wrote: > > Hi Patrick, > > Found a cause (although GCC is functionally correct, I forgot to fix > corresponding test case [which assumes that 'E' is not ratified]). > > > #if !defined(__riscv_e) || (__riscv_e != (1 * 1000 * 1000 +

ping: [PATCH] diagnostics: Fix behavior of permerror options after diagnostic pop [PR111918]

2023-11-29 Thread Lewis Hyatt
On Thu, Nov 09, 2023 at 04:16:10PM -0500, Lewis Hyatt wrote: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111918 > > This patch fixes the behavior of `#pragma GCC diagnostic pop' for permissive > error diagnostics such as -Wnarrowing (in C++11). Those currently do not > return to the correct sta

Re: [PATCH v2] aarch64: Add support for Ampere-1B (-mcpu=ampere1b) CPU

2023-11-29 Thread Philipp Tomsich
Applied to master, thanks! Philipp. On Tue, 28 Nov 2023 at 12:57, Richard Sandiford wrote: > > Philipp Tomsich writes: > > On Tue, 28 Nov 2023 at 12:21, Richard Sandiford > > wrote: > >> > >> Philipp Tomsich writes: > >> > This patch adds initial support for Ampere-1B core. > >> > > >> > The A

Re: [PATCH] libatomic: Enable lock-free 128-bit atomics on AArch64 [PR110061]

2023-11-29 Thread Richard Sandiford
Not my specialist subject, but here goes anyway: Wilco Dijkstra writes: > ping > > From: Wilco Dijkstra > Sent: 02 June 2023 18:28 > To: GCC Patches > Cc: Richard Sandiford ; Kyrylo Tkachov > > Subject: [PATCH] libatomic: Enable lock-free 128-bit atomics on AArch64 > [PR110061] > > > Enable l

[PATCH]: gcc/doc/extend.texi: Update builtin example for __builtin_FILE, __builtin_LINE __builtin_FUNCTION

2023-11-29 Thread Jonny Grant
gcc/ChangeLog: doc/extend.texi: Update builtin example for __builtin_FILE __builtin_LINE __builtin_FUNCTION. >From 66290eb477dd1a99310ad9972c45391c2a87c1c7 Mon Sep 17 00:00:00 2001 From: Jonathan Grant Date: Wed, 29 Nov 2023 11:02:06 + Subject: [PATCH] gcc/doc: Update builtin example for

[Committed] RISC-V: Rename vconstraint into group_overlap

2023-11-29 Thread Juzhe-Zhong
Fix for Robin's suggestion. gcc/ChangeLog: * config/riscv/constraints.md (TARGET_VECTOR ? V_REGS : NO_REGS): Fix constraint. * config/riscv/riscv.md (no,W21,W42,W84,W41,W81,W82): Rename vconstraint into group_overlap. (no,yes): Ditto. (none,W21,W42,W84,W43,W86,W8

Re: [PATCH v1 1/1] RISC-V: Initial RV64E and LP64E support

2023-11-29 Thread Tsukasa OI
Hi Patrick, Found a cause (although GCC is functionally correct, I forgot to fix corresponding test case [which assumes that 'E' is not ratified]). > #if !defined(__riscv_e) || (__riscv_e != (1 * 1000 * 1000 + 9 * 1000)) > #error "__riscv_e" > #endif 1*1000*1000 + 9*1000 ('E' version 1.9) should

Re: [PATCH 2/4] libbacktrace: detect executable path on windows

2023-11-29 Thread Ian Lance Taylor
On Mon, Nov 20, 2023 at 11:57 AM Björn Schäpers wrote: > > this is what I'm using with GCC 12 and 13 on my windows machines, rebased onto > the current HEAD. Thanks. Committed as follows. Ian * fileline.c: Include if available. (windows_get_executable_path): New static

[PATCH v2] c++: wrong ambiguity in accessing static field [PR112744]

2023-11-29 Thread Marek Polacek
On Wed, Nov 29, 2023 at 03:28:44PM -0500, Jason Merrill wrote: > On 11/29/23 12:43, Marek Polacek wrote: > > On Wed, Nov 29, 2023 at 12:23:46PM -0500, Patrick Palka wrote: > > > On Wed, 29 Nov 2023, Marek Polacek wrote: > > > > > > > Bootstrapped/regtested on x86_64-pc-linux-gnu, ok for trunk? > >

Re: [PATCH] c++: wrong ambiguity in accessing static field [PR112744]

2023-11-29 Thread Marek Polacek
On Wed, Nov 29, 2023 at 01:58:31PM -0500, Jason Merrill wrote: > On 11/29/23 10:45, Marek Polacek wrote: > > Bootstrapped/regtested on x86_64-pc-linux-gnu, ok for trunk? > > > > Now that I'm posting this patch, I think you'll probably want me to use > > ba_any unconditionally. That works too; g++

Re: [RFC PATCH] RISC-V: Remove f{r,s}flags builtins

2023-11-29 Thread Philipp Tomsich
These build-ins are used internally for the TARGET_ATOMIC_ASSIGN_EXPAND_FENV expansion (and therefore can not be removed): /* Implement TARGET_ATOMIC_ASSIGN_EXPAND_FENV. */ void riscv_atomic_assign_expand_fenv (tree *hold, tree *clear, tree *update) { if (!(TARGET_HARD_FLOAT || TARGET_ZFINX))

RE: [PATCH 8/21]middle-end: update vectorizable_live_reduction with support for multiple exits and different exits

2023-11-29 Thread Tamar Christina
> -Original Message- > From: Richard Biener > Sent: Wednesday, November 29, 2023 2:29 PM > To: Tamar Christina > Cc: gcc-patches@gcc.gnu.org; nd ; j...@ventanamicro.com > Subject: RE: [PATCH 8/21]middle-end: update vectorizable_live_reduction > with support for multiple exits and differen

[PATCH] Fortran: fix TARGET attribute of associating entity in ASSOCIATE [PR112764]

2023-11-29 Thread Harald Anlauf
Dear all, the attached simple patch fixes the handling of the TARGET attribute of an associate variable in an ASSOCIATE construct. See e.g. F2018:11.1.3.3 for a standard reference. (Note that the patch does not touch the pointer or allocatable attributes, as that would lead to several testsuite

Re: [PATCH v1 1/1] RISC-V: Initial RV64E and LP64E support

2023-11-29 Thread Patrick O'Neill
Hi Tsukasa, I'm seeing a new regression across all tested riscv targets: https://github.com/patrick-rivos/gcc-postcommit-ci/issues/224 Regression: |FAIL: gcc.target/riscv/predef-13.c -O0 (test for excess errors) FAIL: gcc.target/riscv/predef-13.c -O1 (test for excess errors) FAIL: gcc.target/

Re: [PATCH] c++: bogus -Wparentheses warning [PR112765]

2023-11-29 Thread Jason Merrill
On 11/29/23 14:42, Patrick Palka wrote: Bootstrapped and regtested on x86_64-pc-linu-xgnu, does this look OK for trunk? OK. -- >8 -- We need to consistently look through implicit INDIRECT_REF when setting/checking for -Wparentheses warning suppression. In passing use STRIP_REFERENCE_REF con

Re: [PATCH v2] c++: P2280R4, Using unknown refs in constant expr [PR106650]

2023-11-29 Thread Jason Merrill
On 11/29/23 13:56, Marek Polacek wrote: On Mon, Nov 20, 2023 at 04:29:33PM -0500, Jason Merrill wrote: On 11/17/23 16:46, Marek Polacek wrote: Bootstrapped/regtested on x86_64-pc-linux-gnu, ok for trunk? -- >8 -- This patch is an attempt to implement (part of?) P2280, Using unknown pointers an

Re: [PATCH] Add C intrinsics for scalar crypto extension

2023-11-29 Thread Craig Topper
The intrinsics that use macros are the ones that require an integer constant expression for one of the arguments. Clang needs to be able to see the constant expression as an argument to the underlying builtin. Thus the macro. Based on my previous x86 experience, gcc may only require a macro for

Re: [PATCH] c++: wrong ambiguity in accessing static field [PR112744]

2023-11-29 Thread Jason Merrill
On 11/29/23 12:43, Marek Polacek wrote: On Wed, Nov 29, 2023 at 12:23:46PM -0500, Patrick Palka wrote: On Wed, 29 Nov 2023, Marek Polacek wrote: Bootstrapped/regtested on x86_64-pc-linux-gnu, ok for trunk? Now that I'm posting this patch, I think you'll probably want me to use ba_any uncondit

Re: [V2] New pass for sign/zero extension elimination -- not ready for "final" review

2023-11-29 Thread Joern Rennecke
On Wed, 29 Nov 2023 at 19:57, Joern Rennecke wrote: > > Attached is what I have for carry_backpropagate . > > The utility of special handling for SS_ASHIFT / US_ASHIFT seems > somewhat marginal. > > I suspect it'd be more useful to add handling of LSHIFTRT and ASHIFTRT > . Some ports do > a lot o

Re: [RFC PATCH] RISC-V: Remove f{r,s}flags builtins

2023-11-29 Thread Christoph Müllner
On Wed, Nov 29, 2023 at 8:24 PM Patrick O'Neill wrote: > > Hi Christoph, > > The precommit-ci is seeing a large number of ICE segmentation faults as a > result of this patch: > https://github.com/ewlu/gcc-precommit-ci/issues/796#issuecomment-1831853523 > > The failures aren't in riscv.exp testsui

[V2] New pass for sign/zero extension elimination -- not ready for "final" review

2023-11-29 Thread Joern Rennecke
Attached is what I have for carry_backpropagate . The utility of special handling for SS_ASHIFT / US_ASHIFT seems somewhat marginal. I suspect it'd be more useful to add handling of LSHIFTRT and ASHIFTRT . Some ports do a lot of static shifting. commit ed47c3d0d38f85c9b4e22bdbd079e0665465ef9c Au

[PATCH] c++: bogus -Wparentheses warning [PR112765]

2023-11-29 Thread Patrick Palka
Bootstrapped and regtested on x86_64-pc-linu-xgnu, does this look OK for trunk? -- >8 -- We need to consistently look through implicit INDIRECT_REF when setting/checking for -Wparentheses warning suppression. In passing use STRIP_REFERENCE_REF consistently as well. PR c++/112765 gcc/cp

Re: [RFC PATCH] RISC-V: Remove f{r,s}flags builtins

2023-11-29 Thread Patrick O'Neill
Hi Christoph, The precommit-ci is seeing a large number of ICE segmentation faults as a result of this patch: https://github.com/ewlu/gcc-precommit-ci/issues/796#issuecomment-1831853523 The failures aren't in riscv.exp testsuite files so that's likely why you didn't run into them in your test

Re: [V2] New pass for sign/zero extension elimination -- not ready for "final" review

2023-11-29 Thread Jivan Hakobyan
The reason is removing MINUS from safe_for_live_propagation. We did not do it on purpose, will roll back on V3. > On 29 Nov 2023, at 19:46, Xi Ruoyao wrote: > > On Wed, 2023-11-29 at 20:37 +0800, Xi Ruoyao wrote: >>> On Wed, 2023-11-29 at 17:33 +0800, Xi Ruoyao wrote: >>> On Mon, 2023-11-2

Re: [RFA] New pass for sign/zero extension elimination

2023-11-29 Thread Jivan Hakobyan
We already noticed it and will roll back in V3 With the best regards Jivan Hakobyan > On 29 Nov 2023, at 21:37, Joern Rennecke wrote: > > Why did you leave out MINUS from safe_for_live_propagation ?

Re: [PATCH] bpf: change ASM_COMMENT_START to '#'

2023-11-29 Thread Jose E. Marchesi
Hi David. OK. Thanks. > The BPF "pseudo-C" assembly dialect uses semi-colon (;) to separate > statements, not to begin line comments. The GNU assembler was recently > changed accordingly: > > https://sourceware.org/pipermail/binutils/2023-November/130867.html > > This patch adapts the BPF bac

Re: [PATCH #2/4] c++: mark short-enums as packed

2023-11-29 Thread Jason Merrill
On 11/29/23 04:39, Alexandre Oliva wrote: Hello, Jason, On Nov 22, 2023, Jason Merrill wrote: On 11/22/23 13:12, Jason Merrill wrote: I'm coming to the conclusion that your C++ patch is fine but we should remove the TYPE_PACKED warning from check_address_or_pointer_of_packed_member.  And may

Re: [PATCH] c++: wrong ambiguity in accessing static field [PR112744]

2023-11-29 Thread Jason Merrill
On 11/29/23 10:45, Marek Polacek wrote: Bootstrapped/regtested on x86_64-pc-linux-gnu, ok for trunk? Now that I'm posting this patch, I think you'll probably want me to use ba_any unconditionally. That works too; g++.dg/tc1/dr52.C just needs a trivial testsuite tweak: 'C' is not an accessibl

[PATCH v2] c++: P2280R4, Using unknown refs in constant expr [PR106650]

2023-11-29 Thread Marek Polacek
On Mon, Nov 20, 2023 at 04:29:33PM -0500, Jason Merrill wrote: > On 11/17/23 16:46, Marek Polacek wrote: > > Bootstrapped/regtested on x86_64-pc-linux-gnu, ok for trunk? > > > > -- >8 -- > > This patch is an attempt to implement (part of?) P2280, Using unknown > > pointers and references in consta

Re: [PATCH] c++, v4: Implement C++26 P2169R4 - Placeholder variables with no name [PR110349]

2023-11-29 Thread Jason Merrill
On 11/29/23 13:01, Jakub Jelinek wrote: On Tue, Nov 28, 2023 at 11:27:55AM -0500, Jason Merrill wrote: On 11/24/23 03:34, Jakub Jelinek wrote: On Mon, Sep 18, 2023 at 07:12:40PM +0200, Jakub Jelinek via Gcc-patches wrote: On Tue, Aug 22, 2023 at 09:39:11AM +0200, Jakub Jelinek via Gcc-patches

[PATCH] bpf: change ASM_COMMENT_START to '#'

2023-11-29 Thread David Faust
The BPF "pseudo-C" assembly dialect uses semi-colon (;) to separate statements, not to begin line comments. The GNU assembler was recently changed accordingly: https://sourceware.org/pipermail/binutils/2023-November/130867.html This patch adapts the BPF backend in GCC accordingly, to use a hash

[PATCH] s390: Fix builtin-classify-type-1.c on s390 too [PR112725]

2023-11-29 Thread Jakub Jelinek
Hi! Given that the s390 backend defines pretty much the same target hook as rs6000, I believe it suffers (at least when using -mvx?) the same problem as rs6000, though admittedly this is so far completely untested. Ok for trunk if it passes bootstrap/regtest there? 2023-11-29 Jakub Jelinek

[committed] rs6000: Fix up c-c++-common/builtin-classify-type-1.c failure [PR112725]

2023-11-29 Thread Jakub Jelinek
Hi! The rs6000 backend (and s390 one as well) diagnoses passing vector types to unprototyped functions, which breaks the builtin-classify-type-1.c test. The builtin isn't really unprototyped, it is just type-generic and accepting vector types is just fine there, all it does is categorize the vecto

[PATCH] c++, v4: Implement C++26 P2169R4 - Placeholder variables with no name [PR110349]

2023-11-29 Thread Jakub Jelinek
On Tue, Nov 28, 2023 at 11:27:55AM -0500, Jason Merrill wrote: > On 11/24/23 03:34, Jakub Jelinek wrote: > > On Mon, Sep 18, 2023 at 07:12:40PM +0200, Jakub Jelinek via Gcc-patches > > wrote: > > > On Tue, Aug 22, 2023 at 09:39:11AM +0200, Jakub Jelinek via Gcc-patches > > > wrote: > > > > The fo

Re: [PATCH v2] AArch64: Add inline memmove expansion

2023-11-29 Thread Richard Sandiford
Wilco Dijkstra writes: > v2: further cleanups, improved comments > > Add support for inline memmove expansions. The generated code is identical > as for memcpy, except that all loads are emitted before stores rather than > being interleaved. The maximum size is 256 bytes which requires at most 1

Re: [PATCH v2] AArch64: Fix strict-align cpymem/setmem [PR103100]

2023-11-29 Thread Richard Sandiford
Wilco Dijkstra writes: > v2: Use UINTVAL, rename max_mops_size. > > The cpymemdi/setmemdi implementation doesn't fully support strict alignment. > Block the expansion if the alignment is less than 16 with STRICT_ALIGNMENT. > Clean up the condition when to use MOPS. > > Passes regress/bootstrap, OK

Re: [PATCH] testsuite: scev: expect fail on ilp32

2023-11-29 Thread Hans-Peter Nilsson
> From: Rainer Orth > Date: Tue, 28 Nov 2023 16:13:35 +0100 > Richard Biener writes: > > > On Sun, 19 Nov 2023, Jeff Law wrote: > > > >> > >> > >> On 11/19/23 00:30, Alexandre Oliva wrote: > >> > > >> > I've recently patched scev-3.c and scev-5.c because it only passed by > >> > accident on

Re: [PATCH] Add C intrinsics for scalar crypto extension

2023-11-29 Thread Christoph Müllner
On Wed, Nov 29, 2023 at 5:49 PM Liao Shihua wrote: > > > 在 2023/11/29 23:03, Christoph Müllner 写道: > > On Mon, Nov 27, 2023 at 9:36 AM Liao Shihua wrote: > > This patch add C intrinsics for scalar crypto extension. > Because of riscv-c-api > (https://github.com/riscv-non-isa/riscv-c-api-doc/pull

Re: [PATCH v2 4/5] Add support for target_version attribute

2023-11-29 Thread Richard Sandiford
Andrew Carlotti writes: > This patch adds support for the "target_version" attribute to the middle > end and the C++ frontend, which will be used to implement function > multiversioning in the aarch64 backend. > > On targets that don't use the "target" attribute for multiversioning, > there is no

Re: [PATCH] c++: wrong ambiguity in accessing static field [PR112744]

2023-11-29 Thread Marek Polacek
On Wed, Nov 29, 2023 at 12:23:46PM -0500, Patrick Palka wrote: > On Wed, 29 Nov 2023, Marek Polacek wrote: > > > Bootstrapped/regtested on x86_64-pc-linux-gnu, ok for trunk? > > > > Now that I'm posting this patch, I think you'll probably want me to use > > ba_any unconditionally. That works too

Re: [RFA] New pass for sign/zero extension elimination

2023-11-29 Thread Joern Rennecke
Why did you leave out MINUS from safe_for_live_propagation ?

Re: [PATCH] c++: wrong ambiguity in accessing static field [PR112744]

2023-11-29 Thread Patrick Palka
On Wed, 29 Nov 2023, Marek Polacek wrote: > Bootstrapped/regtested on x86_64-pc-linux-gnu, ok for trunk? > > Now that I'm posting this patch, I think you'll probably want me to use > ba_any unconditionally. That works too; g++.dg/tc1/dr52.C just needs > a trivial testsuite tweak: > 'C' is not

Re: [PATCH v2 1/6] libgomp: basic pinned memory on Linux

2023-11-29 Thread Andrew Stubbs
On 22/11/2023 14:26, Tobias Burnus wrote: Hi Andrew, Side remark: -#define MEMSPACE_CALLOC(MEMSPACE, SIZE) \ - calloc (1, (((void)(MEMSPACE), (SIZE This fits a bit more to previous patch, but I wonder whether that should use (MEMSPACE, NMEMB, SIZE) instead - to fit to the actual calloc

Re: [PATCH 8/8] aarch64: Add SVE support for simd clones [PR 96342]

2023-11-29 Thread Richard Sandiford
"Andre Vieira (lists)" writes: > Rebased, no major changes, still needs review. > > On 30/08/2023 10:19, Andre Vieira (lists) via Gcc-patches wrote: >> This patch finalizes adding support for the generation of SVE simd >> clones when no simdlen is provided, following the ABI rules where the >> w

[COMMITTED 2/2] PR tree-optimization/111922 - Check operands before invoking fold_range.

2023-11-29 Thread Andrew MacLeod
This patch utilizes the new check_operands_p() routine in range-ops to verify the operands are compatible before IPA tries to call fold_range().   I do not know if there are other places in IPA that should be checking this, but we have a bug report for this place at least. The other option wou

[COMMITTED 1/2] Add operand_check_p to range-ops.

2023-11-29 Thread Andrew MacLeod
I've been going back and forth with this for the past week, and finally settled on a solution This patch adds an operand_check_p() (lhs_type, op1_type, op2_type) method to range_ops which will confirm whether the types of the operands being passed to fold_range, op1_range, and op2_range  are p

Re: [PATCH] Add C intrinsics for scalar crypto extension

2023-11-29 Thread Liao Shihua
在 2023/11/29 23:03, Christoph Müllner 写道: On Mon, Nov 27, 2023 at 9:36 AM Liao Shihua wrote: This patch add C intrinsics for scalar crypto extension. Because of riscv-c-api (https://github.com/riscv-non-isa/riscv-c-api-doc/pull/44/files) includes zbkb/zbkc/zbkx's intrinsics in bit manipulati

Re: [committed v2] libstdc++: Define std::ranges::to for C++23 (P1206R7) [PR111055]

2023-11-29 Thread Patrick Palka
On Thu, 23 Nov 2023, Jonathan Wakely wrote: > Here's the finished version of the std::ranges::to patch, which I've > pushed to trunk. > > Tested x86_64-linux. > > -- >8 -- > > This adds the std::ranges::to functions for C++23. The rest of P1206R7 > is not yet implemented, i.e. the new construct

Re: [PATCH v2 1/3] libgomp, nvptx: low-latency memory allocator

2023-11-29 Thread Andrew Stubbs
On 08/09/2023 10:04, Tobias Burnus wrote: Regarding patch 2/3 and MEMSPACE_VALIDATE. In general, I wonder how to handle memory spaces (and traits) that aren't supported. Namely, when to return 0L and when to silently use ignore the trait / use another memory space. The current omp_init_allocat

Re: [PATCH v7 2/5] OpenMP/OpenACC: Rework clause expansion and nested struct handling

2023-11-29 Thread Tobias Burnus
Hi Julian, On 29.11.23 12:43, Julian Brown wrote: Here is a patch incorporating your initial review comments (hopefully!). Thanks. The patch LGTM - with the two remarks below addressed. (i.e. fixing one testcase and filing two PRs (or common PR) about the features missing and exposed by the

Re: [PATCH] aarch64: Avoid -Wincompatible-pointer-types warning in Linux unwinder

2023-11-29 Thread Szabolcs Nagy
The 11/10/2023 19:48, Florian Weimer wrote: > * config/aarch64/linux-unwind.h > (aarch64_fallback_frame_state): Add cast to the expected type > in sc assignment. > > (Almost a v2, but the other issue was already fixed via in r14-4183.) > > --- > libgcc/config/aarch64/linux-unwi

Re: [PATCH] aarch64: enable mixed-types for aarch64 simdclones

2023-11-29 Thread Richard Sandiford
Sorry for the very slow review on this. It LGTM apart from some minor comments below: "Andre Vieira (lists)" writes: > Hey, > > Just a minor update to the patch, I had missed the libgomp testsuite, so > had to make some adjustments there too. > > gcc/ChangeLog: > > * config/aarch64/aar

Re: [V2] New pass for sign/zero extension elimination -- not ready for "final" review

2023-11-29 Thread Xi Ruoyao
On Wed, 2023-11-29 at 20:37 +0800, Xi Ruoyao wrote: > On Wed, 2023-11-29 at 17:33 +0800, Xi Ruoyao wrote: > > On Mon, 2023-11-27 at 23:06 -0700, Jeff Law wrote: > > > This has (of course) been tested on rv64.  It's also been bootstrapped > > > and regression tested on x86.  Bootstrap and regression

[PATCH] c++: wrong ambiguity in accessing static field [PR112744]

2023-11-29 Thread Marek Polacek
Bootstrapped/regtested on x86_64-pc-linux-gnu, ok for trunk? Now that I'm posting this patch, I think you'll probably want me to use ba_any unconditionally. That works too; g++.dg/tc1/dr52.C just needs a trivial testsuite tweak: 'C' is not an accessible base of 'X' v. 'C' is an inaccessible b

Re: [PATCH] aarch64: Call named function in gcc.target/aarch64/aapcs64/ice_1.c

2023-11-29 Thread Richard Earnshaw
On 10/11/2023 11:22, Florian Weimer wrote: This test looks like it intends to pass a small struct argument through both a non-variadic and variadic argument, but due to the typo, it does not achieve that. gcc/testsuite/ * gcc.target/aarch64/aapcs64/ice_1.c (foo): Call named. --- g

Re: [PATCH] aarch64: Call named function in gcc.target/aarch64/aapcs64/ice_1.c

2023-11-29 Thread Szabolcs Nagy
The 11/10/2023 12:22, Florian Weimer wrote: > This test looks like it intends to pass a small struct argument > through both a non-variadic and variadic argument, but due to > the typo, it does not achieve that. > > gcc/testsuite/ > > * gcc.target/aarch64/aapcs64/ice_1.c (foo): Call named.

Re: [PATCH v2 2/2] libatomic: Enable LSE128 128-bit atomics for armv9.4-a

2023-11-29 Thread Richard Earnshaw
On 13/11/2023 11:37, Victor Do Nascimento wrote: The armv9.4-a architectural revision adds three new atomic operations associated with the LSE128 feature: * LDCLRP - Atomic AND NOT (bitclear) of a location with 128-bit value held in a pair of registers, with original data loaded into

Re: [PATCH] Add C intrinsics for scalar crypto extension

2023-11-29 Thread Christoph Müllner
On Mon, Nov 27, 2023 at 9:36 AM Liao Shihua wrote: > > This patch add C intrinsics for scalar crypto extension. > Because of riscv-c-api > (https://github.com/riscv-non-isa/riscv-c-api-doc/pull/44/files) includes > zbkb/zbkc/zbkx's > intrinsics in bit manipulation extension, this patch only supp

RE: [PATCH 10/21]middle-end: implement relevancy analysis support for control flow

2023-11-29 Thread Richard Biener
On Mon, 27 Nov 2023, Tamar Christina wrote: > Ping > > > -Original Message- > > From: Tamar Christina > > Sent: Monday, November 6, 2023 7:40 AM > > To: gcc-patches@gcc.gnu.org > > Cc: nd ; rguent...@suse.de; j...@ventanamicro.com > > Subject: [PATCH 10/21]middle-end: implement relevancy

RE: [PATCH v4] [tree-optimization/110279] Consider FMA in get_reassociation_width

2023-11-29 Thread Di Zhao OS
> -Original Message- > From: Richard Biener > Sent: Tuesday, November 21, 2023 9:01 PM > To: Di Zhao OS > Cc: gcc-patches@gcc.gnu.org > Subject: Re: [PATCH v4] [tree-optimization/110279] Consider FMA in > get_reassociation_width > > On Thu, Nov 9, 2023 at 6:53 PM Di Zhao OS > wrote: > >

Re: [PATCH] libiberty: Disable hwcaps for sha1.o

2023-11-29 Thread Jakub Jelinek
On Wed, Nov 29, 2023 at 03:10:00PM +0100, Rainer Orth wrote: > 2023-11-29 Rainer Orth > > config: > * hwcaps.m4 (GCC_CHECK_ASSEMBLER_HWCAP): Require > AC_CANONICAL_TARGET. > > libiberty: > * configure.ac (GCC_CHECK_ASSEMBLER_HWCAP): Invoke. > * configure, ac

In 'libgomp.c/target-simd-clone-{1,2,3}.c', restrict 'scan-offload-ipa-dump's to 'only_for_offload_target amdgcn-amdhsa' (was: [PATCH v4] OpenMP: Generate SIMD clones for functions with "declare targe

2023-11-29 Thread Thomas Schwinge
Hi! On 2022-11-14T21:46:15-0700, Sandra Loosemore via Gcc-patches wrote: > [...] I've added infrastructure to support testing on the offload > compiler, added new test cases, and reworked the existing test cases to > scan for interesting things written to the dump file instead of > examining the

Re: [PATCH v2] rs6000: Add new pass for replacement of contiguous addresses vector load lxv with lxvp

2023-11-29 Thread Ajit Agarwal
Hello All: I am working on fixing the below issues and incorporating comments from Kewen and Michael. Thanks & Regards Ajit On 28/11/23 9:11 pm, Michael Meissner wrote: > On Tue, Nov 28, 2023 at 05:44:43PM +0800, Kewen.Lin wrote: >> on 2023/11/28 15:05, Michael Meissner wrote: >>> I tried using

[PATCH] libiberty: Disable hwcaps for sha1.o

2023-11-29 Thread Rainer Orth
This patch commit bf4f40cc3195eb7b900bf5535cdba1ee51fdbb8e Author: Jakub Jelinek Date: Tue Nov 28 13:14:05 2023 +0100 libiberty: Use x86 HW optimized sha1 broke Solaris/x86 bootstrap with the native as: libtool: compile: /var/gcc/regression/master/11.4-gcc/build/./gcc/gccgo -B/var/gcc/

Re: GCN: Generally enable the 'gcc.target/gcn/avgpr-[...]' test cases

2023-11-29 Thread Andrew Stubbs
On 29/11/2023 13:44, Thomas Schwinge wrote: Hi! On 2023-11-15T14:10:47+, Andrew Stubbs wrote: * gcc.target/gcn/avgpr-mem-double.c: New test. * gcc.target/gcn/avgpr-mem-int.c: New test. * gcc.target/gcn/avgpr-mem-long.c: New test. * gcc.target/gcn/avgpr-mem-sh

Re: [PATCH] testsuite, i386: Only check for cfi directives if supported [PR112729]

2023-11-29 Thread Rainer Orth
Rainer Orth writes: > gcc.target/i386/apx-interrupt-1.c and two more tests FAIL on Solaris/x86 > with the native assembler. Like Darwin as, it doesn't support cfi > directives. Instead of adding more and more targets in every affected > test, this patch introduces a cfi effective-target keyword

RE: [PATCH 9/21]middle-end: implement vectorizable_early_exit for codegen of exit code

2023-11-29 Thread Richard Biener
On Mon, 27 Nov 2023, Tamar Christina wrote: > Ping > > > -Original Message- > > From: Tamar Christina > > Sent: Monday, November 6, 2023 7:40 AM > > To: gcc-patches@gcc.gnu.org > > Cc: nd ; rguent...@suse.de; j...@ventanamicro.com > > Subject: [PATCH 9/21]middle-end: implement vectorizab

GCN: Generally enable the 'gcc.target/gcn/avgpr-[...]' test cases (was: [committed] amdgcn: Add Accelerator VGPR registers)

2023-11-29 Thread Thomas Schwinge
Hi! On 2023-11-15T14:10:47+, Andrew Stubbs wrote: > * gcc.target/gcn/avgpr-mem-double.c: New test. > * gcc.target/gcn/avgpr-mem-int.c: New test. > * gcc.target/gcn/avgpr-mem-long.c: New test. > * gcc.target/gcn/avgpr-mem-short.c: New test. > * gcc.target/gcn/avgp

Re: [PATCH v2 1/2] libatomic: atomic_16.S: Improve ENTRY, END and ALIAS macro interface

2023-11-29 Thread Richard Earnshaw
On 13/11/2023 11:37, Victor Do Nascimento wrote: The introduction of further architectural-feature dependent ifuncs for AArch64 makes hard-coding ifunc `_i' suffixes to functions cumbersome to work with. It is awkward to remember which ifunc maps onto which arch feature and makes the code har

Re: Re: [PATCH] RISC-V: Support highpart register overlap for vwcvt

2023-11-29 Thread 钟居哲
>> overlap or group_overlap. Then change "no" to "none" and rename >> "vconstraint_enabled" to "group_overlap_valid" (or without the group). >> Add a comment to group_overlap_valid: >> ; Widening instructions have group-overlap constraints. Those are only >> ; valid for certain register-group s

Re: T-Head Vector for GCC-14? (was Re: RISC-V: Support XTheadVector extensions)

2023-11-29 Thread Jason Kridner
On Tue, Nov 28, 2023 at 5:21 PM Jeff Law wrote: > > On 11/28/23 12:56, Philipp Tomsich wrote: > > >> That's obviously a risky thing to do given it was sent right at the end > >> of the window, but it meets the rules. > >> > >> Folks in the call seemed generally amenable to at least trying for 14,

Re: Re: [PATCH] RISC-V: Support highpart register overlap for vwcvt

2023-11-29 Thread 钟居哲
>> But don't we allow e.g. v2 and v4 with W82? Shouldn't it be % 8 == 6 >> and % 8 == 7 for W82 and W81? Or for W41, % 4 == 3? At least when looking >> at the given spec example that would correspond to W82? I think you are right. It should be W86 for vsext.vf4 (LMUL2 -> LMUL8) W87 for vsext.vf

RE: [PATCH 8/21]middle-end: update vectorizable_live_reduction with support for multiple exits and different exits

2023-11-29 Thread Richard Biener
On Mon, 27 Nov 2023, Tamar Christina wrote: > > > > > This is a respun patch with a fix for VLA. > > > > > > This adds support to vectorizable_live_reduction to handle multiple > > > exits by doing a search for which exit the live value should be > > > materialized in. > > > > > > Additionally w

Re: [PATCH] RISC-V: Support highpart overlap for vext.vf

2023-11-29 Thread Robin Dapp
LGTM (in context of the last message) but please consider adding the comments/naming I suggested. Regards Robin

Re: [PATCH] RISC-V: Support highpart register overlap for vwcvt

2023-11-29 Thread Robin Dapp
>>> I can't really match spec and code.  For the lmul = 2 case sure, >>> but W84 e.g. allows v4 and not v6?  What actually is "highest-numbered >>>part"? > Yes. > > For vwcvt, LMUL 4 -> LMUL 8.  > We allow overlap  vwcvt v0 (occupy v0 - v7), v4 (occupy v4 - v7) > This patch support the overlap ab

Re: [PATCH] combine: Fix ICE in try_combine on pr112494.c [PR112560]

2023-11-29 Thread Uros Bizjak
On Wed, Nov 29, 2023 at 1:25 PM Richard Biener wrote: > > On Wed, Nov 29, 2023 at 10:35 AM Uros Bizjak wrote: > > > > The compiler, configured with --enable-checking=yes,rtl,extra ICEs with: > > > > internal compiler error: RTL check: expected elt 0 type 'e' or 'u', > > have 'E' (rtx unspec) in t

Re: Fix 'g++.dg/cpp26/static_assert1.C' for '-fno-exceptions' configurations

2023-11-29 Thread Thomas Schwinge
Hi! On 2023-11-28T12:11:22-0500, Jason Merrill wrote: > On 11/28/23 12:08, Thomas Schwinge wrote: >> // { dg-options "" } >> +// Override any default-'-fno-exceptions': >> +// { dg-additional-options -fexceptions } > > Might as well put the -fexceptions into the dg-options instead of having > tw

  1   2   >