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

2023-12-01 Thread juzhe.zh...@rivai.ai
+ opt_machine_mode opt_mode = riscv_vector::get_vector_mode (smode, nunits); Remove. + if (opt_mode.exists (&vmode)) -> if (riscv_vector::get_vector_mode (smode, nunits).exists (&vmode)) + emit_insn ( + gen_movdi (int_reg, gen_lowpart (GET_MODE (int_reg), d

Re: [PATCH] lower-bitint: Fix up maximum addition/subtraction/multiplication result computations

2023-12-01 Thread Richard Biener
On Fri, 1 Dec 2023, Jakub Jelinek wrote: > Hi! > > When debugging PR112750, I've noticed some issues in the computation > of precisions and the following patch attempts to fix those. > > The pass uses range_to_prec function, which possibly using ranger returns > minimum precision of some operand

[PATCH] lower-bitint: Fix up handle_operand_addr for 0 constants [PR112771]

2023-12-01 Thread Jakub Jelinek
Hi! handle_operand_addr for INTEGER_CSTs uses wi::min_precision (UNSIGNED for non-negative constants, SIGNED for negative ones) and from that computes mp as minimum number of limbs which can represent that value, and in some cases creates a test BITINT_TYPE with that precision to categorize it and

[PATCH] lower-bitint: Fix lowering of middle sized _BitInt operations which can throw [PR112770]

2023-12-01 Thread Jakub Jelinek
Hi! The middle kind _BitInt lowering is mostly done by casting the BITINT_TYPE operands (if any) to a signed/unsigned integer type which has larger/equal precision, using such integer type also for the lhs (if BITINT_TYPE) and and adding a cast after the statement from that new lhs to the old (BIT

[PATCH] RISC-V: Support highpart overlap for indexed load with SRC EEW < DEST EEW

2023-12-01 Thread Juzhe-Zhong
Leverage previous approach. Before this patch: .L5: add a3,s0,s2 add a4,s6,s2 add a5,s7,s2 vsetvli zero,s0,e64,m8,ta,ma vle8.v v4,0(s2) vle8.v v3,0(a3) mv s2,s1 vle8.v v2,0(a4) vle8.v v1,0(a5) nop

[PATCH] gcov: Fix use of __LIBGCC_HAVE_LIBATOMIC

2023-12-01 Thread Sebastian Huber
libgcc/ChangeLog: PR target/112777 * libgcov.h (GCOV_SUPPORTS_ATOMIC): Honor that __LIBGCC_HAVE_LIBATOMIC is always defined as either 0 or 1. --- libgcc/libgcov.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libgcc/libgcov.h b/libgcc/libgcov.h ind

Re: [PATCH] i386: Mark Xeon Phi ISAs as deprecated

2023-12-01 Thread Richard Biener
On Fri, Dec 1, 2023 at 8:34 AM Jiang, Haochen wrote: > > > -Original Message- > > From: Richard Biener > > Sent: Friday, December 1, 2023 3:04 PM > > To: Jiang, Haochen > > Cc: gcc-patches@gcc.gnu.org; Liu, Hongtao ; > > ubiz...@gmail.com > > Subject: Re: [PATCH] i386: Mark Xeon Phi ISAs

Re: [PATCH] lower-bitint: Fix up handle_operand_addr for 0 constants [PR112771]

2023-12-01 Thread Richard Biener
On Fri, 1 Dec 2023, Jakub Jelinek wrote: > Hi! > > handle_operand_addr for INTEGER_CSTs uses wi::min_precision (UNSIGNED > for non-negative constants, SIGNED for negative ones) and from that > computes mp as minimum number of limbs which can represent that value, > and in some cases creates a tes

Re: [PATCH] lower-bitint: Fix lowering of middle sized _BitInt operations which can throw [PR112770]

2023-12-01 Thread Richard Biener
On Fri, 1 Dec 2023, Jakub Jelinek wrote: > Hi! > > The middle kind _BitInt lowering is mostly done by casting the BITINT_TYPE > operands (if any) to a signed/unsigned integer type which has larger/equal > precision, using such integer type also for the lhs (if BITINT_TYPE) and > and adding a cast

Re: [PATCH] gcov: Fix use of __LIBGCC_HAVE_LIBATOMIC

2023-12-01 Thread Richard Biener
On Fri, Dec 1, 2023 at 9:19 AM Sebastian Huber wrote: > > libgcc/ChangeLog: OK. > PR target/112777 > > * libgcov.h (GCOV_SUPPORTS_ATOMIC): Honor that > __LIBGCC_HAVE_LIBATOMIC is > always defined as either 0 or 1. > --- > libgcc/libgcov.h | 2 +- > 1 file changed, 1 in

Re: [PATCH v2 3/3] libphobos: LoongArch hardware support.

2023-12-01 Thread Xi Ruoyao
On Fri, 2023-12-01 at 15:46 +0800, Yang Yujie wrote: > diff --git a/libphobos/src/std/math/hardware.d > b/libphobos/src/std/math/hardware.d > index cb6cb87845c..8d11459a8ac 100644 > --- a/libphobos/src/std/math/hardware.d > +++ b/libphobos/src/std/math/hardware.d > @@ -177,6 +177,20 @@ private: >  

Re: [PATCH v2 3/3] libphobos: LoongArch hardware support.

2023-12-01 Thread Yang Yujie
On Fri, Dec 01, 2023 at 04:39:10PM +0800, Xi Ruoyao wrote: > > This part seems > https://github.com/dlang/phobos/commit/870eb5d5d6972b12dd4b69d48ef049abee811b6b. > > Iain: would it be better to just perform a merge from upstream dmd? > > -- > Xi Ruoyao > School of Aerospace Science and Technol

RE: [PATCH] i386: Mark Xeon Phi ISAs as deprecated

2023-12-01 Thread Jiang, Haochen
> -Original Message- > From: Richard Biener > Sent: Friday, December 1, 2023 4:37 PM > To: Jiang, Haochen > Cc: gcc-patches@gcc.gnu.org; Liu, Hongtao ; > ubiz...@gmail.com > Subject: Re: [PATCH] i386: Mark Xeon Phi ISAs as deprecated > > On Fri, Dec 1, 2023 at 8:34 AM Jiang, Haochen > w

Re: [PATCH] libgo, libstdc++: Regenerate GCC_CHECK_ASSEMBLER_HWCAP users

2023-12-01 Thread Rainer Orth
Hi Ian, > On Thu, Nov 30, 2023 at 11:46 AM Ian Lance Taylor wrote: >> >> On Thu, Nov 30, 2023 at 1:30 AM Rainer Orth >> wrote: >> > >> > the gcc-autoregen bot correctly complained that the libgo and libstdc++ >> > configure scripts hadn't been regenerated. I'd have commited the >> > following a

RE: [PATCH] aarch64: modify Ampere CPU tunings on reassociation/FMA

2023-12-01 Thread Di Zhao OS
Hello Richard, Thank you for the review. Fixed the problems and committed to master. Thanks, Di > -Original Message- > From: Richard Earnshaw > Sent: Thursday, November 30, 2023 8:21 PM > To: Di Zhao OS ; gcc-patches@gcc.gnu.org > Cc: Philipp Tomsich > Subject: Re: [PATCH] aarch64: mod

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

2023-12-01 Thread Ajit Agarwal
Hello Kewen: On 24/11/23 3:01 pm, Kewen.Lin wrote: > Hi Ajit, > > Don't forget to CC David (CC-ed) :), some comments are inlined below. > > on 2023/10/8 03:04, Ajit Agarwal wrote: >> Hello All: >> >> This patch add new pass to replace contiguous addresses vector load lxv with >> mma instruction

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

2023-12-01 Thread Ajit Agarwal
On 28/11/23 3:14 pm, Kewen.Lin wrote: > on 2023/11/28 15:05, Michael Meissner wrote: >> I tried using this patch to compare with the vector size attribute patch I >> posted. I could not build it as a cross compiler on my x86_64 because the >> assembler gives the following error: >> >> Error: op

[RISC-V PATCH] Improve style to work around PR 60994 in host compiler.

2023-12-01 Thread Roger Sayle
This simple patch allows me to build a cross-compiler to riscv using older versions of RedHat's system compiler. The issue is PR c++/60994 where g++ doesn't like the same name (demand_flags) to be used by both a variable and a (enumeration) type, which is also undesirable from a (GNU) coding styl

Re: [RISC-V PATCH] Improve style to work around PR 60994 in host compiler.

2023-12-01 Thread Robin Dapp
Yes, OK, thanks for that. CC'ing Juzhe as this is his pass. Regards Robin

Re: [PATCH] RISC-V: Support highpart overlap for indexed load with SRC EEW < DEST EEW

2023-12-01 Thread Robin Dapp
LGTM Regards Robin

[COMMITTED] bpf: quote section names whenever necessary in assembly output

2023-12-01 Thread Jose E. Marchesi
In BPF section names are used to encode the kind of BPF program and other metadata, involving all sort of non alphanumeric characters. For example: /* use auto-attach format for section definition. */ SEC("uretprobe//proc/self/exe:trigger_func2") int handle_uretprobe_byname(struct pt_regs *

[PATCH] LoongArch: Add support for TLS descriptors

2023-12-01 Thread mengqinggang
Generate la.tls.desc macro instruction for TLS descriptors model. la.tls.desc expand to pcalau12i $a0, %desc_pc_hi20(a) ld.d $a1, $a0, %desc_ld_pc_lo12(a) addi.d$a0, $a0, %desc_add_pc_lo12(a) jirl $ra, $a1, %desc_call(a) The default is TLS descriptors, but can be configure w

Re: [PATCH] LoongArch: Add support for TLS descriptors

2023-12-01 Thread Xi Ruoyao
On Fri, 2023-12-01 at 17:55 +0800, mengqinggang wrote: > Generate la.tls.desc macro instruction for TLS descriptors model. > > la.tls.desc expand to >   pcalau12i $a0, %desc_pc_hi20(a) >   ld.d  $a1, $a0, %desc_ld_pc_lo12(a) >   addi.d    $a0, $a0, %desc_add_pc_lo12(a) >   jirl  $ra, $a1,

Re: [PATCH] btf: fix PR debug/112656

2023-12-01 Thread Jose E. Marchesi
Hi Indu. This is OK. Thanks. > PR debug/112656 - btf: function prototypes generated with name > > With this patch, all BTF_KIND_FUNC_PROTO will appear anonymous in the > generated BTF section. > > As noted in the discussion in the bugzilla, the number of > BTF_KIND_FUNC_PROTO types output varie

Re: [PATCH] LoongArch: Add support for TLS descriptors

2023-12-01 Thread Xi Ruoyao
On Fri, 2023-12-01 at 18:01 +0800, Xi Ruoyao wrote: > On Fri, 2023-12-01 at 17:55 +0800, mengqinggang wrote: > > Generate la.tls.desc macro instruction for TLS descriptors model. > > > > la.tls.desc expand to > >   pcalau12i $a0, %desc_pc_hi20(a) > >   ld.d  $a1, $a0, %desc_ld_pc_lo12(a) > >  

Re: [PATCH] btf: fix PR debug/112656

2023-12-01 Thread Jose E. Marchesi
> Hi Indu. > This is OK. Thanks. Oops sorry scratch that, I am no reviewer for the BTF area. Will have to wait for Faust or someone else to chime in :) > >> PR debug/112656 - btf: function prototypes generated with name >> >> With this patch, all BTF_KIND_FUNC_PROTO will appear anonymous in th

[PATCH v3 0/3] LoongArch D support

2023-12-01 Thread Yang Yujie
This patchset is based on Zixing Liu's initial support patch: https://gcc.gnu.org/pipermail/gcc-patches/2023-September/631260.html Update v1 -> v3: Rebased onto the dmd/druntime upstream state. Regtested on loongarch64-linux-gnu with the following result: === libphobos Summary ==

[PATCH v3 3/3] libruntime: Add fiber context switch code for LoongArch.

2023-12-01 Thread Yang Yujie
libphobos/ChangeLog: * libdruntime/config/loongarch/switchcontext.S: New file. --- .../config/loongarch/switchcontext.S | 133 ++ 1 file changed, 133 insertions(+) create mode 100644 libphobos/libdruntime/config/loongarch/switchcontext.S diff --git a/libphobos/l

[PATCH v3 1/3] LoongArch: Adjust D version strings.

2023-12-01 Thread Yang Yujie
gcc/ChangeLog: * config/loongarch/loongarch-d.cc: Undefine LoongArch32. Define LoongArch_SF, LoongArch_F32, LoongArch_F64 gcc/d/ChangeLog: * dmd/cond.d: Same. * implement-d.texi: Same. --- gcc/config/loongarch/loongarch-d.cc | 27 ++- gcc/

[PATCH v3 2/3] libphobos: Update build scripts for LoongArch64.

2023-12-01 Thread Yang Yujie
libphobos/ChangeLog: * m4/druntime/cpu.m4: Support loongarch* targets. * libdruntime/Makefile.am: Same. * libdruntime/Makefile.in: Regenerate. * configure: Regenerate. --- libphobos/configure | 21 ++- libphobos/libdruntime/Makefile.am | 3 + lib

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

2023-12-01 Thread pan2 . li
From: Pan Li If we want to extract 64bit value but ELEN < 64, we use RVV vector mode with EEW = 32 to extract the highpart and lowpart. However, this approach doesn't honor DFmode when movdf pattern when ZVE32f and of course results in ICE when zve32f. This patch would like to reuse the approach

Re: [PATCH] LoongArch: Add support for TLS descriptors

2023-12-01 Thread mengqinggang
This is mainly for the convenience of testing, and we will consider the issues you mentioned. 在 2023/12/1 下午6:01, Xi Ruoyao 写道: On Fri, 2023-12-01 at 17:55 +0800, mengqinggang wrote: Generate la.tls.desc macro instruction for TLS descriptors model. la.tls.desc expand to   pcalau12i $a0, %de

[PATCH] extend.texi: Fix up defbuiltin* with spaces in return type

2023-12-01 Thread Jakub Jelinek
Hi! In https://gcc.gnu.org/onlinedocs/gcc/Other-Builtins.html#index-_005f_005fbuiltin_005fstdc_005fbit_005ffloor I've noticed that while e.g. __builtin_stdc_bit_floor builtin is properly rendered in bold and bigger size, for the __builtin_stdc_bit_width builtin it is not the builtin name which is

Re: [PATCH] LoongArch: Add support for TLS descriptors

2023-12-01 Thread Xi Ruoyao
On Fri, 2023-12-01 at 18:13 +0800, mengqinggang wrote: > This is mainly for the convenience of testing Actually when I build my system on x86_64 I always set -mtls- dialect=gnu2 in my CFLAGS. And I think maybe generally (i.e. on different architectures) we should make TLS descriptor the default i

[PATCH v7] Introduce attribute sym_alias

2023-12-01 Thread Alexandre Oliva
On Nov 30, 2023, Jan Hubicka wrote: >> + if (VAR_P (replaced)) >> +varpool_node::create_alias (sym_node->decl, replacement); >> + else >> +cgraph_node::create_alias (sym_node->decl, replacement); Unfortunately, this change didn't work. Several of the C++ tests regressed with i

[PATCH] testsuite: Tweak some further tests for modern C changes

2023-12-01 Thread Jakub Jelinek
Hi! On IRC Richi mentioned some FAILs in gcc.target/x86_64 and in pr83126.c. The following patch fixes the former ones (they need recent binutils to be enabled), for pr83126.c because I didn't have graphite configured I've just verified that the test compiles (didn't without the patch) and that t

[PATCH] Fix ambiguity between vect_get_vec_defs with/without vectype

2023-12-01 Thread Richard Biener
When querying a single set of vector defs with the overloaded vect_get_vec_defs API then when you try to use the overload with the vector type specified the call will be ambiguous with the variant without the vector type. The following fixes this by re-ordering the vector type argument to come bef

Re: [PATCH] testsuite: Tweak some further tests for modern C changes

2023-12-01 Thread Richard Biener
On Fri, 1 Dec 2023, Jakub Jelinek wrote: > Hi! > > On IRC Richi mentioned some FAILs in gcc.target/x86_64 and in pr83126.c. > > The following patch fixes the former ones (they need recent binutils to > be enabled), for pr83126.c because I didn't have graphite configured I've > just verified that

[PATCH] testsuite, arm: Fix up pr112337.c test

2023-12-01 Thread Saurabh Jha
Hey, I introduced this test "gcc/testsuite/gcc.target/arm/mve/pr112337.c" in this commit 2365aae84de030bbb006edac18c9314812fc657b before. This had an error which I unfortunately missed. This patch fixes that test. Did regression testing on arm-none-eabi and found no regressions. Output of run

Re: [PATCH 2/6] c: Turn int-conversion warnings into permerrors

2023-12-01 Thread Thomas Schwinge
Hi Florian! On 2023-11-13T14:10:34+0100, Florian Weimer wrote: > --- a/gcc/c/c-typeck.cc > +++ b/gcc/c/c-typeck.cc > @@ -7616,27 +7639,28 @@ convert_for_assignment (location_t location, > location_t expr_loc, tree type, > case ic_assign: > - pedwarn (location, OPT_Wint_conversi

Re: [PATCH 2/6] c: Turn int-conversion warnings into permerrors

2023-12-01 Thread Florian Weimer
* Thomas Schwinge: > I'm not proposing a patch as I don't know whether you'd like to just > silence the diagnostic, fix (?) the test case, and/or add another > 'dg-error'-checking test case? (I've not yet looked at the history of > the test case.) Jakub just posted a patch: [PATCH] testsuite:

Re: [PATCH] testsuite: Tweak some further tests for modern C changes

2023-12-01 Thread Florian Weimer
* Jakub Jelinek: > Hi! > > On IRC Richi mentioned some FAILs in gcc.target/x86_64 and in pr83126.c. > > The following patch fixes the former ones (they need recent binutils to > be enabled), for pr83126.c because I didn't have graphite configured I've > just verified that the test compiles (didn't

Re: [PATCH v3] aarch64: New RTL optimization pass avoid-store-forwarding.

2023-12-01 Thread Richard Sandiford
Manos Anagnostakis writes: > This is an RTL pass that detects store forwarding from stores to larger loads > (load pairs). > > This optimization is SPEC2017-driven and was found to be beneficial for some > benchmarks, > through testing on ampere1/ampere1a machines. > > For example, it can transf

Re: [PATCH] Fix ambiguity between vect_get_vec_defs with/without vectype

2023-12-01 Thread Richard Sandiford
Richard Biener writes: > When querying a single set of vector defs with the overloaded > vect_get_vec_defs API then when you try to use the overload with > the vector type specified the call will be ambiguous with the > variant without the vector type. The following fixes this by > re-ordering th

Re: Re: [RISC-V PATCH] Improve style to work around PR 60994 in host compiler.

2023-12-01 Thread juzhe.zh...@rivai.ai
LGTM. juzhe.zh...@rivai.ai From: Robin Dapp Date: 2023-12-01 17:27 To: Roger Sayle; gcc-patches CC: rdapp.gcc; juzhe.zh...@rivai.ai Subject: Re: [RISC-V PATCH] Improve style to work around PR 60994 in host compiler. Yes, OK, thanks for that. CC'ing Juzhe as this is his pass. Regards Robin

Re: [PATCH] htdocs/git.html: correct spelling and use git in example

2023-12-01 Thread Jonny Grant
On 30/11/2023 23:56, Joseph Myers wrote: > On Thu, 30 Nov 2023, Jonny Grant wrote: > >> ChangeLog: >> >> htdocs/git.html: change example to use git:// and correct >> spelling repostiory -> repository . > > git:// (unencrypted / unauthenticated) is pretty widely consid

Re: [PATCH] Fix ambiguity between vect_get_vec_defs with/without vectype

2023-12-01 Thread Richard Biener
On Fri, 1 Dec 2023, Richard Sandiford wrote: > Richard Biener writes: > > When querying a single set of vector defs with the overloaded > > vect_get_vec_defs API then when you try to use the overload with > > the vector type specified the call will be ambiguous with the > > variant without the ve

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

2023-12-01 Thread juzhe.zh...@rivai.ai
One more comment: + unsigned int num = (smode == DImode || smode == DFmode) + && !TARGET_VECTOR_ELEN_64 ? 2 : 1; change it into: unsigned int num = known_eq (GET_MODE_SIZE (smode), 8) && !TARGET_VECTOR_ELEN_64 ? 2 : 1; juzhe.zh...@rivai.ai From: pan2.li Date: 2023-12-01 18:11 To: gcc-

[PATCH] RISC-V: Fix incorrect combine of extended scalar pattern

2023-12-01 Thread Juzhe-Zhong
Background: RVV ISA vx instructions for example vadd.vx, When EEW = 64 and RV32. We can't directly use vadd.vx. Instead, we need to use: sw sw vlse vadd.vv However, we have some special situation that we still can directly use vadd.vx directly for EEW=64 && RV32. that is, when scalar is a known

Re: [PATCH] testsuite, arm: Fix up pr112337.c test

2023-12-01 Thread Richard Earnshaw (lists)
On 01/12/2023 11:28, Saurabh Jha wrote: > Hey, > > I introduced this test "gcc/testsuite/gcc.target/arm/mve/pr112337.c" in this > commit 2365aae84de030bbb006edac18c9314812fc657b before. This had an error > which I unfortunately missed. This patch fixes that test. > > Did regression testing on a

[PATCH] hardcfr: make builtin_return tests more portable [PR112334]

2023-12-01 Thread Alexandre Oliva
Rework __builtin_return tests to explicitly call __builtin_apply and use its return value rather than anything else. Also require untyped_assembly. Avoid the noise out of exceptions escaping the builtin-applied function, but add a test to cover their effects as well. Regstrapped on x86_64-linu

Re: [PATCH] testsuite, arm: Fix up pr112337.c test

2023-12-01 Thread Christophe Lyon
On Fri, 1 Dec 2023 at 13:44, Richard Earnshaw (lists) wrote: > > On 01/12/2023 11:28, Saurabh Jha wrote: > > Hey, > > > > I introduced this test "gcc/testsuite/gcc.target/arm/mve/pr112337.c" in > > this commit 2365aae84de030bbb006edac18c9314812fc657b before. This had an > > error which I unfortu

Re: [r14-5930 Regression] FAIL: gcc.c-torture/compile/libcall-2.c -Os (test for excess errors) on Linux/x86_64

2023-12-01 Thread FX Coudert
That commit makes gcc.target/i386/libcall-1.c on darwin: FAIL: gcc.target/i386/libcall-1.c scan-assembler globl\t__divti3 because the pattern is not found, the only mention of divti3 in the generated assembly is: LCFI0: movabsq $_b@GOTOFF, %rdx movabsq $___divti3@PLTOFF, %rax

[pushed] docs: remove stray reference to -fanalyzer-checker=taint [PR103533]

2023-12-01 Thread David Malcolm
I missed this one in r14-5464-gcfaaa8b11b8429. Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu. Pushed to trunk as r14-6056-g83b210d55b2846. gcc/ChangeLog: PR analyzer/103533 * doc/extend.texi: Remove stray reference to -fanalyzer-checker=taint. --- gcc/doc/

[pushed] diagnostics, analyzer: add optional per-diagnostic property bags to SARIF

2023-12-01 Thread David Malcolm
I've found it useful in debugging the analyzer for the SARIF output to contain extra analyzer-specific data in each diagnostic. This patch: * adds a way for a diagnostic_metadata to populate a property bag within a SARIF "result" object based on a new vfunc * reworks how diagnostics are emitted wi

Re: [PATCH] testsuite, arm: Fix up pr112337.c test

2023-12-01 Thread Richard Earnshaw (lists)
On 01/12/2023 13:45, Christophe Lyon wrote: > On Fri, 1 Dec 2023 at 13:44, Richard Earnshaw (lists) > wrote: >> >> On 01/12/2023 11:28, Saurabh Jha wrote: >>> Hey, >>> >>> I introduced this test "gcc/testsuite/gcc.target/arm/mve/pr112337.c" in >>> this commit 2365aae84de030bbb006edac18c9314812fc6

Re: [PATCH] Take register pressure into account for vec_construct/scalar_to_vec when the components are not loaded from memory.

2023-12-01 Thread Richard Biener
On Fri, Dec 1, 2023 at 3:39 AM liuhongt wrote: > > > Hmm, I would suggest you put reg_needed into the class and accumulate > > over all vec_construct, with your patch you pessimize a single v32qi > > over two separate v16qi for example. Also currently the whole block is > > gated with INTEGRAL_TY

Re: [PATCH] hardcfr: make builtin_return tests more portable [PR112334]

2023-12-01 Thread Richard Biener
On Fri, Dec 1, 2023 at 1:58 PM Alexandre Oliva wrote: > > > Rework __builtin_return tests to explicitly call __builtin_apply and > use its return value rather than anything else. Also require > untyped_assembly. Avoid the noise out of exceptions escaping the > builtin-applied function, but add a

Re: [r14-5930 Regression] FAIL: gcc.c-torture/compile/libcall-2.c -Os (test for excess errors) on Linux/x86_64

2023-12-01 Thread Iain Sandoe
Hi FX, > On 1 Dec 2023, at 13:55, FX Coudert wrote: > > That commit makes gcc.target/i386/libcall-1.c on darwin: > > FAIL: gcc.target/i386/libcall-1.c scan-assembler globl\t__divti3 > > because the pattern is not found, the only mention of divti3 in the generated > assembly is: > > LCFI0: >

Re: [PATCH] libgccjit: Add support for the type bfloat16

2023-12-01 Thread Antoni Boucher
David: ping. On Thu, 2023-11-16 at 17:20 -0500, Antoni Boucher wrote: > I forgot to attach the patch. > > On Thu, 2023-11-16 at 17:19 -0500, Antoni Boucher wrote: > > Hi. > > This patch adds the support for the type bfloat16 (bug 112574). > > > > This was asked to be splitted from a another patc

Re: Ping: [PATCH] Fix PR112419

2023-12-01 Thread Jeff Law
On 11/30/23 10:27, Hans-Peter Nilsson wrote: My plan was to split up the test case in one which is for -Wstringop-overflow and one which is for -Wnonnull and then one could turn off the -Wstringop-overflow for the tests which are actually for -Wnonnull. But adding the dg-blah would certain

Re: [PATCH] extend.texi: Fix up defbuiltin* with spaces in return type

2023-12-01 Thread Jeff Law
On 12/1/23 03:26, Jakub Jelinek wrote: Hi! In https://gcc.gnu.org/onlinedocs/gcc/Other-Builtins.html#index-_005f_005fbuiltin_005fstdc_005fbit_005ffloor I've noticed that while e.g. __builtin_stdc_bit_floor builtin is properly rendered in bold and bigger size, for the __builtin_stdc_bit_width

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

2023-12-01 Thread Jeff Law
On 11/30/23 18:08, Hans-Peter Nilsson wrote: Date: Sun, 19 Nov 2023 17:47:56 -0700 From: Jeff Law Locally we have had this enabled at -O1 and above to encourage testing, but I'm thinking that for the trunk enabling at -O2 and above is the right thing to do. Yes. Thoughts, comments, rec

[PATCH] untyped calls: enable target switching [PR112334]

2023-12-01 Thread Alexandre Oliva
On Dec 1, 2023, Alexandre Oliva wrote: > Also tested on arm-eabi, but it's *not* enough (or needed) to fix the > PR, there's another bug lurking there, with a separate patch coming > up. Here it is. The computation of apply_args_size and apply_result_size is saved in a static variable, s

[PATCH] ada: Fix Ada bootstrap on macOS

2023-12-01 Thread Rainer Orth
The recent warning changes broke Ada bootstrap on macOS: adaint.c: In function '__gnat_copy_attribs': adaint.c:3336:10: error: implicit declaration of function 'utimes'; did you mean 'utime'? [-Wimplicit-function-declaration] 3336 | if (utimes (to, tbuf) == -1) { | ^~

[PATCH] RISC-V: Fix rawmemchr implementation.

2023-12-01 Thread Robin Dapp
Hi, this fixes a bug in the rawmemchr implementation by incrementing the source address by vl * element_size instead of just vl. This is normally harmless as we will just scan the same region more than once but, in combination with an older qemu version, would lead to an execution failure in SPEC

[PATCH] RISC-V: Rename and unify stringop strategy handling [NFC].

2023-12-01 Thread Robin Dapp
Hi, now split into multiple patches. In preparation for the vectorized strlen and strcmp support this NFC patch unifies the stringop strategy handling a bit. The "auto" strategy now is a combination of scalar and vector and an expander should try the strategies in their preferred order. For the

[PATCH] RISC-V: Add vectorized strlen.

2023-12-01 Thread Robin Dapp
Hi, this patch implements a vectorized strlen by re-using and slightly adjusting the rawmemchr implementation. Rawmemchr returns the address of the needle while strlen returns the difference between needle address and start address. As before, strlen expansion is guarded by -minline-strlen. Whi

[PATCH] RISC-V: Add vectorized strcmp.

2023-12-01 Thread Robin Dapp
Hi, this patch adds a vectorized strcmp implementation and tests. Similar to strlen, expansion is still guarded by -minline-strcmp. I just realized I forgot to make it a series but this one is actually dependent on the NFC patch and the rawmemchr fix before. Regards Robin gcc/ChangeLog:

Re: [PATCH] RISC-V: Vectorized str(n)cmp and strlen.

2023-12-01 Thread Robin Dapp
Split it into four separate patches now. Regards Robin

Re: [PATCH] ada: Fix Ada bootstrap on macOS

2023-12-01 Thread Iain Sandoe
> On 1 Dec 2023, at 15:14, Rainer Orth wrote: > > The recent warning changes broke Ada bootstrap on macOS: > > adaint.c: In function '__gnat_copy_attribs': > adaint.c:3336:10: error: implicit declaration of function 'utimes'; did you > mean 'utime'? [-Wimplicit-function-declaration] > 3336 |

Re: [PATCH v2] doc: Update the status of build directory not fully separated

2023-12-01 Thread Eric Gallager
Please cross-reference against issue 37210 if/when merging, if it hasn't already been: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=37210 On Fri, Dec 1, 2023 at 2:15 AM Richard Biener wrote: > > On Thu, Nov 30, 2023 at 2:42 PM Xi Ruoyao wrote: > > > > Recently there are some people building GCC

PING^3 Re: [i386 PATCH] A minor code clean-up: Use NULL_RTX instead of nullptr

2023-12-01 Thread Bernhard Reutner-Fischer
On Wed, 14 Jun 2023 21:14:02 +0200 Bernhard Reutner-Fischer wrote: > plonk. ping^3 patch at https://inbox.sourceware.org/gcc-patches/20230526103151.3a7f6...@nbbrfq.loc/ I would regenerate it for rtx and/or tree, though, whatever you deem desirable? thanks > > On 26 May 2023 10:31:51 CEST, B

Re: [PATCH] ada: Fix Ada bootstrap on macOS

2023-12-01 Thread Marc Poulhiès
Rainer Orth writes: > The recent warning changes broke Ada bootstrap on macOS: > > adaint.c: In function '__gnat_copy_attribs': > adaint.c:3336:10: error: implicit declaration of function 'utimes'; did you > mean 'utime'? [-Wimplicit-function-declaration] > 3336 | if (utimes (to, tbuf) =

c: Turn -Wimplicit-function-declaration into a permerror: Fix 'gcc.dg/gnu23-builtins-no-dfp-1.c' (was: [PATCH v3 06/11] c: Turn -Wimplicit-function-declaration into a permerror)

2023-12-01 Thread Thomas Schwinge
Hi! On 2023-11-20T10:56:16+0100, Florian Weimer wrote: > --- a/gcc/c/c-decl.cc > +++ b/gcc/c/c-decl.cc > @@ -3515,14 +3515,14 @@ implicit_decl_warning (location_t loc, tree id, tree > olddecl) > { > gcc_rich_location richloc (loc); > richloc.add_fixit_replace (suggestion);

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

2023-12-01 Thread Hans-Peter Nilsson
> Date: Fri, 1 Dec 2023 08:09:08 -0700 > From: Jeff Law > On 11/30/23 18:08, Hans-Peter Nilsson wrote: > >> Date: Sun, 19 Nov 2023 17:47:56 -0700 > >> From: Jeff Law > > > >> Locally we have had this enabled at -O1 and above to encourage testing, > >> but I'm thinking that for the trunk enablin

Re: [PATCH] testsuite: refine gcc.dg/analyzer/fd-4.c test for newlib

2023-12-01 Thread Marc Poulhiès
Marc Poulhiès writes: > Contrary to glibc, including stdio.h from newlib defines mode_t which > conflicts with the test's type definition. > > .../gcc/testsuite/gcc.dg/analyzer/fd-4.c:19:3: error: redefinition of typedef > 'mode_t' with different type > ... > .../include/sys/types.h:189:25: no

Re: [PATCH] testsuite: require avx_runtime for some tests

2023-12-01 Thread Marc Poulhiès
Marc Poulhiès writes: > These 3 tests fails parsing the 'vect' dump when not using -mavx. Make > the dependency explicit. > > gcc/testsuite/ChangeLog: > > * gcc.dg/vect/vect-ifcvt-18.c: Add dep on avx_runtime. > * gcc.dg/vect/vect-simd-clone-16f.c: Likewise. > * gcc.dg/vect/ve

Re: [PATCH] testsuite: skip gcc.target/i386/pr106910-1.c test when using newlib

2023-12-01 Thread Marc Poulhiès
Marc Poulhiès writes: > Using newlib produces a different codegen because the support for c99 > differs (see libc_has_function hook). > > gcc/testsuite/ChangeLog: > > * gcc.target/i386/pr106910-1.c: Disable for newlib. > --- > Tested on x86_64-linux and x86_64-elf. > > OK for master? > >

Re: [PATCH] btf: fix PR debug/112656

2023-12-01 Thread David Faust
Hi Indu, On 11/30/23 14:18, Indu Bhagat wrote: > PR debug/112656 - btf: function prototypes generated with name > > With this patch, all BTF_KIND_FUNC_PROTO will appear anonymous in the > generated BTF section. > > As noted in the discussion in the bugzilla, the number of > BTF_KIND_FUNC_PROTO t

Re: [PATCH] btf: fix PR debug/112768

2023-12-01 Thread David Faust
On 11/30/23 14:17, Indu Bhagat wrote: > PR debug/112768 - btf: fix asm comment output for BTF_KIND_FUNC* kinds > > The patch adds a small function to abstract out the detail and return > the name of the type. The patch also fixes the issue of BTF_KIND_FUNC > appearing in the comments with a 'nu

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

2023-12-01 Thread Andre Vieira (lists)
On 29/11/2023 17:01, Richard Sandiford wrote: "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

Re: [PATCH v2] testsuite, arm: Fix up pr112337.c test

2023-12-01 Thread Saurabh Jha
On 12/1/2023 2:10 PM, Richard Earnshaw (lists) wrote: On 01/12/2023 13:45, Christophe Lyon wrote: On Fri, 1 Dec 2023 at 13:44, Richard Earnshaw (lists) wrote: On 01/12/2023 11:28, Saurabh Jha wrote: Hey, I introduced this test "gcc/testsuite/gcc.target/arm/mve/pr112337.c" in this commit 236

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

2023-12-01 Thread Jason Merrill
On 12/1/23 01:02, waffl3x wrote: I ran into another issue while devising tests for redeclarations of xobj member functions as static member functions and vice versa. I am pretty sure by the literal wording of the standard, this is well formed. template concept Constrain = true; struct S { vo

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

2023-12-01 Thread Wilco Dijkstra
Hi Richard, > +  rtx load[max_ops], store[max_ops]; > > Please either add a comment explaining why 40 is guaranteed to be > enough, or (my preference) use: > >  auto_vec, ...> ops; I've changed to using auto_vec since that should help reduce conflicts with Alex' LDP changes. I double-checked maxi

Re: [PATCH] extend.texi: Fix up defbuiltin* with spaces in return type

2023-12-01 Thread Sandra Loosemore
On 12/1/23 03:26, Jakub Jelinek wrote: Hi! In https://gcc.gnu.org/onlinedocs/gcc/Other-Builtins.html#index-_005f_005fbuiltin_005fstdc_005fbit_005ffloor>> I've noticed that while e.g. __builtin_stdc_bit_floor builtin is properly rendered in bold and bigger size, for the __builtin_stdc_bit_width

Re: [PATCH] testsuite: skip gcc.target/i386/pr106910-1.c test when using newlib

2023-12-01 Thread Mike Stump
On Nov 6, 2023, at 2:57 AM, Marc Poulhiès wrote: > > Using newlib produces a different codegen because the support for c99 > differs (see libc_has_function hook). > > gcc/testsuite/ChangeLog: > > * gcc.target/i386/pr106910-1.c: Disable for newlib. > --- > Tested on x86_64-linux and x86_64

Re: [PATCH] testsuite: refine gcc.dg/analyzer/fd-4.c test for newlib

2023-12-01 Thread Mike Stump
On Nov 6, 2023, at 3:01 AM, Marc Poulhiès wrote: > > Contrary to glibc, including stdio.h from newlib defines mode_t which > conflicts with the test's type definition. > > .../gcc/testsuite/gcc.dg/analyzer/fd-4.c:19:3: error: redefinition of typedef > 'mode_t' with different type > ... > .../in

[pushed] wwwdocs: conduct: Change further creativecommons.org links to https

2023-12-01 Thread Gerald Pfeifer
This feels a bit lick whack-a-mole to me, though I am hopefull to now have caught and covered all cases where your CoC pages link to addresses that permanently redirect. Famous last words. :-) (The redirect work, avoiding them primarily helps us to find "odd" cases. The extra turnaround should

[pushed] wwwdocs: benchmarks: Remove http://annwm.lbl.gov/bench/

2023-12-01 Thread Gerald Pfeifer
This has been unreachable for months (at least). If any of you is aware of some other link to add to https://gcc.gnu.org/benchmarks/ please let me know. Gerald --- htdocs/benchmarks/index.html | 7 --- 1 file changed, 7 deletions(-) diff --git a/htdocs/benchmarks/index.html b/htdocs/benchma

Re: [PATCH] c++: decltype of (non-captured variable) [PR83167]

2023-12-01 Thread Patrick Palka
On Tue, 14 Nov 2023, Jason Merrill wrote: > On 11/14/23 11:10, Patrick Palka wrote: > > Bootstrapped and regtested on x86_64-pc-linux-gnu, does this look OK for > > trunk? > > > > -- >8 -- > > > > For decltype((x)) within a lambda where x is not captured, we dubiously > > require that the lambda

Re: [PATCH] extend.texi: Fix up defbuiltin* with spaces in return type

2023-12-01 Thread Jakub Jelinek
On Fri, Dec 01, 2023 at 10:04:38AM -0700, Sandra Loosemore wrote: > Thanks, this looks good to me. I think I also noticed this weird formatting > in passing recently when I was looking for something else and did not have > time to track it down myself. There is another question. In many cases we

Re: [PATCH] testsuite: require avx_runtime for some tests

2023-12-01 Thread Mike Stump
On Nov 6, 2023, at 2:59 AM, Marc Poulhiès wrote: > > These 3 tests fails parsing the 'vect' dump when not using -mavx. Make > the dependency explicit. > > gcc/testsuite/ChangeLog: > > * gcc.dg/vect/vect-ifcvt-18.c: Add dep on avx_runtime. > * gcc.dg/vect/vect-simd-clone-16f.c: Likew

Re: [PATCH] hardcfr: make builtin_return tests more portable [PR112334]

2023-12-01 Thread Alexandre Oliva
On Dec 1, 2023, Alexandre Oliva wrote: > diff --git a/gcc/testsuite/c-c++-common/torture/harden-cfr-noret.c > b/gcc/testsuite/c-c++-common/torture/harden-cfr-noret.c > index fdd803109a4ae..8c7cc01c0ce68 100644 > --- a/gcc/testsuite/c-c++-common/torture/harden-cfr-noret.c > +++ b/gcc/testsuite/c

Re: [PATCH] extend.texi: Fix up defbuiltin* with spaces in return type

2023-12-01 Thread Sandra Loosemore
On 12/1/23 10:33, Jakub Jelinek wrote: On Fri, Dec 01, 2023 at 10:04:38AM -0700, Sandra Loosemore wrote: Thanks, this looks good to me. I think I also noticed this weird formatting in passing recently when I was looking for something else and did not have time to track it down myself. There i

Re: [PATCH] libgccjit: Add support for the type bfloat16

2023-12-01 Thread David Malcolm
On Thu, 2023-11-16 at 17:20 -0500, Antoni Boucher wrote: > I forgot to attach the patch. > > On Thu, 2023-11-16 at 17:19 -0500, Antoni Boucher wrote: > > Hi. > > This patch adds the support for the type bfloat16 (bug 112574). > > > > This was asked to be splitted from a another patch sent here: >

Re: [PATCH] libgccjit: Fix GGC segfault when using -flto

2023-12-01 Thread David Malcolm
On Thu, 2023-11-30 at 17:13 -0500, Antoni Boucher wrote: > Here's the updated patch. > The failure was due to the test being in the test array while it > should > not have been there since it changes the context. Thanks for the updated patch. Did you do a full bootstrap and regression test with t

ping: [PATCH v5] libstdc++: Remove UB from month and weekday additions and subtractions.

2023-12-01 Thread Cassio Neri
ping. On Sat, 25 Nov 2023 at 13:52, Cassio Neri wrote: > The following invoke signed integer overflow (UB) [1]: > > month + months{MAX} // where MAX is the maximum value of months::rep > month + months{MIN} // where MIN is the maximum value of months::rep > month - months{MIN} // whe

[pushed][PR112445][LRA]: Fix "unable to find a register to spill" error

2023-12-01 Thread Vladimir Makarov
The following patch fixes https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112445 The patch was successfully bootstrapped and tested on x86-64, aarch64, ppc64le. commit 1390bf52c17a71834a1766c0222e4f8a74efb162 Author: Vladimir N. Makarov Date: Fri Dec 1 11:46:37 2023 -0500 [PR112445][LRA]:

Re: [pushed] c++: remove LAMBDA_EXPR_MUTABLE_P

2023-12-01 Thread Patrick Palka
On Thu, 30 Nov 2023, Jason Merrill wrote: > 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 re

  1   2   >