[PATCH] testcase: Add testcase for shrink wrapping of vector::push_back [PR118502]

2025-01-17 Thread Andrew Pinski
++.dg/opt/shrink-wrapping-vector-1.C: New test. Signed-off-by: Andrew Pinski --- .../g++.dg/opt/shrink-wrapping-vector-1.C | 17 + 1 file changed, 17 insertions(+) create mode 100644 gcc/testsuite/g++.dg/opt/shrink-wrapping-vector-1.C diff --git a/gcc/testsuite/g++.dg/opt

[PATCH 2/2] match: Improve the `x ==/!= ~x` pattern [PR118483]

2025-01-16 Thread Andrew Pinski
directly matching bit_not. gcc/testsuite/ChangeLog: * gcc.dg/tree-ssa/pr118483-1.c: New test. * gcc.dg/tree-ssa/pr118483-2.c: New test. * gcc.dg/tree-ssa/pr118483-3.c: New test. * gcc.dg/tree-ssa/pr118483-4.c: New test. Signed-off-by: Andrew Pinski

[PATCH 1/2] c++: Don't call fold from cp_fold if one of the operands is an error_mark [PR118525]

2025-01-16 Thread Andrew Pinski
and array_ref for error_mark before checking if the operands had changed. gcc/testsuite/ChangeLog: * g++.dg/cpp2a/consteval38.C: New test. Signed-off-by: Andrew Pinski --- gcc/cp/cp-gimplify.cc| 99 ++-- gcc/testsuite/g++.dg/cpp2a/consteval38.C

Re: [PATCH] Annotate dbg_line_numbers table

2025-01-15 Thread Andrew Pinski
That didn't change it to 10. Like you had said above. But I did notice the patch which you committed had the change from 20 to 10. https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff;h=bea593f115bccffcb2570fc9cd642403193265d9 Thanks, Andrew Pinski > - fprintf (f, &

[PATCH] match: Simplify `1 >> x` into `x == 0` [PR102705]

2025-01-15 Thread Andrew Pinski
pr96669-1.c: Likewise. * gcc.dg/tree-ssa/pr102705-1.c: New test. * gcc.dg/tree-ssa/pr102705-2.c: New test. Signed-off-by: Andrew Pinski --- gcc/match.pd | 16 gcc/testsuite/gcc.dg/tree-ssa/pr102705-1.c | 17 + gcc/tests

[PATCH] c++: Add support for vec_dup to constexpr [PR118445]

2025-01-13 Thread Andrew Pinski
/ChangeLog: * g++.target/aarch64/sve/constexpr-add-1.C: New test. Signed-off-by: Andrew Pinski --- gcc/cp/constexpr.cc | 2 ++ .../g++.target/aarch64/sve/constexpr-add-1.C | 16 2 files changed, 18 insertions(+) create mode 100644 gcc/t

RE: [PATCH] final: Fix get_attr_length for asm goto [PR118411]

2025-01-11 Thread Andrew Pinski (QUIC)
> -Original Message- > From: Jeff Law > Sent: Saturday, January 11, 2025 8:12 AM > To: Andrew Pinski (QUIC) ; gcc- > patc...@gcc.gnu.org > Subject: Re: [PATCH] final: Fix get_attr_length for asm goto > [PR118411] > > > > On 1/11/25 2:52 AM, Andrew Pin

Re: [PATCH] phiopt: Reject hot/cold predictors for early phiopt [PR117935]

2025-01-11 Thread Andrew Pinski
On Sat, Jan 11, 2025 at 2:10 AM Richard Biener wrote: > > > > > Am 11.01.2025 um 09:49 schrieb Andrew Pinski : > > > > In this case, early phiopt would get rid of the user provided predicator > > for hot/cold as it would remove the basic blocks. The easiest and

[PATCH] final: Fix get_attr_length for asm goto [PR118411]

2025-01-11 Thread Andrew Pinski
-linux-gnu. PR middle-end/118411 gcc/ChangeLog: * final.cc (get_attr_length_1): Handle asm for CALL_INSN and JUMP_INSNs. Signed-off-by: Andrew Pinski --- gcc/final.cc | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/gcc/final.cc b/gcc/final.cc index

[PATCH] phiopt: Reject hot/cold predictors for early phiopt [PR117935]

2025-01-11 Thread Andrew Pinski
gcc/testsuite/ChangeLog: * gcc.dg/predict-24.c: New test. Signed-off-by: Andrew Pinski --- gcc/testsuite/gcc.dg/predict-24.c | 24 + gcc/tree-ssa-phiopt.cc| 35 +++ 2 files changed, 59 insertions(+) create mode 100644 gcc/testsuite/g

Re: [PATCH] c++: Reject cdtors and conversion operators with a single * as return type [PR118306]

2025-01-10 Thread Andrew Pinski
On Fri, Jan 10, 2025 at 3:18 AM Simon Martin wrote: > > We currently accept the following invalid code (EDG and MSVC do as well) clang does too: https://github.com/llvm/llvm-project/issues/121706 . Note it might be useful if a testcase with multiply `*` is included too: ``` struct A { A ()

Re: [PATCH] AArch64: Deprecate -mabi=ilp32

2025-01-10 Thread Andrew Pinski
On Fri, Jan 10, 2025 at 6:06 AM Wilco Dijkstra wrote: > > > ILP32 was originally intended to make porting to AArch64 easier. Support was > never merged in the Linux kernel or GLIBC, so it has been unsupported for many > years. There isn't a benefit in keeping unsupported features forever, so > d

Re: [PATCH] match.pd, v2: Avoid introducing UB in the a r<< (32-b) -> a r>> b optimization [PR117927]

2025-01-08 Thread Andrew Pinski
have extra patterns enabled > > there (and some disabled eventually), but I think we don't want to > > introduce this now. > > > > With the rest I agree. > > So like this? Works in quick testing, ok for trunk if it passes full > bootstrap/regtest? > >

Re: [PATCH] aarch64: Use LDR for first-element loads for Advanced SIMD

2025-01-05 Thread Andrew Pinski
On Sun, Jan 5, 2025 at 10:06 PM Dhruv Chawla wrote: > > This patch modifies Advanced SIMD assembly generation to emit an LDR > instruction when a vector is created using a load to the first element with > the > other elements being zero. > > This is similar to what *aarch64_combinez already does.

Re: [PATCH] doc: cpp: fix version test example syntax

2025-01-01 Thread Andrew Pinski
On Wed, Jan 1, 2025, 9:38 AM Sam James wrote: > gcc/ChangeLog: > > * doc/cpp.texi (Common Predefined Macros): Fix syntax. > This looks obvious correct to me. Thanks, Andrew --- > gcc/doc/cpp.texi | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/gcc/doc/cpp.texi

Re: [PATCH] simplify-rtx: Limit number of elts in when encoding.

2024-12-27 Thread Andrew Pinski
On Fri, Dec 27, 2024 at 3:19 AM Robin Dapp wrote: > > Thanks for the helpful suggestion. The attached v2 patch tries to implement > it. > > It was bootstrapped and regtested on x86, aarch64 and Power 10. > Also regtested on rv64gcv_zvl512b. > > Those are all little-endian (sub)targets, though, so

Re: [PATCH v4] arm: [MVE intrinsics] Fix support for predicate constants [PR target/114801]

2024-12-22 Thread Andrew Pinski
cc/testsuite/ > > > * gcc.target/arm/mve/pr108443.c: Update predicate constant. > > > * gcc.target/arm/mve/pr108443-run.c: Likewise. > > > * gcc.target/arm/mve/pr114801.c: New test. > > > > Thanks, that looks much better. OK, assuming no regressio

Re: [PATCH] RISC-V: vector absolute difference expander [PR117722]

2024-12-20 Thread Andrew Pinski
ment abs diff > vs. the sum of abs diff variant. > > Suggested-by: Robin Dapp > Co-developed-by: Pan Li I think we use Co-Authored-By rather than Co-developed-by. Thanks, Andrew Pinski > Signed-off-by: Vineet Gupta > > PR target/117722 > > gcc/ChangeLog:

Re: [PATCH] COBOL 1/8 hdr: header files

2024-12-19 Thread Andrew Pinski
On Thu, Dec 19, 2024 at 11:31 AM James K. Lowden wrote: > > On Mon, 16 Dec 2024 23:36:37 + (UTC) > Joseph Myers wrote: > > > > +extern "C" _Float128 __gg__float128_from_qualified_field > > > > I'm not entirely sure whether this is host or target code (you always > > need to be clear about wh

Re: [PATCH] c: special-case some "bool" errors with C23 [PR117629]

2024-12-18 Thread Andrew Pinski
On Wed, Dec 18, 2024 at 2:37 PM David Malcolm wrote: > > On Tue, 2024-11-26 at 16:35 -0500, Marek Polacek wrote: > > On Mon, Nov 25, 2024 at 10:49:02PM -0500, David Malcolm wrote: > > > This patch attempts to provide better error messages for > > > code compiled with C23 that hasn't been updated f

Re: [PATCH 1/2]AArch64: Add CMP+CSEL and CMP+CSET for cores that support it

2024-12-12 Thread Andrew Pinski
On Wed, Dec 11, 2024 at 4:17 AM Richard Earnshaw (lists) wrote: > > On 11/12/2024 09:54, Tamar Christina wrote: > >> -Original Message- > >> From: Richard Sandiford > >> Sent: Wednesday, December 11, 2024 9:50 AM > >> To: Tamar Christina > >> Cc: gcc-patches@gcc.gnu.org; nd ; Richard Ear

Re: [PATCH] aarch64: Remove vcond{,u} optabs

2024-12-09 Thread Andrew Pinski
th the vcond{,u} removed back then to double check). Thanks, Andrew Pinski > > Richard > > > gcc/ > * config/aarch64/aarch64-protos.h (aarch64_expand_sve_vcond): Delete. > * config/aarch64/aarch64-simd.md (v2di3): Expand into > separate vec_cmp a

Re: [PATCH] Removed a duplicate line of code.

2024-12-07 Thread Andrew Pinski
ush it as such (though someone else might beat me to it). Thanks, Andrew Pinski >

Re: [PATCH] libgccjit: Fix crash on some targets

2024-12-05 Thread Andrew Pinski
On Thu, Dec 5, 2024 at 2:13 PM Antoni Boucher wrote: > > Thanks for the review. > See explanations and questions below. > > Le 2024-12-05 à 17 h 03, Andrew Pinski a écrit : > > On Thu, Dec 5, 2024 at 1:46 PM Antoni Boucher wrote: > >> > >> Hi. > >>

Re: [PATCH] libgccjit: Fix crash on some targets

2024-12-05 Thread Andrew Pinski
On Thu, Dec 5, 2024 at 1:46 PM Antoni Boucher wrote: > > Hi. > This is a patch for the bug 117886. > I ran the jit tests on x86-64 and there are as much failures as on the > master branch (4). > I also ran the jit tests on Aarch64 with another patch and there are > much less failures. > Iains ran

Re: [COMMITTED 1/2] sched1: parameterize pressure scheduling spilling aggressiveness [PR/114729]

2024-12-04 Thread Andrew Pinski
e since there is one in the summary, it matches against the one in the changelog; but it does not check the others. This is because sometimes you have a few different PRs but there is a main PR # in the summary. One thing that is useful is just placing the PR # reference before the full changelog ins

[PATCH v2] phiopt: Reset the number of iterations information of a loop when changing an exit from the loop [PR117243]

2024-12-03 Thread Andrew Pinski
o a loop. gcc/testsuite/ChangeLog: * gcc.dg/torture/pr117243-1.c: New test. * gcc.dg/torture/pr117243-2.c: New test. Signed-off-by: Andrew Pinski --- gcc/testsuite/gcc.dg/torture/pr117243-1.c | 30 gcc/testsuite/gcc.dg/torture/pr117243-2.c | 34 +++

Re: [PATCH] phiopt: don't handle the case cond edge dest is itself [PR117243]

2024-12-03 Thread Andrew Pinski
On Tue, Dec 3, 2024 at 12:34 AM Richard Biener wrote: > > On Mon, Dec 2, 2024 at 10:52 PM Andrew Pinski > wrote: > > > > After r12-5300-gf98f373dd822b3, phiopt could get the following bb structure: > >

Re: [PATCH] phiopt: don't handle the case cond edge dest is itself [PR117243]

2024-12-02 Thread Andrew Pinski
On Mon, Dec 2, 2024 at 2:05 PM Jakub Jelinek wrote: > > On Mon, Dec 02, 2024 at 01:51:39PM -0800, Andrew Pinski wrote: > > gcc/testsuite/ChangeLog: > > > > * gcc.dg/torture/pr117243-1.c: New test. > > * gcc.dg/torture/pr117243-2.c: New test. > > J

[PATCH] phiopt: don't handle the case cond edge dest is itself [PR117243]

2024-12-02 Thread Andrew Pinski
been run. gcc/testsuite/ChangeLog: * gcc.dg/torture/pr117243-1.c: New test. * gcc.dg/torture/pr117243-2.c: New test. Signed-off-by: Andrew Pinski --- gcc/testsuite/gcc.dg/torture/pr117243-1.c | 44 ++ gcc/testsuite/gcc.dg/torture/pr117243

Re: [PATCH] aarch64: Add flags field to aarch64-simd-pragma-builtins.def

2024-12-02 Thread Andrew Pinski
On Mon, Dec 2, 2024 at 2:00 AM Richard Sandiford wrote: > > This patch adds a flags field to aarch64-simd-pragma-builtins.def > and uses it to add attributes to the function declaration. > > Bootstrapped & regression-tested on aarch64-linux-gnu. I'll commit > tomorrow if there are no comments bef

Re: [PATCH v3 2/8] aarch64: Make C/C++ operations possible on SVE ACLE types.

2024-12-02 Thread Andrew Pinski
On Mon, Dec 2, 2024 at 1:47 AM Tejas Belagod wrote: > > On 11/30/24 3:30 AM, Christophe Lyon wrote: > > Hi! > > > > On Fri, 29 Nov 2024 at 05:00, Tejas Belagod wrote: > >> > >> This patch changes the TYPE_INDIVISBLE flag to 0 to enable SVE ACLE types > >> to be > >> treated as GNU vectors and ha

Re: [PATCH] Add new hardreg PRE pass

2024-12-01 Thread Andrew Pinski
On Sun, Dec 1, 2024 at 2:36 PM Jeff Law wrote: > > > > On 11/12/24 3:42 PM, Richard Sandiford wrote: > > >> + > >> +bool > >> +pass_hardreg_pre::gate (function *fun) > >> +{ > >> +#ifdef HARDREG_PRE_REGNOS > >> + return optimize > 0 > >> +&& !fun->calls_setjmp; > > > > Huh. It looks like the

[PUSHED 5/5] testsuite: Fix aarch64/sve/acle/general-c++/gnu_vectors_[12].C for taking address of vector element

2024-11-30 Thread Andrew Pinski
emove error message on taking address of an element of a vector. * g++.target/aarch64/sve/acle/general-c++/gnu_vectors_2.C: Likewise. Signed-off-by: Andrew Pinski --- .../g++.target/aarch64/sve/acle/general-c++/gnu_vectors_1.C | 2 +- .../g++.target/aarch64/sve/acle/general-c++/gnu_vect

[PUSHED 3/5] testsuite: Fix sve-sizeless-[12].C for aggregate change

2024-11-30 Thread Andrew Pinski
++.dg/ext/sve-sizeless-2.C: Likewise. Signed-off-by: Andrew Pinski --- gcc/testsuite/g++.dg/ext/sve-sizeless-1.C | 2 +- gcc/testsuite/g++.dg/ext/sve-sizeless-2.C | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/gcc/testsuite/g++.dg/ext/sve-sizeless-1.C b/gcc/testsuite/g++.dg

[PUSHED 4/5] testsuite: Fix sve-sizeless-[12].C for C++98

2024-11-30 Thread Andrew Pinski
for line 164 for C++98 only. * g++.dg/ext/sve-sizeless-2.C: Likewise. Signed-off-by: Andrew Pinski --- gcc/testsuite/g++.dg/ext/sve-sizeless-1.C | 2 +- gcc/testsuite/g++.dg/ext/sve-sizeless-2.C | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/gcc/testsuite/g

[PUSHED] testsuite: Fix aarch64/sve/acle/general-c/gnu_vectors_[12].c for taking address of vector element

2024-11-30 Thread Andrew Pinski
emove error message on taking address of an element of a vector. * gcc.target/aarch64/sve/acle/general-c/gnu_vectors_2.c: Likewise. Signed-off-by: Andrew Pinski --- .../gcc.target/aarch64/sve/acle/general-c/gnu_vectors_1.c | 2 +- .../gcc.target/aarch64/sve/acle/general-c/gnu_vector

[PUSHED 1/5] testsuite: Fix part of sve-sizeless-2.c

2024-11-30 Thread Andrew Pinski
of bar. Signed-off-by: Andrew Pinski --- gcc/testsuite/g++.dg/ext/sve-sizeless-2.C | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gcc/testsuite/g++.dg/ext/sve-sizeless-2.C b/gcc/testsuite/g++.dg/ext/sve-sizeless-2.C index 87937d060d2..a5ee230f76a 100644 --- a/gcc/testsuite/g++.dg/ext/sve

[PUSHED 2/5] testsuite: Fix another issue with sve-sizeless-[12].C

2024-11-30 Thread Andrew Pinski
because we support constructing scalable vectors rather than before. So just update error message. Pushed as obvious after a quick test for aarch64-linux-gnu. gcc/testsuite/ChangeLog: * g++.dg/ext/sve-sizeless-1.C: Update error message for line 165. * g++.dg/ext/sve-sizeless-2.C:

[PATCH 1/2] gimple-lim: Reuse boolean var when moving PHI

2024-11-30 Thread Andrew Pinski
: * tree-ssa-loop-im.cc (move_computations_worker): While moving phi, reuse the lhs of the conditional if it is a boolean type. Signed-off-by: Andrew Pinski --- gcc/tree-ssa-loop-im.cc | 21 - 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/gcc/tree-ssa

[PATCH 2/2] VN: Don't recurse on for the same value of `a != 0` [PR117859]

2024-11-30 Thread Andrew Pinski
test. Signed-off-by: Andrew Pinski --- gcc/testsuite/gcc.dg/torture/pr117859-1.c | 23 ++ gcc/testsuite/gcc.dg/torture/pr117859-2.c | 51 +++ gcc/tree-ssa-sccvn.cc | 3 +- 3 files changed, 76 insertions(+), 1 deletion(-) create mode 100644 gcc/test

[PATCH] gimplefe: Error recovery for invalid declarations [PR117749]

2024-11-29 Thread Andrew Pinski
er.cc (c_parser_gimple_declaration): Check declarator to be non-null. gcc/testsuite/ChangeLog: * gcc.dg/gimplefe-55.c: New test. Signed-off-by: Andrew Pinski --- gcc/c/gimple-parser.cc | 12 ++-- gcc/testsuite/gcc.dg/gimplefe-55.c | 11 +++ 2 files change

[PATCH] testsuite: Add check vect_unpack for pr117776.cc [PR117844]

2024-11-29 Thread Andrew Pinski
I had missed that you need to check vect_unpack if you are vectorizing a conversion from char to int. Pushed as obvious after a quick test. PR testsuite/117844 gcc/testsuite/ChangeLog: * g++.dg/vect/pr117776.cc: Check vect_unpack. Signed-off-by: Andrew Pinski --- gcc

[PUSHED] fortran: Add default to switch in gfc_trans_transfer [PR117843]

2024-11-29 Thread Andrew Pinski
(gfc_trans_transfer): Add default case. Signed-off-by: Andrew Pinski --- gcc/fortran/trans-io.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gcc/fortran/trans-io.cc b/gcc/fortran/trans-io.cc index 906dd7c6eb6..9b0b8cfdff9 100644 --- a/gcc/fortran/trans-io.cc +++ b/gcc/fortran/trans

[PATCH] match: Improve handling of double convert [PR117776]

2024-11-26 Thread Andrew Pinski
. * gcc.dg/tree-ssa/cast-3.c: New test. Signed-off-by: Andrew Pinski --- gcc/match.pd | 4 +- gcc/testsuite/g++.dg/vect/pr117776.cc | 62 ++ gcc/testsuite/gcc.dg/tree-ssa/cast-3.c | 25 +++ 3 files changed, 89 insertions(+), 2 deletions

Re: [PATCH] PR117350: Keep assembler name for abstract decls for autofdo

2024-11-26 Thread Andrew Pinski
> This fixes a bootstrap problem with autoprofiledbootstrap and LTO. > > 2024-10-30 Jason Merrill > Andrew Pinski > Andi Kleen > gcc/ChangeLog: > > PR bootstrap/117350 > * tree.cc (need_assembler_name_p): Keep assembler name >

[PUSHED] aarch64: Update error message check for __builtin_launder check of sve-sizeless-2.C

2024-11-26 Thread Andrew Pinski
works. gcc/testsuite/ChangeLog: * g++.dg/ext/sve-sizeless-2.C: Update the expected error message for __builtin_launder. Signed-off-by: Andrew Pinski --- gcc/testsuite/g++.dg/ext/sve-sizeless-2.C | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/testsuite/g

[PUSHED] aarch64: Fix fp8_scalar_1.c's stacktest1

2024-11-26 Thread Andrew Pinski
. This changes the function body test to new better code generation. Pushed as obvious after a test of the testcase to make sure it now passes. gcc/testsuite/ChangeLog: * gcc.target/aarch64/fp8_scalar_1.c (stacktest1): Fix for new improved code generation. Signed-off-by: Andrew

Re: [PATCH v2 1/4] aarch64: return scalar fp8 values in fp registers

2024-11-26 Thread Andrew Pinski
On Wed, Nov 20, 2024 at 1:25 AM Claudio Bantaloukas wrote: > > > On 19/11/2024 17:01, Andrew Pinski wrote: > > On Fri, Nov 8, 2024 at 8:11 AM Claudio Bantaloukas > > wrote: > >> > >> According to the aapcs64: If the argument is an 8-bit (...) precision &

[PUSHED] affine: Remove unused variable rem from wide_int_constant_multiple_p

2024-11-26 Thread Andrew Pinski
unused variable is due to the deconstructor. Pushed as obvious after a build for x86_64-linux-gnu. gcc/ChangeLog: * tree-affine.cc (wide_int_constant_multiple_p): Remove unused rem variable. Signed-off-by: Andrew Pinski --- gcc/tree-affine.cc | 2 +- 1 file changed, 1 insertion(+), 1

[PUSHED] build: Move sstream include above safe-ctype.h {PR117771]

2024-11-25 Thread Andrew Pinski
gcc/ChangeLog: PR target/117771 * system.h: Move the include of sstream above safe-ctype.h. Signed-off-by: Andrew Pinski --- gcc/system.h | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/gcc/system.h b/gcc/system.h index c209871df72..57ce22ab893 1

[PUSHED] Regeernate .opt.urls after nios2 removal

2024-11-25 Thread Andrew Pinski
. * config/riscv/riscv.opt.urls: Regenerate. * config/s390/s390.opt.urls: Regenerate. * config/sol2.opt.urls: Regenerate. Signed-off-by: Andrew Pinski --- gcc/config/g.opt.urls | 2 +- gcc/config/i386/i386.opt.urls | 2 +- gcc/config/i386/nto.opt.urls| 2

[PUSHED] opt.url: Regenerate the .opt.urls files

2024-11-24 Thread Andrew Pinski
. * config/rx/rx.opt.urls: Regenerate. * config/sol2.opt.urls: Regenerate. Signed-off-by: Andrew Pinski --- gcc/config/avr/avr.opt.urls | 3 +++ gcc/config/g.opt.urls | 2 +- gcc/config/i386/nto.opt.urls| 2 +- gcc/config/riscv/riscv.opt.urls | 2 +- gcc/config/rx

[PATCH] gimplefe: Fix handling of ')'/'}' after a parse error [PR117741]

2024-11-23 Thread Andrew Pinski
e too. PR c/117741 gcc/c/ChangeLog: * gimple-parser.cc (c_parser_gimple_compound_statement): Handle CPP_CLOSE_PAREN/CPP_CLOSE_SQUARE with an error and skipping the token. gcc/testsuite/ChangeLog: * gcc.dg/gimplefe-54.c: New test. Signed-off-by: Andrew P

Re: [PATCH] build: Remove INCLUDE_MEMORY [PR117737]

2024-11-23 Thread Andrew Pinski
On Sat, Nov 23, 2024 at 7:25 AM Thomas Schwinge wrote: > > Hi Andrew! > > On 2024-11-22T13:15:13-0800, Andrew Pinski wrote: > > Since diagnostic.h is included in over half of the sources, requiring to > > `#define INCLUDE_MEMORY` > > does not make sense. Instea

[PATCH] Remove the rest of INCLUDE_MEMORY

2024-11-22 Thread Andrew Pinski
.dg/plugin/analyzer_known_fns_plugin.c (INCLUDE_MEMORY): Remove. * gcc.dg/plugin/diagnostic_plugin_xhtml_format.c (INCLUDE_MEMORY): Remove. * gcc.dg/plugin/dump_plugin.c (INCLUDE_MEMORY): Remove. * gcc.dg/plugin/ggcplug.c (INCLUDE_MEMORY): Remove. Signed-off-by: And

[PUSHED] test-art: Fix comment in types.h

2024-11-22 Thread Andrew Pinski
The comment references INCLUDE_MEMORY but the code actually checks INCLUDE_VECTOR. So fix up the comment to mention INCLUDE_VECTROR. Pushed as obvious. gcc/ChangeLog: * text-art/types.h: Fix comment. Signed-off-by: Andrew Pinski --- gcc/text-art/types.h | 2 +- 1 file changed, 1

[PATCH] libsanitizer: Move language level from gnu++14 to gnu++17

2024-11-21 Thread Andrew Pinski
ff-by: Andrew Pinski --- libsanitizer/asan/Makefile.am | 2 +- libsanitizer/asan/Makefile.in | 2 +- libsanitizer/hwasan/Makefile.am | 2 +- libsanitizer/hwasan/Makefile.in | 2 +- libsanitizer/interception/Makefile.am | 2 +- libsanitizer/interce

[PATCH 2/3] aarch64: add attributes to the prefetch_builtins

2024-11-21 Thread Andrew Pinski
): Updete call to aarch64_general_add_builtin in AARCH64_INIT_PREFETCH_BUILTIN. Add new variable prefetch_attrs. Signed-off-by: Andrew Pinski --- gcc/config/aarch64/aarch64-builtins.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gcc/config/aarch64/aarch64-builtins.cc

[PATCH 3/3] aarch64: Add attributes to the data intrinsics.

2024-11-21 Thread Andrew Pinski
Call aarch64_get_attributes and update calls to aarch64_general_add_builtin. Signed-off-by: Andrew Pinski --- gcc/config/aarch64/aarch64-builtins.cc | 14 -- 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/gcc/config/aarch64/aarch64-builtins.cc b/gcc/config/aarch64/aa

[PATCH 1/3] aarch64: Fix up flags for vget_low_*, vget_high_* and vreinterpret intrinsics

2024-11-21 Thread Andrew Pinski
(VREINTERPRET_BUILTIN): Use FLAG_NONE instead of FLAG_AUTO_FP. (VGET_LOW_BUILTIN): Likewise. (VGET_HIGH_BUILTIN): Likewise. Signed-off-by: Andrew Pinski --- gcc/config/aarch64/aarch64-builtins.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gcc

Re: [PATCH] aarch64: Fix aarch64 after moving to C23

2024-11-20 Thread Andrew Pinski
On Wed, Nov 20, 2024 at 10:09 AM Richard Sandiford wrote: > > Andrew Pinski writes: > > This fixes a few aarch64 specific testcases after the move to default to > > GNU C23. > > For the SME testcases, I decided to add a new one for the GNU C23 case as > > `(

[PATCH] rtl-reader: Disable reuse_rtx support for generator building

2024-11-20 Thread Andrew Pinski
(class rtx_reader): Don't include m_reuse_rtx_by_id when GENERATOR_FILE is defined. * read-rtl.cc (rtx_reader::read_rtx_code): Disable reuse_rtx support when GENERATOR_FILE is defined. Signed-off-by: Andrew Pinski --- gcc/read-md.h | 2 ++ gcc/read-rtl.c

[PATCH] aarch64: Fix aarch64 after moving to C23

2024-11-19 Thread Andrew Pinski
/sme/za_state_2.c: Likewise. * gcc.target/aarch64/sme/streaming_mode_5.c: New test. * gcc.target/aarch64/sme/za_state_7.c: New test. * gcc.target/aarch64/sme/za_state_8.c: New test. Signed-off-by: Andrew Pinski --- .../gcc.target/aarch64/pic-constantpool1.c| 2

Re: [PATCH] aarch64: Mark __builtin_aarch64_im_lane_boundsi as leaf and nothrow [PR117665]

2024-11-19 Thread Andrew Pinski
On Tue, Nov 19, 2024 at 9:21 AM Andrew Pinski wrote: > > __builtin_aarch64_im_lane_boundsi is known not to throw or call back into > another > function since it will either folded into an NOP or will produce a compiler > error. > > This fixes the ICE by fixing the missed

[PATCH] aarch64: Mark __builtin_aarch64_im_lane_boundsi as leaf and nothrow [PR117665]

2024-11-19 Thread Andrew Pinski
__builtin_aarch64_im_lane_boundsi. gcc/testsuite/ChangeLog: * g++.target/aarch64/lane-bound-1.C: New test. * gcc.target/aarch64/lane-bound-3.c: New test. Signed-off-by: Andrew Pinski --- gcc/config/aarch64/aarch64-builtins.cc| 6 - .../g++.target/aarch64/lane-bound-1.C | 21

Re: [PATCH v2 1/4] aarch64: return scalar fp8 values in fp registers

2024-11-19 Thread Andrew Pinski
On Fri, Nov 8, 2024 at 8:11 AM Claudio Bantaloukas wrote: > > > According to the aapcs64: If the argument is an 8-bit (...) precision > Floating-point or short vector type and the NSRN is less than 8, then the > argument is allocated to the least significant bits of register v[NSRN]. > > gcc/ >

Re: [PATCH 7/8] json: add json parsing support

2024-11-18 Thread Andrew Pinski
On Wed, Nov 13, 2024 at 11:26 AM David Malcolm wrote: > > This patch implements JSON parsing support. > > It's based on the parsing parts of the patch I posted here: > https://gcc.gnu.org/legacy-ml/gcc-patches/2017-08/msg00417.html > with the parsing moved to a separate source file and header, hea

[PATCH] match: Fix the `max==0` pattern for pointers [PR117646]

2024-11-17 Thread Andrew Pinski
ChangeLog: * match.pd (`max==0`): Add casts to `unsigned type`. gcc/testsuite/ChangeLog: * gcc.dg/torture/minmaxneeqptr-1.c: New test. Signed-off-by: Andrew Pinski --- gcc/match.pd | 6 -- .../gcc.dg/torture/minmaxneeqptr-1.c | 21 +

Re: [PATCH v2] GCC Driver : Enable very long gcc command-line option

2024-11-17 Thread Andrew Pinski
nce we want to have this file around when using -saves-temps to be able to reproduce what is being invoked. Thanks, Andrew Thank you for your support. > > > > Thanks, > Sunil Dora > -- > *From:* Andrew Pinski > *Sent:* Friday, September 6,

[PATCH] testsuite: Fix pr101145inf*.c testcases [PR117494]

2024-11-17 Thread Andrew Pinski
nline. Include tree-vect.h. Have main call check_vect and main1. Signed-off-by: Andrew Pinski --- gcc/testsuite/gcc.dg/vect/pr101145inf.c | 2 +- gcc/testsuite/gcc.dg/vect/pr101145inf.inc | 9 - gcc/testsuite/gcc.dg/vect/pr101145inf_1.c | 2 +- 3 files changed, 10 insertions(

Re: [r15-5336 Regression] FAIL: gcc.dg/guality/pr36728-4.c -Os -DPREVENT_OPTIMIZATION line 16 y == 2 on Linux/x86_64

2024-11-17 Thread Andrew Pinski
On Sat, Nov 16, 2024 at 9:27 AM haochen.jiang wrote: > > On Linux/x86_64, > > cee7d080d5c2a5fb8125878998b742c040ec88b4 is the first bad commit > commit cee7d080d5c2a5fb8125878998b742c040ec88b4 > Author: Jan Hubicka > Date: Sat Nov 16 14:04:32 2024 +0100 > > Ignore conditions guarding __buil

Re: [committed] c: Default to -std=gnu23

2024-11-16 Thread Andrew Pinski
On Sat, Nov 16, 2024 at 3:58 AM Gerald Pfeifer wrote: > > On Fri, 15 Nov 2024, Joseph Myers wrote: > > Change the default language version for C compilation from -std=gnu17 > > to -std=gnu23. > : > > Bootstrapped with no regressions for x86_64-pc-linux-gnu. > > I started seeing the following on x8

[PATCH] libiberity: ANSIfy test-demangle.c

2024-11-16 Thread Andrew Pinski
initions. (fail): Likewise. (main): Likewise. Signed-off-by: Andrew Pinski --- libiberty/testsuite/test-demangle.c | 15 --- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/libiberty/testsuite/test-demangle.c b/libiberty/testsuite/test-demangle.c index abe

Re: [PATCH v2] MATCH: Simplify `min(a, b) op max(a, b)` to `a op b` [PR109401]

2024-11-16 Thread Andrew Pinski
On Sat, Nov 16, 2024 at 10:48 AM Jeff Law wrote: > > > > > On 11/15/24 5:16 AM, Eikansh Gupta wrote: > > Hi Jeff, > > > > The patch has support for both. In the test cases, approx half the test > > cases have |min(a, b) op max(a, b)| and the other half have |max(a, b) > > op min(a, b). | > For som

[PATCH] match: Optimize `max(a, b) == 0` to `(a|b) == 0` for unsigned [PR115275]

2024-11-16 Thread Andrew Pinski
-off-by: Andrew Pinski --- gcc/match.pd | 8 + gcc/testsuite/g++.dg/tree-ssa/pr115275.C | 36 ++ gcc/testsuite/gcc.dg/tree-ssa/max_eqne-1.c | 20 gcc/testsuite/gcc.dg/tree-ssa/max_eqne-2.c | 19 4 files changed, 83

[PATCH v2 2/3] cfgexpand: Rewrite add_scope_conflicts_2 to use cache and look back further [PR111422]

2024-11-15 Thread Andrew Pinski
pdate call to add_scope_conflicts_2 to add cache argument. (add_scope_conflicts): Add cache argument and update calls to add_scope_conflicts_1. gcc/testsuite/ChangeLog: * gcc.dg/torture/pr117426-1.c: New test. Signed-off-by: Andrew Pinski --- gcc/cfgexpand.cc

[PATCH v2 1/3] cfgexpand: Factor out getting the stack decl index

2024-11-15 Thread Andrew Pinski
fined. (decl_stack_index): New function. (visit_op): Use decl_stack_index. (visit_conflict): Likewise. (add_scope_conflicts_1): Likewise. Signed-off-by: Andrew Pinski --- gcc/cfgexpand.cc | 62 +--- 1 file changed, 37 insertions(+

[PATCH v2 3/3] cfgexpand: Handle integral vector types and constructors for scope conflicts [PR105769]

2024-11-15 Thread Andrew Pinski
elements. gcc/testsuite/ChangeLog: * g++.dg/torture/pr105769-1.C: New test. Signed-off-by: Andrew Pinski --- gcc/cfgexpand.cc | 20 +-- gcc/testsuite/g++.dg/torture/pr105769-1.C | 67 +++ 2 files changed, 83 insertions(+), 4 deletions(-)

Re: [PATCH v4] forwprop: Try to blend two isomorphic VEC_PERM sequences

2024-11-15 Thread Andrew Pinski
()) +return; Maybe should be: if (l->is_empty() ) return; Which makes it more obvious of what is going on. Also this: + FOR_EACH_VEC_ELT (seq->new_sel, i, idx) + new_sel.quick_push (idx); Could just be: for (auto idx : seq->new_sel) new_sel.quick_push (idx); Using C++11 range-based for in t

Re: [PATCH]AArch64 Suppress default options when march or mcpu used is not affected by it.

2024-11-15 Thread Andrew Pinski
looks for"error:". So tested manually: You might be able to use dg-message instead. dg-message does not look for a `note:` (dg-note), `error:` (dg-note) or `warning:` (dg-warning). >From gcc-dg.exp: ``` # Look for messages that don't have standard prefixes. proc dg-message { args }

Re: [PATCH] c: Introduce -Wfree-labels

2024-11-15 Thread Andrew Pinski
ses Wc++23-extensions/Wc23-extensions (which is similar to GCC's Wc11-c23-compat) and does not seem to have another option to enable/disable this specific one. Thanks, Andrew Pinski > > gcc/c-family/ > > * c-opts.cc (c_common_post_options): Initialize > warn_free_labels

Re: [PATCH] aarch64: Use SVE SUBR instruction with Neon modes

2024-11-15 Thread Andrew Pinski
On Thu, Nov 14, 2024 at 7:50 PM Soumya AR wrote: > > The SVE SUBR instruction performs a reversed subtract from an immediate. > > This patches enables the emission of SUBR for Neon modes and avoids the need > to > materialise an explicit constant. > > For example, the below test case: > > typedef

Re: [PATCH v2] MATCH: Simplify `min(a, b) op max(a, b)` to `a op b` [PR109401]

2024-11-14 Thread Andrew Pinski
0 @1) )` and `(plus (max @0 @1) (min @0 @1) )` will match. Unless I am misunderstanding something here too. Thanks, Andrew Pinski > > jeff >

Re: [PATCH v4] MATCH: Simplify `a rrotate (32-b) -> a lrotate b` [PR109906]

2024-11-14 Thread Andrew Pinski
On Mon, Nov 11, 2024 at 11:39 AM Jeff Law wrote: > > > > On 11/11/24 4:36 AM, Eikansh Gupta wrote: > > The pattern `a rrotate (32-b)` should be optimized to `a lrotate b`. > > The same is also true for `a lrotate (32-b)`. It can be optimized to > > `a rrotate b`. > > > > This patch adds following

Re: match.pd: Add pattern to simplify `(a - 1) & -a` to `0`

2024-11-13 Thread Andrew Pinski
ugh after the match pattern it might be harder to invoke. BUT the addition of the rtl level change should not block the match pattern to go in. Thanks, Andrew Pinski > > > CONFIDENTIALITY: The contents of this e-mail are confidential and intended > only for the above addresse

Re: match.pd: Add pattern to simplify `((X - 1) & ~X) < 0` to `X == 0`

2024-11-13 Thread Andrew Pinski
0)) + integer_zerop@1) ... + (eqne @0 @1) Besides those 3 things the patch looks good. It also might be useful to test `short` and `signed char` as the plus might be done in an unsigned type. Thanks, Andrew Pinski > > gcc/ChangeLog: > > * match.pd: New pattern. > >

Re: [RFC 2/9] aarch64: add new define_insn for subg

2024-11-13 Thread Andrew Pinski
On Thu, Nov 7, 2024 at 1:41 PM Indu Bhagat wrote: > > subg (Subtract with Tag) is an Armv8.5-A memory tagging (MTE) > instruction. It can be used to subtract an immediate value scaled by > the tag granule from the address in the source register. > > gcc/ChangeLog: > > * config/aarch64/aar

[PATCH] cfgexpand: Skip doing conflicts if there is only 1 variable

2024-11-13 Thread Andrew Pinski
geLog: * cfgexpand.cc (add_scope_conflicts): Return right away if there are only one stack variable. Signed-off-by: Andrew Pinski --- gcc/cfgexpand.cc | 5 + 1 file changed, 5 insertions(+) diff --git a/gcc/cfgexpand.cc b/gcc/cfgexpand.cc index f3a33ff9a07..ed890f692e5 1

Re: [PATCH] Fix incorrect subreg mode check [PR117476]

2024-11-12 Thread Andrew Pinski
On Tue, Nov 12, 2024 at 4:43 PM Jeff Law wrote: > > > > On 11/12/24 11:31 AM, Alexey Merzlyakov wrote: > > Hi, Jeff, > > > > Oops... It looks like I've made a reply to Alex at the same time when > > you sent an e-mail update. > > > > So, moving the testcase to the gcc.dg/torture directory. > > > >

Re: [PATCH 1/2] c++: add -Wdeprecated-literal-operator [CWG2521]

2024-11-10 Thread Andrew Pinski
On Thu, Oct 3, 2024 at 9:42 AM Jason Merrill wrote: > > Tested x86_64-pc-linux-gnu, applying to trunk. > > -- 8< -- > > C++23 CWG issue 2521 (https://wg21.link/cwg2521) deprecates user-defined > literal operators declared with the optional space between "" and the > suffix. > > Many testcases used

Re: [PATCH] [GCCJIT] support dynamic alloca stub

2024-11-09 Thread Andrew Pinski
); > +} > + > +void > +verify_code (gcc_jit_context *ctxt, gcc_jit_result *result) > +{ > + typedef size_t (*fn_type) (void); > + CHECK_NON_NULL (result); > + fn_type test_stack_save_restore = > +(fn_type)gcc_jit_result_get_code (result, "test_stack_save_restore"); > + CHECK_NON_NULL (test_stack_save_restore); > + size_t value = test_stack_save_restore(); > + CHECK (value == 512); > +} > diff --git a/gcc/tree-ssa-ccp.cc b/gcc/tre > e-ssa-ccp.cc > index fcb91c58335..d721c471f74 100644 > --- a/gcc/tree-ssa-ccp.cc > +++ b/gcc/tree-ssa-ccp.cc > @@ -2671,7 +2671,8 @@ fold_builtin_alloca_with_align (gimple *stmt) >block = gimple_block (stmt); >if (!(cfun->after_inlining > && block > -&& TREE_CODE (BLOCK_SUPERCONTEXT (block)) == FUNCTION_DECL)) > + && BLOCK_SUPERCONTEXT (block) > + && TREE_CODE (BLOCK_SUPERCONTEXT (block)) == FUNCTION_DECL)) This change seems incorrect. Every block should have a super context. Including the last block which should point to a function decl. Maybe gccjit is not setting up the blocks correctly where the supper most one is not setting its context to being the function decl. I think the following patch will fix that bug: ``` diff --git a/gcc/jit/jit-playback.cc b/gcc/jit/jit-playback.cc index e32e837f2fe..acdb25c7d09 100644 --- a/gcc/jit/jit-playback.cc +++ b/gcc/jit/jit-playback.cc @@ -2118,6 +2118,7 @@ postprocess () /* Seem to need this in gimple-low.cc: */ gcc_assert (m_inner_block); DECL_INITIAL (m_inner_fndecl) = m_inner_block; + BLOCK_SUPERCONTEXT (m_inner_block) = m_inner_fndecl; /* how to add to function? the following appears to be how to set the body of a m_inner_fndecl: */ ``` Signed-off-by: Andrew Pinski Thanks, Andrew Pinski > threshold /= 10; >if (size > threshold) > return NULL_TREE; > -- > 2.43.0 >

[PATCH] fold: Remove (rrotate (rrotate A CST) CST) folding [PR117492]

2024-11-08 Thread Andrew Pinski
some integer` simplifcation. gcc/testsuite/ChangeLog: * gcc.dg/torture/pr117492-1.c: New test. Signed-off-by: Andrew Pinski --- gcc/fold-const.cc | 10 -- gcc/testsuite/gcc.dg/torture/pr117492-1.c | 16 2 files changed, 16 insertions

[PATCH] VN: Don't recurse on for the same value of `a | b` [PR117496]

2024-11-08 Thread Andrew Pinski
496-1.c: New test. Signed-off-by: Andrew Pinski --- gcc/testsuite/gcc.dg/torture/pr117496-1.c | 25 +++ gcc/tree-ssa-sccvn.cc | 11 -- 2 files changed, 34 insertions(+), 2 deletions(-) create mode 100644 gcc/testsuite/gcc.dg/torture/pr117496-1.c

Re: [PATCH] AArch64: Cleanup fusion defines

2024-11-08 Thread Andrew Pinski
On Fri, Nov 8, 2024 at 8:56 AM Wilco Dijkstra wrote: > > > Cleanup the fusion defines by introducing AARCH64_FUSE_BASE as a common base > level of fusion supported by almost all cores. Add AARCH64_FUSE_MOVK as a > shortcut for all MOVK fusion. In most cases there is no change. It enables > AARC

[PATCH] VN: Canonicalize compares before calling vn_nary_op_lookup_pieces

2024-11-07 Thread Andrew Pinski
if tree_swap_operands_p returns true. Signed-off-by: Andrew Pinski --- gcc/tree-ssa-sccvn.cc | 23 +-- 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/gcc/tree-ssa-sccvn.cc b/gcc/tree-ssa-sccvn.cc index 1967bbdca84..16299662b95 100644 --- a/gcc/tree-ssa

Re: [PATCH v2 1/2] VN: Handle `(a | b) !=/== 0` for predicates [PR117414]

2024-11-07 Thread Andrew Pinski
On Thu, Nov 7, 2024 at 12:48 AM Richard Biener wrote: > > On Thu, Nov 7, 2024 at 12:43 AM Andrew Pinski > wrote: > > > > For `(a | b) == 0`, we can "assert" on the true edge that > > both `a == 0` and `b == 0` but nothing on the false edge. > > For `

Re: [PATCH] ifcombine: For short circuit case, allow 2 defining statements [PR85605]

2024-11-07 Thread Andrew Pinski
On Fri, Nov 1, 2024 at 4:06 PM Andrew Pinski wrote: > > On Tue, Oct 29, 2024 at 10:10 AM Andrew Pinski wrote: > > > > On Tue, Oct 29, 2024 at 5:59 AM Richard Biener > > wrote: > > > > > > On Tue, Oct 29, 2024 at 4:29 AM Andrew Pinski > > &g

Re: [PATCH v2 2/2] VN: Handle `(A CMP B) !=/== 0` for predicates [PR117414]

2024-11-07 Thread Andrew Pinski
On Thu, Nov 7, 2024 at 12:50 AM Richard Biener wrote: > > On Thu, Nov 7, 2024 at 12:43 AM Andrew Pinski > wrote: > > > > After the last patch, we also want to record `(A CMP B) != 0` > > as `(A CMP B)` and `(A CMP B) == 0` as `(A CMP B)` with the > > true/false

[PATCH v2 2/2] VN: Handle `(A CMP B) !=/== 0` for predicates [PR117414]

2024-11-06 Thread Andrew Pinski
ed on x86_64-linux-gnu. PR tree-optimization/117414 gcc/ChangeLog: * tree-ssa-sccvn.cc (insert_predicates_for_cond): Handle `(A CMP B) !=/== 0`. gcc/testsuite/ChangeLog: * gcc.dg/tree-ssa/fre-predicated-3.c: New test. Signed-off-by: Andrew Pinski --- .../gcc.dg/tree-ss

  1   2   3   4   5   6   7   8   9   10   >