[PATCH] Use simple_dce_from_worklist in phiprop

2024-05-23 Thread Andrew Pinski
to it. (propagate_with_phi): Add dce_ssa_names argument. Update call to phiprop_insert_phi. (pass_phiprop::execute): Update call to propagate_with_phi. Call simple_dce_from_worklist if there was a change. Signed-off-by: Andrew Pinski --- gcc/tree-ssa-phiprop.cc | 28

Re: [PATCH] [RFC] Target-independent store forwarding avoidance. [PR48696] Target-independent store forwarding avoidance.

2024-05-23 Thread Andrew Pinski
On Thu, May 23, 2024 at 8:01 AM Manolis Tsamis wrote: > > This pass detects cases of expensive store forwarding and tries to avoid them > by reordering the stores and using suitable bit insertion sequences. > For example it can transform this: > > strbw2, [x1, 1] > ldr x0, [x1]

Re: [PATCH] AARCH64: Add Qualcomnm oryon-1 core

2024-05-22 Thread Andrew Pinski
On Tue, May 14, 2024 at 10:27 AM Kyrill Tkachov wrote: > > Hi Andrew, > > On Fri, May 3, 2024 at 8:50 PM Andrew Pinski wrote: >> >> This patch adds Qualcomm's new oryon-1 core; this is enough >> to recongize the core and later on will add the tuning

Re: [PATCH] aarch64: Fold vget_high_* intrinsics to BIT_FIELD_REF [PR102171]

2024-05-22 Thread Andrew Pinski
On Wed, May 22, 2024 at 5:28 AM Richard Sandiford wrote: > > Pengxuan Zheng writes: > > This patch is a follow-up of r15-697-ga2e4fe5a53cf75 to also fold > > vget_high_* > > intrinsics to BIT_FILED_REF and remove the vget_high_* definitions from > > arm_neon.h to use the new intrinsics

Re: [PATCH v1 1/2] Match: Support __builtin_add_overflow branch form for unsigned SAT_ADD

2024-05-21 Thread Andrew Pinski
ly the :c is not needed and genmatch will just generate extra matching code that cannot be not get reached Thanks, Andrew. > > > > Pan > > > > > > From: Andrew Pinski > Sent: Tuesday, May 21, 2024 7:40 PM > To: Li, Pan2 > Cc: GCC Patches ; 钟居哲 ; Kito &g

Re: [PATCH] driver: Use -as/ld as final fallback instead of as/ld for cross

2024-05-21 Thread Andrew Pinski
uld simplify things slightly. You should also most likely use concat here instead of XNEWVEC/strcpy/strcat which will also simplify the code. Like string = concat (DEFAULT_REAL_TARGET_MACHINE, "-", commands[0].prog); I think this should be done for more than just as/ld but also objcopy (w

Re: [PATCH v1 1/2] Match: Support __builtin_add_overflow branch form for unsigned SAT_ADD

2024-05-21 Thread Andrew Pinski
On Tue, May 21, 2024, 3:55 AM wrote: > From: Pan Li > > This patch would like to support the __builtin_add_overflow branch form for > unsigned SAT_ADD. For example as below: > > uint64_t > sat_add (uint64_t x, uint64_t y) > { > uint64_t ret; > return __builtin_add_overflow (x, y, ) ? -1 :

[PATCH] match: Disable `(type)zero_one_valuep*CST` for 1bit signed types [PR115154]

2024-05-20 Thread Andrew Pinski
/execute/signed1bitfield-1.c: New test. Signed-off-by: Andrew Pinski --- gcc/match.pd | 6 +++-- .../c-c++-common/ubsan/signed1bitfield-1.c| 25 +++ .../gcc.c-torture/execute/signed1bitfield-1.c | 23 + 3 files changed, 52

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

2024-05-20 Thread Andrew Pinski (QUIC)
> -Original Message- > From: Richard Biener > Sent: Sunday, May 19, 2024 11:55 AM > To: Andrew Pinski (QUIC) > Cc: gcc-patches@gcc.gnu.org > Subject: Re: [PATCH] PHIOPT: Don't transform minmax if > middle bb contains a phi [PR115143] > > > > > A

Re: [PATCH] aarch64: Fold vget_low_* intrinsics to BIT_FIELD_REF [PR102171]

2024-05-20 Thread Andrew Pinski
On Mon, May 20, 2024 at 2:57 AM Richard Sandiford wrote: > > Pengxuan Zheng writes: > > This patch folds vget_low_* intrinsics to BIT_FILED_REF to open up more > > optimization opportunities for gimple optimizers. > > > > While we are here, we also remove the vget_low_* definitions from > >

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 >

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

[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

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

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. >

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) >

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

[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

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

[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

[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

[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

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

[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

[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

[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

[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

[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

[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

Re: [PATCH] libgfortran: Disable gthreads weak symbols for glibc 2.34

2024-04-09 Thread Andrew Pinski
On Tue, Apr 9, 2024, 10:07 H.J. Lu wrote: > Since Glibc 2.34 all pthreads symbols are defined directly in libc not > libpthread, and since Glibc 2.32 we have used __libc_single_threaded to > avoid unnecessary locking in single-threaded programs. This means there > is no reason to avoid linking

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

2024-04-09 Thread Andrew Pinski
way to cache and use those specific versions using cargo, that should be done but I suspect cargo does not work that way. Also any time someone says this is a temporary measure it is NOT and we should never treat it as such unless you already have a patch to remove it. Thanks, Andrew Pinski >

RE: [PATCH] Another ICE after conflicting types of redeclaration [PR110682]

2024-04-08 Thread Andrew Pinski (QUIC)
> -Original Message- > From: Andrew Pinski (QUIC) > Sent: Friday, March 22, 2024 10:50 PM > To: gcc-patches@gcc.gnu.org > Cc: Andrew Pinski (QUIC) > Subject: [PATCH] Another ICE after conflicting types of redeclaration > [PR110682] > > This another one of t

Re: [PATCH/RFC] On the use of -funreachable-traps to deal with PR 109627

2024-04-08 Thread Andrew Pinski
u want. Thanks, Andrew Pinski > > These are causing issues for some linkers because such functions result in > FDEs with a 0 code extent. > > The simplest representation of this is (from PR109527) > > void foo () { __builtin_unreachable (); } > > The solution (so far) is

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

2024-04-05 Thread Andrew Pinski
f it (that does the combining and not the optimizations part) included in isel or pass_optimize_widening_mul (which itself should most likely become part of isel or renamed since it handles more than just widening multiply these days). Thanks, Andrew Pinski > > PR 102793 > > g

Re: [PATCH v3] tree-profile: Disable indirect call profiling for IFUNC resolvers

2024-04-03 Thread Andrew Pinski
le-generate) is adding TLS usage to the ifunc resolver which then causes issues. And the use of TLS causes a PLT call to be inside the ifun which causes all the fun stuff. This is not about ifunc resolves using TLS directly in code but rather indirectly via -fprofile-generate. Thanks, Andrew Pinski > > Peter > >

[COMMITTED] Use fatal_error instead of internal_error for when ZSTD is not enabled

2024-03-28 Thread Andrew Pinski
of internal_error when ZSTD is not enabled. Signed-off-by: Andrew Pinski --- gcc/lto-compress.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/lto-compress.cc b/gcc/lto-compress.cc index c167ac967aa..bebf0277ef6 100644 --- a/gcc/lto-compress.cc +++ b/gcc/lto-compress.cc

Re: No rule to make target '../libbacktrace/libbacktrace.la', needed by 'libgo.la'. [PR106472]

2024-03-28 Thread Andrew Pinski
th a target library and a host library. Take a cross compiler that is being built on say target A and targeting target B. It will be built as a host library to be included as part of the cc1/cc1plus/etc. and be a target library that will be used for libsanitizer (and libgo). The GCC build does not use

Re: [PATCH v1] doc: Correction of Tree SSA Passes info.

2024-03-25 Thread Andrew Pinski
On Sun, Mar 24, 2024 at 8:46 PM Chenghui Pan wrote: > > Current document of Tree SSA passes contains many parts that is not > updated for many years. > > This patch removes some info that is outdated and not existed in > current GCC codebase, and fixes some wrong code location descriptions >

[PATCH] Another ICE after conflicting types of redeclaration [PR110682]

2024-03-22 Thread Andrew Pinski
with an error operand. gcc/testsuite/ChangeLog: PR c/110682 * gcc.dg/redecl-27.c: New test. Signed-off-by: Andrew Pinski --- gcc/gimplify.cc | 6 +- gcc/testsuite/gcc.dg/redecl-27.c | 14 ++ 2 files changed, 19 insertions(+), 1 deletion(-) create

[PATCH] Another ICE after conflicting types of redeclaration [PR109619]

2024-03-21 Thread Andrew Pinski
. (fold_builtin_2): Likewise. (fold_builtin_3): Likewise. gcc/testsuite/ChangeLog: PR c/109619 * gcc.dg/redecl-26.c: New test. Signed-off-by: Andrew Pinski --- gcc/builtins.cc | 12 ++-- gcc/testsuite/gcc.dg/redecl-26.c | 14 ++ 2

Re: [PATCH] cpp: new built-in __EXP_COUNTER__

2024-03-21 Thread Andrew Pinski
On Thu, Mar 21, 2024, 17:20 Kaz Kylheku wrote: > On 2024-03-20 16:34, rep.dot@gmail.com wrote: > > On 19 March 2024 18:27:13 CET, Kaz Kylheku wrote: > >>On 2024-03-18 00:30, Jonathan Wakely wrote: > >>> I don't have an opinion on the implementation, or the proposal itself, > >>> except that

Re: [PATCH v2 00/13] Add aarch64-w64-mingw32 target

2024-03-18 Thread Andrew Pinski
aarch64 mingw ABI support for a long time. Does this > patch series introduce a different ABI? > If yes, do you have a summary? > > Does the patch need any adaptation on the LLVM side, or should a > different target triple be picked? > I have always been wondering what "32&q

Re: C/C++ frontend patches ping

2024-03-14 Thread Andrew Pinski
3933.html Both of these were posted long after the start of stage 3 and close into the beginning of stage 4 and since they are both new features I really doubt they will be reviewed until stage 1 opens up which will be in about a month or so. Thanks, Andrew Pinski

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

2024-03-12 Thread Andrew Pinski (QUIC)
> -Original Message- > From: Andrew Pinski (QUIC) > Sent: Sunday, March 10, 2024 7:58 PM > To: gcc-patches@gcc.gnu.org > Cc: Andrew Pinski (QUIC) > Subject: [COMMITTED] Fold: Fix up merge_truthop_with_opposite_arm for > NaNs [PR95351]

RE: [Committed] Reject -fno-multiflags [PR114314]

2024-03-12 Thread Andrew Pinski (QUIC)
> -Original Message- > From: Andrew Pinski (QUIC) > Sent: Monday, March 11, 2024 8:59 PM > To: gcc-patches@gcc.gnu.org > Cc: Andrew Pinski (QUIC) > Subject: [Committed] Reject -fno-multiflags [PR114314] > > When -fmultiflags option support was added in

[Committed] Reject -fno-multiflags [PR114314]

2024-03-11 Thread Andrew Pinski
(fmultiflags): Add RejectNegative. Signed-off-by: Andrew Pinski --- gcc/common.opt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/common.opt b/gcc/common.opt index 51c4a17da83..1ad0169bd6f 100644 --- a/gcc/common.opt +++ b/gcc/common.opt @@ -2295,7 +2295,7 @@ Common Var

Re: [RFC] [PR tree-optimization/92539] Optimize away tests against invalid pointers

2024-03-10 Thread Andrew Pinski
On Sun, Mar 10, 2024 at 2:09 PM Jeff Law wrote: > > > > On 3/10/24 3:05 PM, Andrew Pinski wrote: > > On Sun, Mar 10, 2024 at 2:04 PM Jeff Law wrote: > >> > >> Here's a potential approach to fixing PR92539, a P2 -Warray-bounds false > >> positiv

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

2024-03-10 Thread Andrew Pinski
-1.c: New test. Signed-off-by: Andrew Pinski --- gcc/fold-const.cc | 3 ++- gcc/testsuite/gcc.dg/float_opposite_arm-1.c | 17 + 2 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 gcc/testsuite/gcc.dg/float_opposite_arm-1.c diff --git

Re: [RFC] [PR tree-optimization/92539] Optimize away tests against invalid pointers

2024-03-10 Thread Andrew Pinski
On Sun, Mar 10, 2024 at 2:04 PM Jeff Law wrote: > > Here's a potential approach to fixing PR92539, a P2 -Warray-bounds false > positive triggered by loop unrolling. > > As I speculated a couple years ago, we could eliminate the comparisons > against bogus pointers. Consider: > > >[local

Re: [PATCH] testsuite: xfail test for arm

2024-03-09 Thread Andrew Pinski
xfail part). Also makes sense to add a reference to r14-6517-gb7e4a4c626e to the dg-bogus in the source too. Thanks, Andrew Pinski > > -- > > On arm-none-eabi, the test case fails with > .../null-deref-pr108251-smp_fetch_ssl_fc_has_early-O2.c:63:65: warning: > converting a packed

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

2024-03-06 Thread Andrew Pinski (QUIC)
> -Original Message- > From: Andrew Pinski (QUIC) > Sent: Tuesday, February 20, 2024 7:06 PM > To: gcc-patches@gcc.gnu.org > Cc: Andrew Pinski (QUIC) > Subject: [PATCH] c++/c-common: Fix convert_vector_to_array_for_subscript > for qualified vector types [PR892

Re: [committed] d: Fix gdc -O2 -mavx generates misaligned vmovdqa instruction [PR114171]

2024-03-03 Thread Andrew Pinski
))); > > + tmode = build_aligned_type (tmode, TYPE_ALIGN (stype)); You might also need to build a may_alias variant too. Or make sure the access is using the correct aliasing set. I have not checked if the D front-end does anything special for aliasing sets so I am not su

RE: [PATCH v1 08/13] aarch64: Add Cygwin and MinGW environments for AArch64

2024-02-29 Thread Andrew Pinski (QUIC)
> -Original Message- > From: Maxim Kuvyrkov > Sent: Thursday, February 29, 2024 9:46 AM > To: Andrew Pinski (QUIC) > Cc: Evgeny Karpov ; Andrew Pinski > ; Richard Sandiford ; gcc- > patc...@gcc.gnu.org; 10wa...@gmail.com; m...@harmstone.com; Zac > Walker ; Ron

RE: [PATCH v1 08/13] aarch64: Add Cygwin and MinGW environments for AArch64

2024-02-29 Thread Andrew Pinski (QUIC)
> -Original Message- > From: Evgeny Karpov > Sent: Thursday, February 29, 2024 8:46 AM > To: Andrew Pinski > Cc: Richard Sandiford ; gcc- > patc...@gcc.gnu.org; 10wa...@gmail.com; Maxim Kuvyrkov > ; m...@harmstone.com; Zac Walker > ; Ron Riddle ; Radek > B

Re: [COMMITTED] aarch64: Fix memtag builtins vs GC [PR108174]

2024-02-28 Thread Andrew Pinski
On Wed, Feb 28, 2024 at 11:14 PM Andrew Pinski wrote: > > The memtag builtins were being GC'ed away so we end up > with a crash sometimes (maybe even wrong code). > This fixes that issue by adding GTY on the variable/struct > aarch64_memtag_builtin_data. > > Committed as

[COMMITTED] aarch64: Fix memtag builtins vs GC [PR108174]

2024-02-28 Thread Andrew Pinski
: * config/aarch64/aarch64-builtins.cc (aarch64_memtag_builtin_data): Make static and mark with GTY. gcc/testsuite/ChangeLog: * gcc.target/aarch64/acle/memtag_4.c: New test. Signed-off-by: Andrew Pinski --- gcc/config/aarch64/aarch64-builtins.cc | 2 +- gcc

Re: [PATCH 1/3] Change 'v1' float and int code to fall back to v0

2024-02-28 Thread Andrew Pinski
On Wed, Feb 28, 2024 at 5:35 PM Tom Tromey wrote: > > >>>>> "Andrew" == Andrew Pinski writes: > > Andrew> I don't know how to update the script server side after it is > Andrew> committed in git. the checker script is located in git though: > &

[COMMITTED] Add libcc1 to bug components

2024-02-28 Thread Andrew Pinski
: * gcc-changelog/git_commit.py (bug_components): Add libcc1. Signed-off-by: Andrew Pinski --- contrib/gcc-changelog/git_commit.py | 1 + 1 file changed, 1 insertion(+) diff --git a/contrib/gcc-changelog/git_commit.py b/contrib/gcc-changelog/git_commit.py index 87bec4e00f5..87ecb9e1a17 100755

Re: [PATCH 1/3] Change 'v1' float and int code to fall back to v0

2024-02-28 Thread Andrew Pinski
@@ -109,6 +109,7 @@ bug_components = { 'libffi', 'libfortran', 'libgcc', +'libcc1', 'libgcj', 'libgomp', 'libitm', ``` Thanks, Andrew Pinski > > jeff

  1   2   3   4   5   6   7   8   9   10   >