Re: [pshed] testsuite, C++, Darwin: Skip cxa_atexit-6, which is not applicable.

2024-05-19 Thread Andrew Pinski
On Sun, May 19, 2024 at 6:38 AM Iain Sandoe wrote: > > As per the analysis in the PR, tested on x86_64, i686 and aarch64 Darwin > (and on x86_64 linux), pushed to trunk, thanks, > Iain Thanks for doing this. Thanks, Andrew > > --- 8< --- > > For Darwin, non-weak functions defined in a TU

Re: [to-be-committed][RISC-V] Eliminate redundant bitmanip operation

2024-05-19 Thread Andrew Pinski
ion if it was single use. */ (simplify (convert (bit_not:s @0)) (if (tree_nop_conversion_p (type, TREE_TYPE (@0))) (bit_not (convert @0)))) ``` Thanks, Andrew Pinski > > > > Regression tested in Ventana's CI system as well as my own. Waiting on > the Rivos CI system before moving forward. > > > > Jeff

Re: [PATCH v1] Match: Extract integer_types_ternary_match helper to avoid code dup [NFC]

2024-05-18 Thread Andrew Pinski
On Sat, May 18, 2024, 9:17 PM wrote: > From: Pan Li > > There are sorts of match pattern for SAT related cases, there will be > some duplicated code to check the dest, op_0, op_1 are same tree types. > Aka ternary tree type matches. Thus, extract one helper function to > do this and avoid

[PATCH] PHIOPT: Don't transform minmax if middle bb contains a phi [PR115143]

2024-05-18 Thread Andrew Pinski
phi nodes for middle bbs for the case where middle bb is not empty. gcc/testsuite/ChangeLog: * gcc.c-torture/compile/pr115143-1.c: New test. * gcc.c-torture/compile/pr115143-2.c: New test. * gcc.c-torture/compile/pr115143-3.c: New test. Signed-off-by: Andrew

Re: [PATCH] Optab: add isfinite_optab for __builtin_isfinite

2024-05-18 Thread Andrew Pinski
On Thu, Apr 11, 2024 at 8:07 PM HAO CHEN GUI wrote: > > Hi, > This patch adds an optab for __builtin_isfinite. The finite check can be > implemented on rs6000 by a single instruction. It needs an optab to be > expanded to the certain sequence of instructions. > > The subsequent patches will

Re: [PATCH] Optab: add isnormal_optab for __builtin_isnormal

2024-05-18 Thread Andrew Pinski
On Fri, Apr 12, 2024 at 1:10 AM HAO CHEN GUI wrote: > > Hi, > This patch adds an optab for __builtin_isnormal. The normal check can be > implemented on rs6000 by a single instruction. It needs an optab to be > expanded to the certain sequence of instructions. > > The subsequent patches will

Re: [PATCH] middle-end: Expand {u|s}dot product support in autovectorizer

2024-05-16 Thread Andrew Pinski
On Thu, May 16, 2024, 7:46 PM Tamar Christina wrote: > Hi Victor, > > > -Original Message- > > From: Victor Do Nascimento > > Sent: Thursday, May 16, 2024 3:39 PM > > To: gcc-patches@gcc.gnu.org > > Cc: Richard Sandiford ; Richard Earnshaw > > ; Victor Do Nascimento > > > > Subject:

Re: [PATCH] middle-end: Expand {u|s}dot product support in autovectorizer

2024-05-16 Thread Andrew Pinski
On Thu, May 16, 2024, 4:40 PM Victor Do Nascimento < victor.donascime...@arm.com> wrote: > From: Victor Do Nascimento > > At present, the compiler offers the `{u|s|us}dot_prod_optab' direct > optabs for dealing with vectorizable dot product code sequences. The > consequence of using a direct

Re: [PATCH] middle-end: Drop __builtin_pretech calls in autovectorization [PR114061]'

2024-05-16 Thread Andrew Pinski
On Thu, May 16, 2024, 3:58 PM Victor Do Nascimento < victor.donascime...@arm.com> wrote: > At present the autovectorizer fails to vectorize simple loops > involving calls to `__builtin_prefetch'. A simple example of such > loop is given below: > > void foo(double * restrict a, double * restrict

Re: [PATCH] Add extra copy of the ifcombine pass after pre [PR102793]

2024-05-16 Thread Andrew Pinski
On Thu, May 16, 2024, 12:55 PM Oleg Endo wrote: > > On Thu, 2024-05-16 at 10:35 +0200, Richard Biener wrote: > > On Fri, Apr 5, 2024 at 8:14 PM Andrew Pinski wrote: > > > > > > On Fri, Apr 5, 2024 at 5:28 AM Manolis Tsamis > wrote: > &g

Re: [PATCH] rs6000: Don't clobber return value when eh_return called [PR114846]

2024-05-15 Thread Andrew Pinski
On Thu, May 16, 2024, 4:09 AM Kewen.Lin wrote: > Hi, > > As the associated test case in PR114846 shows, currently > with eh_return involved some register restoring for EH > RETURN DATA in epilogue can clobber the one which holding > the return value. Referring to the existing handlings in >

[RFC] New optab for `a&~b` (and future expand improvements)

2024-05-15 Thread Andrew Pinski via Gcc
rite I like proposal 2 better than proposal 1 since it allows for cleanups later on. I think about starting this in July if folks think proposal 2 is the way forward. Thanks, Andrew Pinski

Re: [PATCH] AArch64: Improve costing of ctz

2024-05-15 Thread Andrew Pinski
On Wed, May 15, 2024, 12:17 PM Wilco Dijkstra wrote: > Improve costing of ctz - both TARGET_CSSC and vector cases were not > handled yet. > > Passes regress & bootstrap - OK for commit? > I should note popcount has a similar issue which I hope to fix next week. Popcount cost is used during

[gcc r15-501] tree-cfg: Move the returns_twice check to be last statement only [PR114301]

2024-05-15 Thread Andrew Pinski via Gcc-cvs
https://gcc.gnu.org/g:642f31d6286b8a342130fbface51530befd975fd commit r15-501-g642f31d6286b8a342130fbface51530befd975fd Author: Andrew Pinski Date: Tue May 14 06:29:18 2024 -0700 tree-cfg: Move the returns_twice check to be last statement only [PR114301] When I was checking

[PATCH] tree-cfg: Move the returns_twice check to be last statement only [PR114301]

2024-05-14 Thread Andrew Pinski
rather than all. Signed-off-by: Andrew Pinski --- gcc/tree-cfg.cc | 14 +- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/gcc/tree-cfg.cc b/gcc/tree-cfg.cc index b2d47b72084..7fb7b92966b 100644 --- a/gcc/tree-cfg.cc +++ b/gcc/tree-cfg.cc @@ -6495,6 +6495,13

Re: [RFC][PATCH] PR tree-optimization/109071 - -Warray-bounds false positive warnings due to code duplication from jump threading

2024-05-13 Thread Andrew Pinski
On Mon, May 13, 2024, 11:41 PM Kees Cook wrote: > On Mon, May 13, 2024 at 02:46:32PM -0600, Jeff Law wrote: > > > > > > On 5/13/24 1:48 PM, Qing Zhao wrote: > > > -Warray-bounds is an important option to enable linux kernal to keep > > > the array out-of-bound errors out of the source tree. > >

[PATCH] Match: optimize `a == CST & unary(a)` [PR111487]

2024-05-13 Thread Andrew Pinski
eLog: * match.pd (tcc_int_unary): New operator list. (`a == CST & unary(a)`): New pattern. gcc/testsuite/ChangeLog: * gcc.dg/tree-ssa/and-unary-1.c: New test. Signed-off-by: Andrew Pinski --- gcc/match.pd| 12 gcc/testsuite/gcc.dg/tree-ssa/and-u

[gcc r11-11422] Fix PR 110386: backprop vs ABSU_EXPR

2024-05-09 Thread Andrew Pinski via Gcc-cvs
https://gcc.gnu.org/g:dbfc2d075f10149bd94e16c1210ffe4bac7e60c3 commit r11-11422-gdbfc2d075f10149bd94e16c1210ffe4bac7e60c3 Author: Andrew Pinski Date: Sat Sep 23 21:53:09 2023 -0700 Fix PR 110386: backprop vs ABSU_EXPR The issue here is that when backprop tries to go and strip

Re: [COMMITTED/13] Fix PR 110386: backprop vs ABSU_EXPR

2024-05-09 Thread Andrew Pinski
On Sun, Oct 1, 2023 at 12:28 PM Andrew Pinski wrote: > > From: Andrew Pinski > > The issue here is that when backprop tries to go > and strip sign ops, it skips over ABSU_EXPR but > ABSU_EXPR not only does an ABS, it also changes the > type to unsigned. > Since strip_si

[gcc r12-10434] Fix PR 110386: backprop vs ABSU_EXPR

2024-05-09 Thread Andrew Pinski via Gcc-cvs
https://gcc.gnu.org/g:f5c7306d7f039e5c74c5e82cf06610f0ae07a0e8 commit r12-10434-gf5c7306d7f039e5c74c5e82cf06610f0ae07a0e8 Author: Andrew Pinski Date: Sat Sep 23 21:53:09 2023 -0700 Fix PR 110386: backprop vs ABSU_EXPR The issue here is that when backprop tries to go and strip

Re: Ping [PATCH/RFC] target, hooks: Allow a target to trap on unreachable [PR109267].

2024-05-08 Thread Andrew Pinski
On Wed, May 8, 2024 at 12:37 PM Iain Sandoe wrote: > > Hi Folks, > > I’d like to land a viable solution to this issue if possible, (it is a show- > stopper for the aarch64-darwin development branch). > > > On 9 Apr 2024, at 14:55, Iain Sandoe wrote: > > > > So far, tested lightly on

Re: [COMMITTED] warn-access: Fix handling of unnamed types [PR109804]

2024-05-08 Thread Andrew Pinski
On Thu, Feb 22, 2024 at 9:28 AM Andrew Pinski wrote: > > This looks like an oversight of handling DEMANGLE_COMPONENT_UNNAMED_TYPE. > DEMANGLE_COMPONENT_UNNAMED_TYPE only has the u.s_number.number set while > the code expected newc.u.s_binary.left would be valid. >

[gcc r12-10433] testsuite: fix Wmismatched-new-delete-8.C with -m32

2024-05-08 Thread Andrew Pinski via Gcc-cvs
https://gcc.gnu.org/g:58d11bfc27d5412619c0919738158a4c05cca2cf commit r12-10433-g58d11bfc27d5412619c0919738158a4c05cca2cf Author: Marek Polacek Date: Thu Feb 22 18:52:32 2024 -0500 testsuite: fix Wmismatched-new-delete-8.C with -m32 This fixes error: 'operator new' takes type

[gcc r12-10432] warn-access: Fix handling of unnamed types [PR109804]

2024-05-08 Thread Andrew Pinski via Gcc-cvs
https://gcc.gnu.org/g:16319f8fba6c049d743046488588f40da2349048 commit r12-10432-g16319f8fba6c049d743046488588f40da2349048 Author: Andrew Pinski Date: Wed Feb 21 20:12:21 2024 -0800 warn-access: Fix handling of unnamed types [PR109804] This looks like an oversight of handling

[gcc r12-10431] Fix PR 111331: wrong code for `a > 28 ? MIN : 29`

2024-05-08 Thread Andrew Pinski via Gcc-cvs
https://gcc.gnu.org/g:39d56b96996dd8336652ceac97983c26fd8de4c6 commit r12-10431-g39d56b96996dd8336652ceac97983c26fd8de4c6 Author: Andrew Pinski Date: Thu Sep 7 22:13:31 2023 -0700 Fix PR 111331: wrong code for `a > 28 ? MIN : 29` The problem here is after r6-7

[gcc r11-11421] Fix PR 111331: wrong code for `a > 28 ? MIN : 29`

2024-05-08 Thread Andrew Pinski via Gcc-cvs
https://gcc.gnu.org/g:16e27b6d03756bf1fae22607fa93107787a7b9cb commit r11-11421-g16e27b6d03756bf1fae22607fa93107787a7b9cb Author: Andrew Pinski Date: Thu Sep 7 22:13:31 2023 -0700 Fix PR 111331: wrong code for `a > 28 ? MIN : 29` The problem here is after r6-7

Re: [COMMITTED/13] Fix PR 111331: wrong code for `a > 28 ? MIN : 29`

2024-05-08 Thread Andrew Pinski
On Sun, Oct 1, 2023 at 1:23 PM Andrew Pinski wrote: > > From: Andrew Pinski > > The problem here is after r6-7425-ga9fee7cdc3c62d0e51730, > the comparison to see if the transformation could be done was using the > wrong value. Instead of see if the inner was LE (for

Re: [COMMITTED] Fold: Fix up merge_truthop_with_opposite_arm for NaNs [PR95351]

2024-05-08 Thread Andrew Pinski
On Mon, Mar 11, 2024 at 11:41 PM Andrew Pinski (QUIC) wrote: > > > -Original Message- > > From: Andrew Pinski (QUIC) > > Sent: Sunday, March 10, 2024 7:58 PM > > To: gcc-patches@gcc.gnu.org > > Cc: Andrew Pinski (QUIC) >

[gcc r11-11420] Fold: Fix up merge_truthop_with_opposite_arm for NaNs [PR95351]

2024-05-08 Thread Andrew Pinski via Gcc-cvs
https://gcc.gnu.org/g:6c00c3245e688d00dae3e928f0d03f530640caae commit r11-11420-g6c00c3245e688d00dae3e928f0d03f530640caae Author: Andrew Pinski Date: Sun Mar 10 22:17:09 2024 + Fold: Fix up merge_truthop_with_opposite_arm for NaNs [PR95351] The problem here

[gcc r12-10430] Fold: Fix up merge_truthop_with_opposite_arm for NaNs [PR95351]

2024-05-08 Thread Andrew Pinski via Gcc-cvs
https://gcc.gnu.org/g:d88fe8210e4edc2f4ddf722ba788924452c6f6a0 commit r12-10430-gd88fe8210e4edc2f4ddf722ba788924452c6f6a0 Author: Andrew Pinski Date: Sun Mar 10 22:17:09 2024 + Fold: Fix up merge_truthop_with_opposite_arm for NaNs [PR95351] The problem here

[gcc r13-8728] Fix PR 110066: crash with -pg -static on riscv

2024-05-08 Thread Andrew Pinski via Gcc-cvs
https://gcc.gnu.org/g:929b0fffe4d3d836e07e5a398a8e176e65f8b2c2 commit r13-8728-g929b0fffe4d3d836e07e5a398a8e176e65f8b2c2 Author: Andrew Pinski Date: Sat Jul 22 08:52:42 2023 -0700 Fix PR 110066: crash with -pg -static on riscv The problem -fasynchronous-unwind-tables

Re: [PATCH 1/2] Fix PR 110066: crash with -pg -static on riscv

2024-05-08 Thread Andrew Pinski
On Sat, Jul 22, 2023 at 8:36 PM Kito Cheng via Gcc-patches wrote: > > OK for trunk, thanks:) I have now backported it to 13 branch. Thanks, Andrew > > Andrew Pinski via Gcc-patches 於 2023年7月23日 週日 > 09:07 寫道: > > > The problem -fasynchronous-unwind-tables is on by

[gcc r15-328] match: `a CMP nonnegative ? a : ABS` simplified to just `ABS` [PR112392]

2024-05-08 Thread Andrew Pinski via Gcc-cvs
https://gcc.gnu.org/g:5726de79e2154a16d8a045567d2cfad035f7ed19 commit r15-328-g5726de79e2154a16d8a045567d2cfad035f7ed19 Author: Andrew Pinski Date: Mon May 6 23:53:41 2024 -0700 match: `a CMP nonnegative ? a : ABS` simplified to just `ABS` [PR112392] We can optimize

[PATCH] match: `a CMP nonnegative ? a : ABS` simplified to just `ABS` [PR112392]

2024-05-07 Thread Andrew Pinski
re CMP is ==, > and >=. (`x CMP nonnegative@y ? y : ABS`): New pattern. gcc/testsuite/ChangeLog: * gcc.dg/tree-ssa/phi-opt-41.c: New test. Signed-off-by: Andrew Pinski --- gcc/match.pd | 15 ++ gcc/testsuite/gcc.dg/tree-ssa/phi-o

[gcc r11-11419] c++/c-common: Fix convert_vector_to_array_for_subscript for qualified vector types [PR89224]

2024-05-07 Thread Andrew Pinski via Gcc-cvs
https://gcc.gnu.org/g:046aeffba336295fbdaf0e1ecf64b582d08f0aa6 commit r11-11419-g046aeffba336295fbdaf0e1ecf64b582d08f0aa6 Author: Andrew Pinski Date: Tue Feb 20 13:38:28 2024 -0800 c++/c-common: Fix convert_vector_to_array_for_subscript for qualified vector types [PR89224] After

[gcc r12-10420] c++/c-common: Fix convert_vector_to_array_for_subscript for qualified vector types [PR89224]

2024-05-07 Thread Andrew Pinski via Gcc-cvs
https://gcc.gnu.org/g:315f8a474eb1a9b2d213aa650bdb132c78546264 commit r12-10420-g315f8a474eb1a9b2d213aa650bdb132c78546264 Author: Andrew Pinski Date: Tue Feb 20 13:38:28 2024 -0800 c++/c-common: Fix convert_vector_to_array_for_subscript for qualified vector types [PR89224] After

[gcc r13-8713] c++/c-common: Fix convert_vector_to_array_for_subscript for qualified vector types [PR89224]

2024-05-07 Thread Andrew Pinski via Gcc-cvs
https://gcc.gnu.org/g:f5d9eef6507f36692066c0934d9f8c9d462e698f commit r13-8713-gf5d9eef6507f36692066c0934d9f8c9d462e698f Author: Andrew Pinski Date: Tue Feb 20 13:38:28 2024 -0800 c++/c-common: Fix convert_vector_to_array_for_subscript for qualified vector types [PR89224] After

[gcc r14-10183] c++/c-common: Fix convert_vector_to_array_for_subscript for qualified vector types [PR89224]

2024-05-07 Thread Andrew Pinski via Gcc-cvs
https://gcc.gnu.org/g:cacc48014c7fdb888b4449830b567e5375dfb4e3 commit r14-10183-gcacc48014c7fdb888b4449830b567e5375dfb4e3 Author: Andrew Pinski Date: Tue Feb 20 13:38:28 2024 -0800 c++/c-common: Fix convert_vector_to_array_for_subscript for qualified vector types [PR89224] After

[gcc r15-309] c++/c-common: Fix convert_vector_to_array_for_subscript for qualified vector types [PR89224]

2024-05-07 Thread Andrew Pinski via Gcc-cvs
https://gcc.gnu.org/g:4421d35167b3083e0f2e4c84c91fded09a30cf22 commit r15-309-g4421d35167b3083e0f2e4c84c91fded09a30cf22 Author: Andrew Pinski Date: Tue Feb 20 13:38:28 2024 -0800 c++/c-common: Fix convert_vector_to_array_for_subscript for qualified vector types [PR89224] After

[gcc r15-308] DCE __cxa_atexit calls where the function is pure/const [PR19661]

2024-05-07 Thread Andrew Pinski via Gcc-cvs
https://gcc.gnu.org/g:c9dd853680b12d9c9def5de61abde5d057c526ba commit r15-308-gc9dd853680b12d9c9def5de61abde5d057c526ba Author: Andrew Pinski Date: Fri Mar 15 16:34:22 2024 -0700 DCE __cxa_atexit calls where the function is pure/const [PR19661] In C++ sometimes you have

[gcc r15-307] MATCH: Add some more value_replacement simplifications (a != 0 ? expr : 0) to match

2024-05-07 Thread Andrew Pinski via Gcc-cvs
https://gcc.gnu.org/g:e472527c7b45d23e8dfd0fb767a6e663b4bc136e commit r15-307-ge472527c7b45d23e8dfd0fb767a6e663b4bc136e Author: Andrew Pinski Date: Tue Apr 30 14:45:26 2024 -0700 MATCH: Add some more value_replacement simplifications (a != 0 ? expr : 0) to match This adds a few

Re: [PATCH] MATCH: Add some more value_replacement simplifications (a != 0 ? expr : 0) to match

2024-05-07 Thread Andrew Pinski
On Tue, May 7, 2024 at 1:45 PM Jeff Law wrote: > > > > On 4/30/24 9:21 PM, Andrew Pinski wrote: > > This adds a few more of what is currently done in phiopt's value_replacement > > to match. I noticed this when I was hooking up phiopt's value_replacement > > c

Re: Tests of gcc development beyond its testsuite (in this case, for gfortran)

2024-05-07 Thread Andrew Pinski via Gcc
(or the compiler > silently ignored them because they were not applicable to my machine - > ugh), the cause of the problem lies elsewhere. AARCH64 armv8-a has FMA as part of its base ISA. So you want to try with `-ffp-contract=off` instead. RDMA turns on/off instructions which are not u

[gcc r15-237] Mention that some options are turned on by `-Ofast` in their descriptions [PR97263]

2024-05-07 Thread Andrew Pinski via Gcc-cvs
https://gcc.gnu.org/g:0920e64ffa55adb063174559b274b0a521f34934 commit r15-237-g0920e64ffa55adb063174559b274b0a521f34934 Author: Andrew Pinski Date: Mon May 6 14:14:41 2024 -0700 Mention that some options are turned on by `-Ofast` in their descriptions [PR97263] Like was done

Re: Tests of gcc development beyond its testsuite (in this case, for gfortran)

2024-05-06 Thread Andrew Pinski via Gcc
ludes an FMA instruction but since the base ISA does not include it, it is not enabled by default. I am suspect the aarch64 "excessive exceeding the threshold for errors" are all caused by the more use of FMA rather than anything else. Thanks, Andrew Pinski > > diff lapack-amd64-gf

[PATCH] Mention that some options are turned on by `-Ofast` in their descriptions [PR97263]

2024-05-06 Thread Andrew Pinski
h): Likewise and use less strong language. Signed-off-by: Andrew Pinski --- gcc/doc/invoke.texi | 41 ++--- 1 file changed, 22 insertions(+), 19 deletions(-) diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index 9456ced468a..14ff4d25da7 100644 --- a/gcc/d

[gcc r15-212] aarch64: Fix gcc.target/aarch64/sve/loop_add_6.c for LLP64 targets

2024-05-06 Thread Andrew Pinski via Gcc-cvs
https://gcc.gnu.org/g:53026cbf08889d00fed34d8667796d22ef8554cf commit r15-212-g53026cbf08889d00fed34d8667796d22ef8554cf Author: Andrew Pinski Date: Mon May 6 12:20:17 2024 -0700 aarch64: Fix gcc.target/aarch64/sve/loop_add_6.c for LLP64 targets Even though the aarch64-mingw32

[COMMITTED] aarch64: Fix gcc.target/aarch64/sve/loop_add_6.c for LLP64 targets

2024-05-06 Thread Andrew Pinski
as obvious after a quick test on aarch64-linux-gnu. gcc/testsuite/ChangeLog: PR testsuite/114177 * gcc.target/aarch64/sve/loop_add_6.c: Use __SIZETYPE__ instead of `unsigned long` for index and offset variables. Signed-off-by: Andrew Pinski --- gcc/testsuite/gcc.target/aarch64

[PATCH] aarch64: Add fcsel to cmov integer and csel to float cmov [PR98477]

2024-05-06 Thread Andrew Pinski
. * config/aarch64/iterators.md (wv): New mode attr. gcc/testsuite/ChangeLog: * gcc.target/aarch64/csel_1.c: New test. * gcc.target/aarch64/fcsel_2.c: New test. Signed-off-by: Andrew Pinski --- gcc/config/aarch64/aarch64.md | 13 +++ gcc/config/aarch64

[PATCH v3] aarch64: Fix normal returns inside functions which use eh_returns [PR114843]

2024-05-05 Thread Andrew Pinski
-torture/execute/eh_return-5.c: New test. * gcc.target/aarch64/eh_return-4.c: New test. Signed-off-by: Andrew Pinski --- gcc/config/aarch64/aarch64-protos.h | 1 + gcc/config/aarch64/aarch64.cc | 78 ++- gcc/config/aarch64/aarch64.h

[gcc r15-166] Remove m_nloops field from loop_versioning

2024-05-04 Thread Andrew Pinski via Gcc-cvs
https://gcc.gnu.org/g:ffb521f157fec823907913602ed5cb73dd1c63e8 commit r15-166-gffb521f157fec823907913602ed5cb73dd1c63e8 Author: Andrew Pinski Date: Sat Apr 27 18:54:43 2024 -0700 Remove m_nloops field from loop_versioning This is a small cleanup of loop_versioning where m_nloops

[PATCH v3] DCE __cxa_atexit calls where the function is pure/const [PR19661]

2024-05-04 Thread Andrew Pinski
g/tree-ssa/cxa_atexit-5.C: New test. * g++.dg/tree-ssa/cxa_atexit-6.C: New test. Signed-off-by: Andrew Pinski --- gcc/testsuite/g++.dg/tree-ssa/cxa_atexit-1.C | 20 +++ gcc/testsuite/g++.dg/tree-ssa/cxa_atexit-2.C | 21 +++ gcc/testsuite/g++.dg/tree-ssa/cxa_atexit-3.C | 19 ++

[PATCH v2] DCE __cxa_atexit calls where the function is pure/const [PR19661]

2024-05-04 Thread Andrew Pinski
t-6.C: New test. Signed-off-by: Andrew Pinski --- gcc/testsuite/g++.dg/tree-ssa/cxa_atexit-1.C | 20 +++ gcc/testsuite/g++.dg/tree-ssa/cxa_atexit-2.C | 21 +++ gcc/testsuite/g++.dg/tree-ssa/cxa_atexit-3.C | 19 +++ gcc/testsuite/g++.dg/tree-ssa/cxa_atexit-4.C | 20 +++ gcc/testsu

[PATCH] aarch64: Support multiple variants including up to 3

2024-05-04 Thread Andrew Pinski
-off-by: Andrew Pinski --- gcc/config/aarch64/driver-aarch64.cc | 14 ++ .../gcc.target/aarch64/cpunative/info_25 | 17 .../gcc.target/aarch64/cpunative/info_26 | 26 +++ .../aarch64/cpunative/native_cpu_25.c | 11

Re: [PATCH 3/3] Add parentheses around DECL_INIT for .original [PR23872]

2024-05-03 Thread Andrew Pinski
On Fri, May 3, 2024 at 4:41 AM Richard Biener wrote: > > On Thu, May 2, 2024 at 11:40 PM Andrew Pinski > wrote: > > > > When we have : > > `void f (int y, int z) { int x = ( z++,y); }` > > > > This would have printed the decl's initializer without >

Re: [PATCH 2/3] Improve DECL_EXPR printing in .original [PR23872]

2024-05-03 Thread Andrew Pinski
On Fri, May 3, 2024 at 4:36 AM Richard Biener wrote: > > On Thu, May 2, 2024 at 11:40 PM Andrew Pinski > wrote: > > > > Right now we don't print that a DECL_EXPR and we get > > basically double output of the decls and it looks confusing. > > This fixes

[gcc r15-139] Fix printing COMPOUND_EXPR in .original [PR23872]

2024-05-03 Thread Andrew Pinski via Gcc-cvs
https://gcc.gnu.org/g:04f24e44fb14a22516444f70503719f3fda15d6c commit r15-139-g04f24e44fb14a22516444f70503719f3fda15d6c Author: Andrew Pinski Date: Tue Apr 16 17:43:36 2024 -0700 Fix printing COMPOUND_EXPR in .original [PR23872] Starting with the merge of the openmp branch

Re: [PATCH] c++: 'typename T::X' vs 'struct T::X' lookup [PR109420]

2024-05-03 Thread Andrew Pinski
On Fri, May 3, 2024 at 8:08 AM Patrick Palka wrote: > > Hey Andrew, > > On Wed, 5 Apr 2023, Andrew Pinski wrote: > > > On Wed, Apr 5, 2023 at 10:32 AM Patrick Palka via Gcc-patches > > wrote: > > > > > > On Wed, 5 Apr 2023, Patrick Palka wrote

RE: [PATCH] DCE __cxa_atexit calls where the function is pure/const [PR19661]

2024-05-03 Thread Andrew Pinski (QUIC)
> -Original Message- > From: Jeff Law > Sent: Friday, May 3, 2024 7:53 AM > To: Andrew Pinski (QUIC) ; gcc- > patc...@gcc.gnu.org > Subject: Re: [PATCH] DCE __cxa_atexit calls where the function is pure/const > [PR19661] > > > > On 5/2/24 3:56

[PATCH] AARCH64: Add Qualcomnm oryon-1 core

2024-05-03 Thread Andrew Pinski
Options): Document oryon-1. Signed-off-by: Andrew Pinski Co-authored-by: Joel Jones Co-authored-by: Wei Zhao --- gcc/config/aarch64/aarch64-cores.def | 5 + gcc/config/aarch64/aarch64-tune.md | 2 +- gcc/doc/invoke.texi | 1 + 3 files changed, 7 insertions(+), 1 deletion

Re: [PATCH] [ranger] Force buffer alignment in Value_Range [PR114912]

2024-05-03 Thread Andrew Pinski
sparc (32bit rather than 64bit). Thanks, Andrew Pinski > > If this is correct, OK for trunk? > > gcc/ChangeLog: > > * value-range.h (class Value_Range): Use a union. > --- > gcc/value-range.h | 24 +++- > 1 file changed, 15 insertions(+), 9

[PATCH] DCE __cxa_atexit calls where the function is pure/const [PR19661]

2024-05-02 Thread Andrew Pinski
t-3.C: New test. * g++.dg/tree-ssa/cxa_atexit-4.C: New test. * g++.dg/tree-ssa/cxa_atexit-5.C: New test. Signed-off-by: Andrew Pinski --- gcc/testsuite/g++.dg/tree-ssa/cxa_atexit-1.C | 20 + gcc/testsuite/g++.dg/tree-ssa/cxa_atexit-2.C | 21 ++ gcc/testsuite/g++.d

[PATCH 2/3] Improve DECL_EXPR printing in .original [PR23872]

2024-05-02 Thread Andrew Pinski
s_stmt and don't print a semicolon nor the initializer. * tree-pretty-print.h (print_declaration): Add bool argument and default it to true. Signed-off-by: Andrew Pinski --- gcc/tree-pretty-print.cc | 18 +++--- gcc/tree-pretty-print.h | 2 +- 2 files chang

[PATCH 3/3] Add parentheses around DECL_INIT for .original [PR23872]

2024-05-02 Thread Andrew Pinski
. Bootstrapped and tested on x86_64-linux-gnu. gcc/ChangeLog: * tree-pretty-print.cc (print_declaration): Add parenthese around DECL_INIT if it was a COMPOUND_EXPR. Signed-off-by: Andrew Pinski --- gcc/tree-pretty-print.cc | 9 - 1 file changed, 8 insertions(+), 1

[PATCH 1/3] Fix printing COMPOUND_EXPR in .original [PR23872]

2024-05-02 Thread Andrew Pinski
e ): Fix calls to dump_generic_node and also remove unreachable code that is testing `flags & TDF_SLIM`. gcc/testsuite/ChangeLog: * gfortran.dg/gomp/atomic-21.f90: Update testcase for the removal of `;`. Signed-off-by: Andrew Pinski --- gcc/testsuite/gfortran.dg/gomp/a

Re: [COMMITTED] Reduce startup costs for Value_Range.

2024-05-01 Thread Andrew Pinski
C with? I suspect this is making a difference. It might also be the sparc compiler that both of you two are using is causing wrong code with some more complex C++ code even though it is at -O0. The adding of the deconstructor to Value_Range might be causing the structure to become a "non-POD" and different argument passing and it was broken even at -O0 (this is just a guess). Thanks, Andrew Pinski > > Ian

[PATCH] MATCH: Add some more value_replacement simplifications (a != 0 ? expr : 0) to match

2024-04-30 Thread Andrew Pinski
ssa/phi-opt-value-5.c: New test. Signed-off-by: Andrew Pinski --- gcc/match.pd | 18 + .../gcc.dg/tree-ssa/phi-opt-value-5.c | 39 +++ 2 files changed, 57 insertions(+) create mode 100644 gcc/testsuite/gcc.dg/tree-ssa/phi-opt-value-

Re: [PATCH] c++/c-common: Fix convert_vector_to_array_for_subscript for qualified vector types [PR89224]

2024-04-30 Thread Andrew Pinski
On Tue, Apr 30, 2024 at 11:54 AM Jason Merrill wrote: > > On 2/20/24 19:06, Andrew Pinski wrote: > > After r7-987-gf17a223de829cb, the access for the elements of a vector type > > would lose the qualifiers. > > So if we had `constvector[0]`, the type of the el

[COMMITTED] Fix the build: error message `quote`

2024-04-30 Thread Andrew Pinski
quote mark to shut up the warning. Signed-off-by: Andrew Pinski --- gcc/tree-cfg.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/tree-cfg.cc b/gcc/tree-cfg.cc index 1c5b7df8541..b2d47b72084 100644 --- a/gcc/tree-cfg.cc +++ b/gcc/tree-cfg.cc @@ -4842,7 +4842,7

[gcc r15-77] Fix the build: error message `quote`

2024-04-30 Thread Andrew Pinski via Gcc-cvs
https://gcc.gnu.org/g:1ff71f71a13f5ed423389d20ed34f3217e632777 commit r15-77-g1ff71f71a13f5ed423389d20ed34f3217e632777 Author: Andrew Pinski Date: Tue Apr 30 09:44:52 2024 -0700 Fix the build: error message `quote` The problem here is the quote mark is for English's

[gcc r15-74] MATCH: change single_non_singleton_phi_for_edges for singleton phis

2024-04-30 Thread Andrew Pinski via Gcc-cvs
https://gcc.gnu.org/g:9c18bdb07e299b25e7526fea16659c7ff8f0d14e commit r15-74-g9c18bdb07e299b25e7526fea16659c7ff8f0d14e Author: Andrew Pinski Date: Sat Apr 27 18:54:44 2024 -0700 MATCH: change single_non_singleton_phi_for_edges for singleton phis I noticed

[gcc r15-76] PHIOPT: Value-replacement check undef

2024-04-30 Thread Andrew Pinski via Gcc-cvs
https://gcc.gnu.org/g:a30d2e6bd0b965e7687f58530a767a3c3b079158 commit r15-76-ga30d2e6bd0b965e7687f58530a767a3c3b079158 Author: Andrew Pinski Date: Sun Apr 28 20:21:02 2024 -0700 PHIOPT: Value-replacement check undef While moving value replacement part of PHIOPT over to use

[gcc r15-75] PHI-OPT: speed up value_replacement slightly

2024-04-30 Thread Andrew Pinski via Gcc-cvs
https://gcc.gnu.org/g:611815e0233302e1fa113e6f865fa450b7ae commit r15-75-g611815e0233302e1fa113e6f865fa450b7ae Author: Andrew Pinski Date: Sat Apr 27 18:54:45 2024 -0700 PHI-OPT: speed up value_replacement slightly This adds a few early outs to value_replacement that I

[gcc r15-73] Remove support for nontemporal stores with ssa_names on lhs [PR112976]

2024-04-30 Thread Andrew Pinski via Gcc-cvs
https://gcc.gnu.org/g:8614d60233a64afd7e28ae7af2ab74c4a5b06010 commit r15-73-g8614d60233a64afd7e28ae7af2ab74c4a5b06010 Author: Andrew Pinski Date: Wed Apr 17 14:30:06 2024 -0700 Remove support for nontemporal stores with ssa_names on lhs [PR112976] When cfgexpand was changed

[gcc r15-72] Add verification of gimple_assign_nontemporal_move_p [PR112976]

2024-04-30 Thread Andrew Pinski via Gcc-cvs
https://gcc.gnu.org/g:e3a7f359c18bf347f6ac8fcda05e9839fac5bd62 commit r15-72-ge3a7f359c18bf347f6ac8fcda05e9839fac5bd62 Author: Andrew Pinski Date: Wed Apr 17 14:12:17 2024 -0700 Add verification of gimple_assign_nontemporal_move_p [PR112976] Currently the middle-end only knows

Re: Question about information from -fdump-rtl-sched2 on M1 Max

2024-04-29 Thread Andrew Pinski via Gcc
it. Especially when it comes cores that don't have not been upstream directly from the company that produces them. The default scheduling model is cortex-a53 anyways. And you didn't use -mtune= nor -mcpu=; only -march=native which just changes the arch features and not the tuning or scheduler model.

[PATCH] PHIOPT: Value-replacement check undef

2024-04-29 Thread Andrew Pinski
-gnu with no regressions. gcc/ChangeLog: * tree-ssa-phiopt.cc (value_replacement): Reject undef variables so they don't become unconditional used. Signed-off-by: Andrew Pinski --- gcc/tree-ssa-phiopt.cc | 7 +++ 1 file changed, 7 insertions(+) diff --git a/gcc/tree-ssa

[PATCH 2/2] PHI-OPT: speed up value_replacement slightly

2024-04-28 Thread Andrew Pinski
as calculating empty_or_with_defined_p is an IR walk for a BB and that might be big. Bootstrapped and tested on x86_64-linux-gnu with no regressions. gcc/ChangeLog: * tree-ssa-phiopt.cc (value_replacement): Move check for NE/EQ earlier. Signed-off-by: Andrew Pinski --- gcc/tree

[PATCH 1/2] MATCH: change single_non_singleton_phi_for_edges for singleton phis

2024-04-28 Thread Andrew Pinski
that check actually reduces the number of pointer walks needed. Bootstrapped and tested on x86_64-linux-gnu with no regressions. gcc/ChangeLog: * tree-ssa-phiopt.cc (single_non_singleton_phi_for_edges): Remove the special case of gimple_seq_singleton_p. Signed-off-by: Andrew Pinski

[gcc r15-12] aarch64: Use vec_perm_indices::new_shrunk_vector in aarch64_evpc_reencode

2024-04-27 Thread Andrew Pinski via Gcc-cvs
https://gcc.gnu.org/g:f91569e779041e2723be23d31c2a79f1861efc7f commit r15-12-gf91569e779041e2723be23d31c2a79f1861efc7f Author: Andrew Pinski Date: Mon Feb 12 15:48:48 2024 -0800 aarch64: Use vec_perm_indices::new_shrunk_vector in aarch64_evpc_reencode While working on PERM

[PATCH] Remove m_nloops field from loop_versioning

2024-04-26 Thread Andrew Pinski
This is a small cleanup of loop_versioning where m_nloops is only used in the constructor so we can remove the whole field. Bootstrapped and tested on x86_64-linux-gnu. gcc/ChangeLog: * gimple-loop-versioning.cc (loop_versioning): Remove m_nloops field.

[PATCH 1/2] Add verification of gimple_assign_nontemporal_move_p [PR112976]

2024-04-26 Thread Andrew Pinski
: PR middle-end/112976 * tree-cfg.cc (verify_gimple_assign): Verify that nontmporal moves are stores. * gimple.h (struct gimple): Note that only nontemporal stores are supported. Signed-off-by: Andrew Pinski --- gcc/gimple.h| 3 ++- gcc/tree-cfg.cc | 11

[PATCH 2/2] Remove support for nontemporal stores with ssa_names on lhs [PR112976]

2024-04-26 Thread Andrew Pinski
is not a nontemporal store. Bootstrapped and tested on x86_64-linux-gnu. gcc/ChangeLog: PR middle-end/112976 * cfgexpand.cc (expand_gimple_stmt_1): Remove support for expanding nontemporal "moves" with ssa names on the LHS. Signed-off-by: Andrew Pinski

Re: for discussion: should we close all the Java-related bugs?

2024-04-26 Thread Andrew Pinski via Gcc-bugs
a project and might become more active in the future. So closing these as won't fix is NOT the correct thing to do unless the classpath project itself has decided it no longer wants to use the GCC's bugzilla instance or has decided it is no longer being a project. Thanks, Andrew Pinski > > Sincerely, > > Abe

[PATCH] aarch64: Use cinc for small constants instead of just add [PR112304]

2024-04-26 Thread Andrew Pinski
on aarch64-linux-gnu with no regressions. PR target/112304 gcc/ChangeLog: * config/aarch64/aarch64.md (*csinc2_insn): Change the predicate of the 1st operand to general_operand. gcc/testsuite/ChangeLog: * gcc.target/aarch64/cinc-2.c: New test. Signed-off-by: And

[PATCH] aarch64: Fix normal returns inside functions which use eh_returns [PR114843]

2024-04-26 Thread Andrew Pinski
-torture/execute/eh_return-1.c: New test. * gcc.c-torture/execute/eh_return-2.c: New test. * gcc.c-torture/execute/eh_return-3.c: New test. * gcc.c-torture/execute/eh_return-4.c: New test. * gcc.target/aarch64/eh_return-4.c: New test. Signed-off-by: Andrew Pinski

Re: Build errors for older versions

2024-04-25 Thread Andrew Pinski via Gcc
orks? Basically glibc's check for GCC version is only designed for released versions of GCC. So bisecting GCC means sometimes that check will break. I have not fully looked into it but maybe glibc folks can provide a workaround to disable the version check to assume a much older version of GCC here. Thanks, Andrew Pinski > > Cheers, > Stefan

gcc-wwwdocs branch master updated. aef6b8ef509ad182c79437476ef1ee4643a754be

2024-04-17 Thread Andrew Pinski via Gcc-cvs-wwwdocs
--- commit aef6b8ef509ad182c79437476ef1ee4643a754be Author: Andrew Pinski Date: Wed Apr 17 20:22:13 2024 -0700 Fix link on gcc-13/changes.html Just fixes the link to the manual for the new -nostdlib++ option. Signed-off-by: Andrew Pinski diff --git a/htdocs/gcc-13/changes.html b/htdocs/gcc-13/changes.

[PATCH] Fix link on gcc-13/changes.html

2024-04-17 Thread Andrew Pinski
Just fixes the link to the manual for the new -nostdlib++ option. Signed-off-by: Andrew Pinski --- htdocs/gcc-13/changes.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/gcc-13/changes.html b/htdocs/gcc-13/changes.html index 6930bd58..4384c329 100644 --- a/htdocs

Re: [PATCH 1/2] Driver: Add new -truncate option

2024-04-17 Thread Andrew Pinski
document this option or not. On one hand it is only supposed to be used by lto but on the other hand, someone could use it on accident from the command line and we would get a bug report saying the file passed to it is now 0. Thanks, Andrew Pinski > > Signed-off-by: Peter Damianov > --- &

Request for testing on non-Linux targets; remove special casing of /usr/lib and /lib from the driver

2024-04-16 Thread Andrew Pinski (QUIC)
1992, I request some folks to test it on AIX, Mac OS (Darwin) and solaris where the ld is not GNU bfd ld as I don't have access to those targets currently. Thanks, Andrew Pinski 0001-Don-t-remove-usr-lib-and-lib-from-when-passing-to-th.patch Description: 0001-Don-t-remove-usr-lib-and-lib-from-when-passing-to-th.patch

Re: [PATCH] build: Check for cargo when building rust language

2024-04-16 Thread Andrew Pinski
On Mon, Apr 8, 2024 at 9:39 AM wrote: > > From: Pierre-Emmanuel Patry > > Hello, > > The rust frontend requires cargo to build some of it's components, > it's presence was not checked during configuration. WHY did this go in right before the release of GCC 14? I don't get why this is considered

Re: [PATCH] build: Check for cargo when building rust language

2024-04-16 Thread Andrew Pinski
On Mon, Apr 8, 2024 at 9:39 AM wrote: > > From: Pierre-Emmanuel Patry > > Hello, > > The rust frontend requires cargo to build some of it's components, > it's presence was not checked during configuration. WHY did this go in right before the release of GCC 14? I don't get why this is considered

[gcc r14-9994] Document that vector_size works with typedefs [PR92880]

2024-04-16 Thread Andrew Pinski via Gcc-cvs
https://gcc.gnu.org/g:8eddd87da2dd01c841f9742f973f65ebe0a88e71 commit r14-9994-g8eddd87da2dd01c841f9742f973f65ebe0a88e71 Author: Andrew Pinski Date: Mon Apr 15 17:13:36 2024 -0700 Document that vector_size works with typedefs [PR92880] This just adds a clause to make it more

[PATCH] Document that vector_size works with typedefs [PR92880]

2024-04-15 Thread Andrew Pinski
Vector Instructions): Add that the base_types could be a typedef of them. Signed-off-by: Andrew Pinski --- gcc/doc/extend.texi | 13 +++-- 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/gcc/doc/extend.texi b/gcc/doc/extend.texi index 7b54a241a7b..e290265d68d 100644

[gcc r14-9941] match: Fix `!a?b:c` and `a?~t:t` patterns for signed 1 bit types [PR114666]

2024-04-12 Thread Andrew Pinski via Gcc-cvs
https://gcc.gnu.org/g:245595d72818526e2ca857848831e8afa87ae2de commit r14-9941-g245595d72818526e2ca857848831e8afa87ae2de Author: Andrew Pinski Date: Wed Apr 10 13:39:01 2024 -0700 match: Fix `!a?b:c` and `a?~t:t` patterns for signed 1 bit types [PR114666] The problem is `!a?b:c

[PATCH v2] match: Fix `!a?b:c` and `a?~t:t` patterns for signed 1 bit types [PR114666]

2024-04-11 Thread Andrew Pinski
signed types for the condition. (`a?~t:t`): Likewise. gcc/testsuite/ChangeLog: * gcc.c-torture/execute/bitfld-signed1-1.c: New test. Signed-off-by: Andrew Pinski --- gcc/match.pd| 6 +- .../gcc.c-torture/execute/bitfld-signed1-1.c

RE: [PATCH] match: Fix `!a?b:c` and `a?~t:t` patterns for signed 1 bit types [PR114666]

2024-04-11 Thread Andrew Pinski (QUIC)
> -Original Message- > From: Richard Biener > Sent: Thursday, April 11, 2024 2:31 AM > To: Andrew Pinski (QUIC) > Cc: gcc-patches@gcc.gnu.org > Subject: Re: [PATCH] match: Fix `!a?b:c` and `a?~t:t` patterns for signed 1 > bit > types [PR114666] > > On

[PATCH] match: Fix `!a?b:c` and `a?~t:t` patterns for signed 1 bit types [PR114666]

2024-04-11 Thread Andrew Pinski
/ChangeLog: * match.pd (`!a?b:c`): Cast `a` to boolean type for cond for gimple. (`a?~t:t`): Cast `a` to boolean type before casting it to the type. gcc/testsuite/ChangeLog: * gcc.c-torture/execute/bitfld-signed1-1.c: New test. Signed-off-by: Andrew Pinski

COND_EXPR (?:) and its first operand in gimple

2024-04-09 Thread Andrew Pinski (QUIC) via Gcc
While looking into PR 114666, I noticed that we don't verify COND_EXPR's first operand. In most of my recent patches to match.pd, I was assuming that it would be a boolean (or a type which would contain [0,1]) but this PR shows we could end up with an 1-bit signed integer in there. We could fix

  1   2   3   4   5   6   7   8   9   10   >