[PATCH] RISC-V: Disallow poly (1,1) VLA SLP interleave vectorization

2023-11-28 Thread Juzhe-Zhong
This patch fixes all following ICE in zve64d: FAIL: gcc.dg/vect/pr71259.c -flto -ffat-lto-objects (internal compiler error: in SET_TYPE_VECTOR_SUBPARTS, at tree.h:4248) FAIL: gcc.dg/vect/pr71259.c -flto -ffat-lto-objects (test for excess errors) FAIL: gcc.dg/vect/vect-alias-check-14.c (internal c

Re: [PATCH] tree-sra: Avoid returns of references to SRA candidates

2023-11-28 Thread Richard Biener
On Mon, 27 Nov 2023, Martin Jambor wrote: > Hi, > > The enhancement to address PR 109849 contained an importsnt thinko, > and that any reference that is passed to a function and does not > escape, must also not happen to be aliased by the return value of the > function. This has quickly transpir

Re: [PATCH v6 0/21]middle-end: Support early break/return auto-vectorization

2023-11-28 Thread Richard Biener
On Mon, 27 Nov 2023, Richard Sandiford wrote: > Catching up on backlog, so this might already be resolved, but: > > Richard Biener writes: > > On Tue, 7 Nov 2023, Tamar Christina wrote: > > > >> > -Original Message- > >> > From: Richard Biener > >> > Sent: Tuesday, November 7, 2023 9:43

[PATCH] c++: Fix up __has_extension (cxx_init_captures)

2023-11-28 Thread Jakub Jelinek
On Mon, Nov 27, 2023 at 10:58:04AM +, Alex Coplan wrote: > Many thanks both for the reviews, this is now pushed (with Jason's > above changes implemented) as g:06280a906cb3dc80cf5e07cf3335b758848d488d. The new test FAILs everywhere with GXX_TESTSUITE_STDS=98,11,14,17,20,2b I'm normally using f

[pushed] analyzer: install header files for use by plugins [PR109077]

2023-11-28 Thread David Malcolm
PLUGIN_ANALYZER_INIT was added in r11-5583-g66dde7bc64b75d, but we haven't been installing the analyzer's headers files. Fixed thusly. Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu. I compared the before/after results of "make install" and confirmed that it now installs the analyz

[PATCH] match.pd: Fix popcount (X) + popcount (Y) simplification [PR112719]

2023-11-28 Thread Jakub Jelinek
Hi! Since my PR112566 r14-5557 changes the following testcase ICEs, because .POPCOUNT (x) + .POPCOUNT (y) has a simplification attempted even when x and y have incompatible types (different precisions). Note, with _BitInt it can ICE already starting with r14-5435 and I think as a latent problem it

[PATCH] match.pd: Fix parity (X) ^ parity (Y) simplification [PR112719]

2023-11-28 Thread Jakub Jelinek
Hi! When looking around, I've noticed we have a similar simplification for parity (with ^ rather than +). Note, unlike the popcount one, this one doesn't check for INTEGRAL_TYPE_P (type) (which rules out vector simplification), so I've used the old handling for types_match and otherwise do it onl

Re: PR111754

2023-11-28 Thread Jakub Jelinek
On Tue, Nov 28, 2023 at 03:56:47PM +0800, juzhe.zh...@rivai.ai wrote: > Hi, there is a regression in RISC-V caused by this patch: > > FAIL: gcc.dg/vect/pr111754.c -flto -ffat-lto-objects scan-tree-dump > optimized "return { 0.0, 9.0e\\+0, 0.0, 0.0 }" > FAIL: gcc.dg/vect/pr111754.c scan-tree-dump

Re: [PATCH v2] ifcvt: Handle multiple rewired regs and refactor noce_convert_multiple_sets

2023-11-28 Thread Manolis Tsamis
On Thu, Nov 23, 2023 at 11:01 PM Richard Sandiford wrote: > > Manolis Tsamis writes: > > The existing implementation of need_cmov_or_rewire and > > noce_convert_multiple_sets_1 assumes that sets are either REG or SUBREG. > > This commit enchances them so they can handle/rewire arbitrary set > >

[PATCH] testsuite: Fix up pr111754.c test

2023-11-28 Thread Jakub Jelinek
On Tue, Nov 28, 2023 at 09:43:52AM +0100, Jakub Jelinek wrote: > On Tue, Nov 28, 2023 at 03:56:47PM +0800, juzhe.zh...@rivai.ai wrote: > > Hi, there is a regression in RISC-V caused by this patch: > > > > FAIL: gcc.dg/vect/pr111754.c -flto -ffat-lto-objects scan-tree-dump > > optimized "return {

Re: [PATCH] match.pd: Fix popcount (X) + popcount (Y) simplification [PR112719]

2023-11-28 Thread Richard Biener
> Am 28.11.2023 um 09:30 schrieb Jakub Jelinek : > > Hi! > > Since my PR112566 r14-5557 changes the following testcase ICEs, because > .POPCOUNT (x) + .POPCOUNT (y) has a simplification attempted even when > x and y have incompatible types (different precisions). > Note, with _BitInt it can I

Re: [PATCH] match.pd: Fix parity (X) ^ parity (Y) simplification [PR112719]

2023-11-28 Thread Richard Biener
> Am 28.11.2023 um 09:36 schrieb Jakub Jelinek : > > Hi! > > When looking around, I've noticed we have a similar simplification > for parity (with ^ rather than +). Note, unlike the popcount one, > this one doesn't check for INTEGRAL_TYPE_P (type) (which rules out > vector simplification), s

Re: [PATCH] testsuite: Fix up pr111754.c test

2023-11-28 Thread Richard Biener
> Am 28.11.2023 um 09:58 schrieb Jakub Jelinek : > > On Tue, Nov 28, 2023 at 09:43:52AM +0100, Jakub Jelinek wrote: >>> On Tue, Nov 28, 2023 at 03:56:47PM +0800, juzhe.zh...@rivai.ai wrote: >>> Hi, there is a regression in RISC-V caused by this patch: >>> >>> FAIL: gcc.dg/vect/pr111754.c -flt

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

2023-11-28 Thread Kewen.Lin
Hi Mike, on 2023/11/28 12:34, Michael Meissner wrote: > On Fri, Nov 24, 2023 at 05:31:20PM +0800, 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

Re: [PATCH] RISC-V: Disallow poly (1,1) VLA SLP interleave vectorization

2023-11-28 Thread Robin Dapp
LGTM. That one is easy to revert (as opposed to changing all modes). Regards Robin

[COMMITTED] ada: Fix predicate failure that occurred in a test case

2023-11-28 Thread Marc Poulhiès
From: Tucker Taft The CodePeer test case illustrating a problem where a "high" precondition failure was expected, died in the GNAT FE on input_reading.adb. The problem was in Check_SCIL, where it didn't properly handle a discriminant_specification. gcc/ada/ * sem_scil.adb: Handle discr

[COMMITTED] ada: Remove dependency on System.Val_Bool in System.Img_Bool

2023-11-28 Thread Marc Poulhiès
From: Yannick Moy In order to facilitate the certification of System.Img_Bool, remove its dependency on unit System.Val_Bool. Modify the definition of ghost function Is_Boolean_Image_Ghost to take the expected boolean value and move it to System.Val_Spec. gcc/ada/ * libgnat/s-imgboo.adb

[COMMITTED] ada: Handle unchecked conversion in bound

2023-11-28 Thread Marc Poulhiès
From: Richard Kenner Look through both unchecked and normal conversions when seeing if any part of a bound is uplevel. gcc/ada/ * exp_unst.adb (Note_Uplevel_Bound): Treat N_Unchecked_Type_Conversion like N_Type_Conversion. Tested on x86_64-pc-linux-gnu, committed on master. --

[COMMITTED] ada: Fix internal error on declare expression in expression function

2023-11-28 Thread Marc Poulhiès
From: Eric Botcazou When the expression function is not a completion, its (return) expression does not cause freezing so analyzing the declare expression in this context must not freeze the type of the object. The change also contains another fix, which makes it so that the compiler does not eva

[COMMITTED] ada: Type error on container aggregate with loop_parameter_specification

2023-11-28 Thread Marc Poulhiès
From: Gary Dismukes The compiler incorrectly reported a type error on a container aggregate for a Vector type with a loop_parameter_specification specifying a nonstatic upper bound, complaining that it expected the Vector index type, but instead found type Count_Type. The expansion of the aggrega

[COMMITTED] ada: Add new predicate Is_Address_Compatible_Type

2023-11-28 Thread Marc Poulhiès
From: Sebastian Poeplau When emitting code for architectures with tagged pointers, it is useful to be able to recognize values representing addresses because they require special handling. This commits adds the predicate Is_Address_Compatible_Type, which differs from the node attribute Is_Descend

[COMMITTED] ada: Fix premature finalization for nested return within extended one

2023-11-28 Thread Marc Poulhiès
From: Eric Botcazou The return object is incorrectly finalized when the nested return is taken, because the special flag attached to the return object is not updated. gcc/ada/ * exp_ch6.adb (Build_Flag_For_Function): New function made up of the code building the special flag for

[COMMITTED] ada: Further cleanup in finalization machinery

2023-11-28 Thread Marc Poulhiès
From: Eric Botcazou When transient scopes are being materialized, they can give rise to a block created around the construct being wrapped or not, depending on the kind of construct. In both cases finalization actions for the transient objects of the scope are generated the same way, with normal

[COMMITTED] ada: Fix incorrect quoting in documentation

2023-11-28 Thread Marc Poulhiès
From: Eric Botcazou gcc/ada/ * doc/gnat_rm/the_implementation_of_standard_i_o.rst: Fix a couple occurrences of incorrect quoting. * gnat_rm.texi: Regenerate. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/doc/gnat_rm/the_implementation_of_standard_i_o.

[COMMITTED] ada: Errors on instance of Multiway_Trees with discriminated type

2023-11-28 Thread Marc Poulhiès
From: Gary Dismukes The compiler may report various type conflicts on an instantiation of the generic package Ada.Containers.Multiway_Trees with an actual for Element_Type that is a nonprivate actual type with discriminants that has a discriminant-dependent component of a private type (such as a

[COMMITTED] ada: Error compiling reduction expression with overloaded reducer subprogram

2023-11-28 Thread Marc Poulhiès
From: Steve Baird In some cases involving a reduction expression with an overloaded reducer subprogram, the accumulator type is not determined correctly. This can lead to spurious compile-time errors. gcc/ada/ * exp_attr.adb (Expand_N_Attribute_Reference): In the case of a Reduc

[COMMITTED] ada: False alarms from -gnatw.t with generic functions

2023-11-28 Thread Marc Poulhiès
From: Bob Duff Disable the warnings generated by -gnatw.t on instances. Otherwise, we get false positives. gcc/ada/ * sem_util.adb (Check_Result_And_Post_State): Disable this when we're in an instance. Misc cleanup. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/

[COMMITTED] ada: Add comment for assertion

2023-11-28 Thread Marc Poulhiès
Add possible cause for a failed assertion. gcc/ada/ * gcc-interface/utils2.cc (build_simple_component_ref): Add comment on assertion. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/gcc-interface/utils2.cc | 5 - 1 file changed, 4 insertions(+), 1 deletion(-

[COMMITTED] ada: Fix wrong size value output with -gnatR -gnatc

2023-11-28 Thread Marc Poulhiès
From: Eric Botcazou This happens when a parameter is involved in the computation. gcc/ada/ * gcc-interface/decl.cc (annotate_value): Apply the same processing for parameters as for variables. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/gcc-interface/decl.c

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

2023-11-28 Thread Kewen.Lin
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: operand out of domain (11 is not a multiple of 2)

Re: [PATCH v7] Implement new RTL optimizations pass: fold-mem-offsets.

2023-11-28 Thread Manolis Tsamis
Hi Jakub, Thanks a lot for tracking this down and providing both testcases and a fix. Some thoughts below. On Mon, Nov 27, 2023 at 10:52 PM Jakub Jelinek wrote: > > On Mon, Oct 16, 2023 at 01:11:01PM -0600, Jeff Law wrote: > > > gcc/ChangeLog: > > > > > > * Makefile.in: Add fold-mem-offsets.

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

2023-11-28 Thread waffl3x
This fixes the const bug. I haven't bootstrapped and tested beyond my own tests yet but this does it. I don't know if this is the right way to fix this yet, but I think it's pretty close. I'll see if I can make a better write up tomorrow, but it seems to me that since we never cared about substitut

Re: [PATCH] Expand: Pass down equality only flag to cmpmem expand

2023-11-28 Thread Kewen.Lin
Hi Haochen, on 2023/11/28 15:43, HAO CHEN GUI wrote: > Hi, > This patch passes down the equality only flags from > emit_block_cmp_hints to cmpmem optab so that the target specific expand > can generate optimized insns for equality only compare. Targets > (e.g. rs6000) can generate more efficient

[PATCH] [ifcvt][V2] optimize x=c ? (y and z) : y, where z is a reg or imm

2023-11-28 Thread Fei Gao
Take the following case for example. CFLAGS: -march=rv64gc_zbb_zicond -mabi=lp64d -O2 long test_AND_ceqz (long x, long y, long z, long c) { if (c) x = y & z; else x = y; return x; } Before patch: and a2,a1,a2 czero.eqz a0,a2,a3 czero.nez a3,

Re: [PATCH v2] ifcvt: Handle multiple rewired regs and refactor noce_convert_multiple_sets

2023-11-28 Thread Richard Sandiford
Manolis Tsamis writes: > On Thu, Nov 23, 2023 at 11:01 PM Richard Sandiford > wrote: >> >> Manolis Tsamis writes: >> > The existing implementation of need_cmov_or_rewire and >> > noce_convert_multiple_sets_1 assumes that sets are either REG or SUBREG. >> > This commit enchances them so they can

Re: [PATCH] [ifcvt][V2] optimize x=c ? (y and z) : y, where z is a reg or imm

2023-11-28 Thread Fei Gao
hi  Jeff and Kito Please be noted this patch is based on https://www.mail-archive.com/gcc-patches@gcc.gnu.org/msg327149.html [PATCH 3/4] [ifcvt] optimize x=c ? (y op const_int) : y by RISC-V Zicond like insns Thanks & BR, Fei On 2023-11-28 18:10  Fei Gao wrote: > >Take the following case for e

Re: [PATCH][RFC] middle-end/110237 - wrong MEM_ATTRs for partial loads/stores

2023-11-28 Thread Richard Sandiford
Richard Biener writes: > On Mon, 27 Nov 2023, Jeff Law wrote: > >> >> >> On 11/27/23 05:39, Robin Dapp wrote: >> >> The easiest way to avoid running into the alias analysis problem is >> >> to scrap the MEM_EXPR when we expand the internal functions for >> >> partial loads/stores. That avoids t

Re: [PATCH v2] ifcvt: Handle multiple rewired regs and refactor noce_convert_multiple_sets

2023-11-28 Thread Manolis Tsamis
On Tue, Nov 28, 2023 at 12:12 PM Richard Sandiford wrote: > > Manolis Tsamis writes: > > On Thu, Nov 23, 2023 at 11:01 PM Richard Sandiford > > wrote: > >> > >> Manolis Tsamis writes: > >> > The existing implementation of need_cmov_or_rewire and > >> > noce_convert_multiple_sets_1 assumes that

Re: [PATCH]middle-end: prevent LIM from hoising vector compares from gconds if target does not support it.

2023-11-28 Thread Richard Biener
On Mon, 27 Nov 2023, Tamar Christina wrote: > Hi All, > > LIM notices that in some cases the condition and the results are loop > invariant and tries to move them out of the loop. > > While the resulting code is operationally sound, moving the compare out of the > gcond results in generating cod

Re: [PATCH 3/4] c23: aliasing of compatible tagged types

2023-11-28 Thread Richard Biener
On Tue, 28 Nov 2023, Joseph Myers wrote: > On Sun, 26 Nov 2023, Martin Uecker wrote: > > > My understand is that it is used for aliasing analysis and also > > checking of conversions. TYPE_CANONICAL must be consistent with > > the idea the middle-end has about type conversions. But as long > >

Re: [PATCH V2] introduce light expander sra

2023-11-28 Thread Richard Biener
On Tue, 28 Nov 2023, Jiufu Guo wrote: > > Hi, > > Thanks so much for your helpful review! > > Richard Biener writes: > > > On Fri, Oct 27, 2023 at 3:51?AM Jiufu Guo wrote: > >> > >> Hi, > >> > >> Compare with previous version: > >> https://gcc.gnu.org/pipermail/gcc-patches/2023-October/63239

Re: [PATCH v7] Implement new RTL optimizations pass: fold-mem-offsets.

2023-11-28 Thread Jakub Jelinek
On Tue, Nov 28, 2023 at 11:45:58AM +0200, Manolis Tsamis wrote: > > But, while get_single_def_in_bb checks for > > if (DF_INSN_LUID (def) > DF_INSN_LUID (insn)) > > return NULL; > > (OT, why not DF_INSN_INFO_LUID (DF_REF_INSN_INFO (ref_chain->ref)) > > instead of DF_INSN_LUID (def), then it d

Re: [PATCH][RFC] middle-end/110237 - wrong MEM_ATTRs for partial loads/stores

2023-11-28 Thread Richard Biener
On Tue, 28 Nov 2023, Richard Sandiford wrote: > Richard Biener writes: > > On Mon, 27 Nov 2023, Jeff Law wrote: > > > >> > >> > >> On 11/27/23 05:39, Robin Dapp wrote: > >> >> The easiest way to avoid running into the alias analysis problem is > >> >> to scrap the MEM_EXPR when we expand the in

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

2023-11-28 Thread Richard Sandiford
Philipp Tomsich writes: > This patch adds initial support for Ampere-1B core. > > The Ampere-1B core implements ARMv8.7 with the following (compiler > visible) extensions: > - CSSC (Common Short Sequence Compression instructions), > - MTE (Memory Tagging Extension) > - SM3/SM4 > > gcc/ChangeLog

[Patch] OpenMP: Support acquires/release in 'omp require atomic_default_mem_order'

2023-11-28 Thread Tobias Burnus
I stumbled over this omission when looking at Sandra's patch. It turned out that this is a new OpenMP 5.2 feature - probably added to simplify/unify the syntax. I guess the reason that release/acquire wasn't added before is that it cannot be universally be used - read/write do only accept one o

Re: [PATCH][RFC] middle-end/110237 - wrong MEM_ATTRs for partial loads/stores

2023-11-28 Thread Richard Sandiford
Richard Biener writes: > On Tue, 28 Nov 2023, Richard Sandiford wrote: > >> Richard Biener writes: >> > On Mon, 27 Nov 2023, Jeff Law wrote: >> > >> >> >> >> >> >> On 11/27/23 05:39, Robin Dapp wrote: >> >> >> The easiest way to avoid running into the alias analysis problem is >> >> >> to scrap

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

2023-11-28 Thread Philipp Tomsich
On Tue, 28 Nov 2023 at 12:21, Richard Sandiford wrote: > > Philipp Tomsich writes: > > This patch adds initial support for Ampere-1B core. > > > > The Ampere-1B core implements ARMv8.7 with the following (compiler > > visible) extensions: > > - CSSC (Common Short Sequence Compression instruction

Re: [PATCH 3/4] c23: aliasing of compatible tagged types

2023-11-28 Thread Martin Uecker
Am Dienstag, dem 28.11.2023 um 10:47 + schrieb Richard Biener: > On Tue, 28 Nov 2023, Joseph Myers wrote: > > > On Sun, 26 Nov 2023, Martin Uecker wrote: > > > > > > > I also think more rationale is needed for ignoring sizes like this. Is > > > > it > > > > intended for e.g. making struc

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

2023-11-28 Thread Richard Sandiford
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 Ampere-1B core implements ARMv8.7 with the following (compiler >> > visible) extensions: >> > - CSSC (Common Sh

Re: [PATCH] Emit funcall external declarations only if actually used.

2023-11-28 Thread Richard Sandiford
"Jose E. Marchesi" writes: > There are many places in GCC where alternative local sequences are > tried in order to determine what is the cheapest or best alternative > to use in the current target. When any of these sequences involve a > libcall, the current implementation of emit_library_call_v

Re: [PATCH] Fix PR ada/111909 On Darwin, determine filesystem case sensitivity at runtime

2023-11-28 Thread Simon Wright
> On 22 Nov 2023, at 15:13, Simon Wright wrote: > > > >> On 22 Nov 2023, at 15:03, Iain Sandoe wrote: >> >> >> >>> On 22 Nov 2023, at 14:48, Iain Sandoe wrote: >>> >>> >>> On 22 Nov 2023, at 13:55, Arnaud Charlet wrote: >>> #if defined (__APPLE__) >>> -#include >>

Re: [PATCH][RFC] middle-end/110237 - wrong MEM_ATTRs for partial loads/stores

2023-11-28 Thread Richard Biener
On Tue, 28 Nov 2023, Richard Sandiford wrote: > Richard Biener writes: > > On Tue, 28 Nov 2023, Richard Sandiford wrote: > > > >> Richard Biener writes: > >> > On Mon, 27 Nov 2023, Jeff Law wrote: > >> > > >> >> > >> >> > >> >> On 11/27/23 05:39, Robin Dapp wrote: > >> >> >> The easiest way to

Re: [PATCH v7] Implement new RTL optimizations pass: fold-mem-offsets.

2023-11-28 Thread Manolis Tsamis
On Tue, Nov 28, 2023 at 12:53 PM Jakub Jelinek wrote: > > On Tue, Nov 28, 2023 at 11:45:58AM +0200, Manolis Tsamis wrote: > > > But, while get_single_def_in_bb checks for > > > if (DF_INSN_LUID (def) > DF_INSN_LUID (insn)) > > > return NULL; > > > (OT, why not DF_INSN_INFO_LUID (DF_REF_INSN_

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

2023-11-28 Thread Rainer Orth
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 to check for the prerequisite

[committed] libiberty: Use x86 HW optimized sha1

2023-11-28 Thread Jakub Jelinek
Hi! Nick has approved this patch (+ small ld change to use it for --build-id=), so I'm commiting it to GCC as master as well. If anyone from ARM would be willing to implement it similarly with vsha1{cq,mq,pq,h,su0q,su1q}_u32 intrinsics, it could be a useful linker speedup on those hosts as well,

Re: [PATCH] bpf: Delayed the removal of the parser enum plugin handler.

2023-11-28 Thread Cupertino Miranda
Thanks!! Commited ! David Faust writes: > On 11/13/23 14:35, Cupertino Miranda wrote: >> The parser plugin handler that is responsible for collecting enum values >> information was being removed way too early. >> bpf_resolve_overloaded_core_builtin is called by the parser. >> It was moved to th

Re: [PATCH] bpf: Corrected condition in core_mark_as_access_index.

2023-11-28 Thread Cupertino Miranda
Thanks! Committed ! David Faust writes: > On 11/13/23 14:36, Cupertino Miranda wrote: >> gcc/ChangeLog: >> * config/bpf/core-builtins.cc (core_mark_as_access_index): >> Corrected check. > > OK, thanks. > >> --- >> gcc/config/bpf/core-builtins.cc | 2 +- >> 1 file changed, 1 insertion

[committed] libstdc++: Fix typo in comment

2023-11-28 Thread Jonathan Wakely
Tested x86_64-linux. Pushed to trunk. -- >8 -- libstdc++-v3/ChangeLog: * include/bits/stl_uninitialized.h: Fix typo in comment. --- libstdc++-v3/include/bits/stl_uninitialized.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libstdc++-v3/include/bits/stl_uninitializ

[committed] libstdc++: Include in

2023-11-28 Thread Jonathan Wakely
Tested x86_64-linux. Pushed to trunk. Backports to follow. -- >8 -- This is needed in order to compile it as a header-unit, which might be desired because it's included by both and . libstdc++-v3/ChangeLog: * include/bits/atomic_wait.h: Include . --- libstdc++-v3/include/bits/atomic_w

Re: [PATCH] bpf: Forces __buildin_memcmp not to generate a call upto 1024 bytes.

2023-11-28 Thread Cupertino Miranda
Thanks! Committed ! Jose E. Marchesi writes: > Hi Cuper. > > Sorry, I missed this patch last week. > This is OK. > > Thanks! > >> This patch forces __builtin_memcmp calls upto data sizes of 1024 to >> become inline in caller. >> This is a requirement by BPF and it mimics the default behaviour o

[PING 2][PATCH v3] rs6000/p8swap: Fix incorrect lane extraction by vec_extract() [PR106770]

2023-11-28 Thread Surya Kumari Jangala
Ping On 10/11/23 12:27 pm, Surya Kumari Jangala wrote: > Ping > > On 03/11/23 1:14 pm, Surya Kumari Jangala wrote: >> Hi Segher, >> I have incorporated changes in the code as per the review comments provided >> by you >> for version 2 of the patch. Please review. >> >> Regards, >> Surya >> >> >

Re: [PATCH] bpf: Forces __buildin_memcmp not to generate a call upto 1024 bytes.

2023-11-28 Thread Cupertino Miranda
Thanks! Committed! Jose E. Marchesi writes: > Hi Cuper. > > Sorry, I missed this patch last week. > This is OK. > > Thanks! > >> This patch forces __builtin_memcmp calls upto data sizes of 1024 to >> become inline in caller. >> This is a requirement by BPF and it mimics the default behaviour of

[COMMITTED] testsuite: Fix gcc.dg/pr111409.c on Solaris/SPARC with as

2023-11-28 Thread Rainer Orth
gcc.dg/pr111409.c FAILs on Solaris/SPARC with the native as: FAIL: gcc.dg/pr111409.c scan-assembler-times .sections+.debug_macro 1 Unlike most other ELF targets, that assembler requires the section name to be double-quoted. This patch allows for that. It also expects \t to separate .section

Re: [PATCH v2] Fixed problem with BTF defining smaller enums.

2023-11-28 Thread Cupertino Miranda
Thanks! Committed! David Faust writes: > Hi Cupertino, > > On 11/27/23 09:21, Cupertino Miranda wrote: >> Hi everyone, >> >> David: Thanks for the v1 review. >> >> This version adds the following; >> - test case, >> - improves condition logic, >> - fixes mask typo. >> >> Looking forward to y

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

2023-11-28 Thread Joern Rennecke
On Mon, 27 Nov 2023 at 20:03, Richard Sandiford wrote: > > Joern Rennecke writes: > > On 11/20/23 11:26, Richard Sandiford wrote: > >>> + /* ?!? What is the point of this adjustment to DST_MASK? */ > >>> + if (code == PLUS || code == MINUS > >>> + || code == MULT || code == ASHIFT) >

Re: [PATCH] libsanitizer: Check assembler support for symbol assignment [PR112563]

2023-11-28 Thread Rainer Orth
Hi Jakub, >>> But will they accept a patch to check a macro never set anywhere in and >>> irrelevant to LLVM? That's why I kept all in one patch, to be GCC-local. >> >> I meant the patch would be gcc local. >> But, for later we need only the changes to the imported files be in one >> commit, not

[PATCH v3 1/3] RISC-V: Add support for XCVelw extension in CV32E40P

2023-11-28 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/ChangeLog: * common/config/

[PATCH v3 0/3] RISC-V: Support CORE-V XCVELW and XCVBI extensions

2023-11-28 Thread Mary Bennett
v1 -> v2: * Bring the MEM into the operand for cv.elw. The new predicate is move_operand. * Add comment to riscv.md detailing why corev.md must appear before the generic riscv instructions. v2 -> v3: * Merged patterns for CORE-V branch immediate and generic RISC-V so to supress t

[PATCH v3 2/3] RISC-V: Update XCValu constraints to match other vendors

2023-11-28 Thread Mary Bennett
gcc/ChangeLog: * config/riscv/constraints.md: CVP2 -> CV_alu_pow2. * config/riscv/corev.md: Likewise. --- gcc/config/riscv/constraints.md | 15 --- gcc/config/riscv/corev.md | 4 ++-- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/gcc/config/risc

[PATCH v3 3/3] RISC-V: Add support for XCVbi extension in CV32E40P

2023-11-28 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/ChangeLog: * common/config/

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

2023-11-28 Thread Manos Anagnostakis
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 transform cases like str d5, [sp, #320] fmul d

[PATCH] testsuite: Handle double-quoted LTO section names [PR112728]

2023-11-28 Thread Rainer Orth
The gcc.dg/scantest-lto.c test FAILs on Solaris/SPARC with the native as: FAIL: gcc.dg/scantest-lto.c scan-assembler-not ascii FAIL: gcc.dg/scantest-lto.c scan-assembler-times ascii 0 It requires double-quoting the section name which scanasm.exp doesn't allow for. This patch fixes that. Tested

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

2023-11-28 Thread Joern Rennecke
On Mon, 27 Nov 2023 at 20:18, Jeff Law wrote: > > > > On 11/27/23 13:03, Richard Sandiford wrote: > > Joern Rennecke writes: > >> On 11/20/23 11:26, Richard Sandiford wrote: > + /* ?!? What is the point of this adjustment to DST_MASK? */ > + if (code == PLUS || code == MINU

Re: [PATCH] libsanitizer: Check assembler support for symbol assignment [PR112563]

2023-11-28 Thread Jakub Jelinek
On Tue, Nov 28, 2023 at 02:16:11PM +0100, Rainer Orth wrote: > Hi Jakub, > > >>> But will they accept a patch to check a macro never set anywhere in and > >>> irrelevant to LLVM? That's why I kept all in one patch, to be GCC-local. > >> > >> I meant the patch would be gcc local. > >> But, for lat

[PATCH] [i386] Fix push2pop2 test fail on non-linux target [PR112729]

2023-11-28 Thread Hongyu Wang
Hi, On linux x86-64, -fomit-frame-pointer was by default enabled so the push2pop2 tests cfi scans are based on it. On other target with -fno-omit-frame-pointer the cfi scan will be wrong as the frame pointer is pushed at first. Add -fomit-frame-pointer to these tests that related to cfi scan. OK

Re: [PATCH] Fix PR ada/111909 On Darwin, determine filesystem case sensitivity at runtime

2023-11-28 Thread Marc Poulhiès
Simon Wright writes: > gcc/ada/Changelog: > > 2023-11-22 Simon Wright > > PR ada/111909 > > Can we commit this one now, please? Hello Simon, Yes we can commit this one, as both Iain and Arnaud ACKed it. I'll create a proper commit with the change and the fixed commit log and merge it. Th

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

2023-11-28 Thread Joern Rennecke
On Tue, 28 Nov 2023 at 13:36, Joern Rennecke wrote: > For the saturating truncation operations, we have the high-to-low propagation, > but no low-to-high propagation, so that would be something separate to model. P.S.: For unsigned saturating truncation, the propagation from higher to lower bits

Re: [PATCH v2] Fortran: fix reallocation on assignment of polymorphic variables [PR110415]

2023-11-28 Thread Tobias Burnus
Hi Andrew, On 27.11.23 18:35, Andrew Jenner wrote: This is the second version of the patch - previous discussion at: https://gcc.gnu.org/pipermail/gcc-patches/2023-November/636671.html This patch adds the testcase from PR110415 and fixes the bug. The problem is that in a couple of places in tr

Re: [PATCH][RFC] middle-end/110237 - wrong MEM_ATTRs for partial loads/stores

2023-11-28 Thread Jeff Law
On 11/28/23 00:50, Richard Biener wrote: There's no way to distinguish a partial vs. non-partial MEM on RTL and while without the bogus MEM_ATTR the alias oracle pieces that miscompiled the original case are fended off we still see the load/store as full given they have a mode with a size -

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

2023-11-28 Thread Andrew Stubbs
On 28/11/2023 06:06, Jeff Law wrote: - Verify we have a SUBREG before looking at SUBREG_BYTE. The amdgcn ICE I reported still exists: conftest.c:16:1: internal compiler error: RTL check: expected code 'subreg', have 'reg' in ext_dce_process_uses, at ext-dce.cc:417 16 | } | ^ 0x8c7b2

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

2023-11-28 Thread Rainer Orth
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 ia32. It also fails on some (but not all) arm-eabi >> > variants. It seems hard

Re: [PATCH] Emit funcall external declarations only if actually used.

2023-11-28 Thread Jose E. Marchesi
> "Jose E. Marchesi" writes: >> There are many places in GCC where alternative local sequences are >> tried in order to determine what is the cheapest or best alternative >> to use in the current target. When any of these sequences involve a >> libcall, the current implementation of emit_librar

[PATCH] [GCC] match.pd: Simplify rule for bitwise not with casts

2023-11-28 Thread Ezra.Sitorus
From: Ezra Sitorus Add the transform rule (T)(~A) -> ~(T)(A) for view_convert. The simplified result could be a single assembly instruction when chained with other instructions. gcc/ChangeLog: * match.pd: Add new transform rule. * testsuite/gcc.target/aarch64/advsimd-intrinsic

Re: bpf: Throw error when external libcalls are generated.

2023-11-28 Thread Jose E. Marchesi
> Hi Cuper. > OK. Thanks for the patch. This commit is breaking the BPF build, because libgcc emits libcalls to __builtin_abort. We need to rethink this. Please revert: commit faf5b148588bd7fbb60ec669aefa704044037cdc Author: Cupertino Miranda Date: Thu Nov 23 22:28:01 2023 + Tha

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

2023-11-28 Thread Michael Meissner
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 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 e

Re: bpf: Throw error when external libcalls are generated.

2023-11-28 Thread Cupertino Miranda
Reverted! Apologies for the mistake. Jose E. Marchesi writes: >> Hi Cuper. >> OK. Thanks for the patch. > > This commit is breaking the BPF build, because libgcc emits libcalls to > __builtin_abort. We need to rethink this. > > Please revert: > > commit faf5b148588bd7fbb60ec669aefa704044037c

[PATCH v2 2/5] aarch64: Add support for GCS system registers with the +gcs modifier

2023-11-28 Thread Victor Do Nascimento
Given the introduction of system registers associated with the Guarded Control Stack extension to Armv9.4-a in Binutils and their reliance on the `+gcs' modifier, we implement the necessary changes in GCC to allow for them to be recognized by the compiler. gcc/ChangeLog: * config/aarch64/

[PATCH v2 0/5] aarch64: Add Armv9.4-a 128-bit system-register read/write support

2023-11-28 Thread Victor Do Nascimento
Changes from v1 - https://gcc.gnu.org/pipermail/gcc-patches/2023-November/635531.html * [PATCH 4/5] - For `error_at' message, put feature name in quotes. * [PATCH 4/5] - For `aarch64_retrieve_sysreg' function, add description of new parameter to comments. * [PATCH 5/5] - Reduce the minimum

[PATCH v2 5/5] aarch64: Add rsr128 and wsr128 ACLE tests

2023-11-28 Thread Victor Do Nascimento
Extend existing unit tests for the ACLE system register manipulation functions to include 128-bit tests. gcc/testsuite/ChangeLog: * gcc/testsuite/gcc.target/aarch64/acle/rwsr.c (get_rsr128): New. (set_wsr128): Likewise. --- gcc/testsuite/gcc.target/aarch64/acle/rwsr.c | 32 ++

[PATCH v2 4/5] aarch64: Implement 128-bit extension to ACLE sysreg r/w builtins

2023-11-28 Thread Victor Do Nascimento
Implement the ACLE builtins for 128-bit system register manipulation: * __uint128_t __arm_rsr128(const char *special_register); * void __arm_wsr128(const char *special_register, __uint128_t value); gcc/ChangeLog: * config/aarch64/aarch64-builtins.cc (AARCH64_RSR128): New `enu

[PATCH v2 1/5] aarch64: Add march flags for +the and +d128 arch extensions

2023-11-28 Thread Victor Do Nascimento
Given the introduction of optional 128-bit page table descriptor and translation hardening extension support with the Arm9.4-a architecture, this introduces the relevant flags to enable the reading and writing of 128-bit system registers. The `+d128' -march modifier enables the use of the followin

[PATCH v2 3/5] aarch64: Sync `aarch64-sys-regs.def' with Binutils.

2023-11-28 Thread Victor Do Nascimento
This patch updates `aarch64-sys-regs.def', bringing it into sync with the Binutils source. gcc/ChangeLog: * config/aarch64/aarch64-sys-regs.def (par_el1): New. (rcwmask_el1): Likewise. (rcwsmask_el1): Likewise. (ttbr0_el1): Likewise. (ttbr0_el12): Likewise.

[PATCH] middle-end/112732 - stray TYPE_ALIAS_SET in type variant

2023-11-28 Thread Richard Biener
The following fixes a stray TYPE_ALIAS_SET in a type variant built by build_opaque_vector_type which is diagnosed by type checking enabled with -flto. Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed. PR middle-end/112732 * tree.cc (build_opaque_vector_type): Reset TYPE

[PATCH] middle-end/112741 - ICE with gimple FE and later regimplification

2023-11-28 Thread Richard Biener
The GIMPLE frontend, when bypassing gimplification, doesn't set DECL_SEEN_IN_BIND_EXPR_P given there are no such things in GIMPLE. But it probably should set the flag anyway to avoid later ICEs when regimplifying. Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed. PR middle-end/

[committed] i386: Improve cmpstrnqi_1 insn pattern [PR112494]

2023-11-28 Thread Uros Bizjak
REPZ CMPSB instruction does not update FLAGS register when %ecx register equals zero. Improve cmpstrnqi_1 insn pattern to set FLAGS_REG to its previous value instead of (const_int 0) when operand 2 equals zero. PR target/112494 gcc/ChangeLog: * config/i386/i386.md (cmpstrnqi_1): Set FLA

Re: [PATCH] testsuite: Handle double-quoted LTO section names [PR112728]

2023-11-28 Thread Richard Biener
On Tue, Nov 28, 2023 at 2:24 PM Rainer Orth wrote: > > The gcc.dg/scantest-lto.c test FAILs on Solaris/SPARC with the native as: > > FAIL: gcc.dg/scantest-lto.c scan-assembler-not ascii > FAIL: gcc.dg/scantest-lto.c scan-assembler-times ascii 0 > > It requires double-quoting the section name whic

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

2023-11-28 Thread Thomas Schwinge
Hi! On 2023-11-17T14:50:45+, Alex Coplan wrote: > --- a/gcc/cp/cp-objcp-common.cc > +++ b/gcc/cp/cp-objcp-common.cc > +/* Table of features for __has_{feature,extension}. */ > + > +static constexpr cp_feature_info cp_feature_table[] = > +{ > + { "cxx_exceptions", &flag_exceptions }, > + {

Re: [PATCH] MATCH: Fix invalid signed boolean type usage

2023-11-28 Thread Richard Biener
On Tue, Nov 28, 2023 at 5:44 AM Andrew Pinski wrote: > > This fixes the incorrect assumption that was done in r14-3721-ge6bcf839894783, > that being able to doing the negative after the conversion would be a valid > thing > but really it is not valid for boolean types. > > OK? Bootstrapped and te

Re: [PATCH] Add a REG_P check for inc and dec for Arm MVE

2023-11-28 Thread Saurabh Jha
Hi Christophe, On 11/20/2023 10:12 AM, Christophe Lyon wrote: Hi Saurabh, On Tue, 14 Nov 2023 at 15:51, Kyrylo Tkachov wrote: Hi Saurabh, -Original Message- From: Saurabh Jha Sent: Thursday, November 9, 2023 10:12 AM To: gcc-patches@gcc.gnu.org; Richard Earnshaw ; Richard Sandiford

Re: [PATCH] tree-sra: Avoid returns of references to SRA candidates

2023-11-28 Thread Martin Jambor
On Tue, Nov 28 2023, Richard Biener wrote: > On Mon, 27 Nov 2023, Martin Jambor wrote: > >> Hi, >> >> The enhancement to address PR 109849 contained an importsnt thinko, >> and that any reference that is passed to a function and does not >> escape, must also not happen to be aliased by the return

  1   2   >