Re: [PATCH v2 0/6] Add DLL import/export implementation to AArch64

2024-06-26 Thread Andrew Pinski
set = new_alias_set (); return set; } ``` And GOT_ALIAS_SET is used in more than COFF areas. Can you please fix this definition? Thanks, Andrew Pinski > > Regards, > Evgeny > > Evgeny Karpov (6): > Move mingw_* declarations to the mingw folder > Extract ix86 dllimp

Re: [PATCH] LoongArch: Implement scalar isinf, isnormal, and isfinite via fclass

2024-07-21 Thread Andrew Pinski
iltin_isfinite but the patch only handles > __builtin_isinf. There is a patch for that; all 3 were pinged this morning: isinf: https://gcc.gnu.org/pipermail/gcc-patches/2024-July/657879.html isnormal: https://gcc.gnu.org/pipermail/gcc-patches/2024-July/657880.html isfinite: https://gcc.gnu.org/pi

Re: [RFC/PATCH] isel: Fold more in gimple_expand_vec_cond_expr with andc/iorc

2024-07-22 Thread Andrew Pinski
o be adding the cond version of them since at least for aarch64 SVE, bic (andc) can be conditional. Thanks, Andrew Pinski > > BR, > Kewen > - > > PR tree-optimzation/115659 > > gcc/ChangeLog: > > * config/rs6000/rs6000-builtins.def: Update some bif e

Re: [PATCH] MATCH: add abs support for half float

2024-07-22 Thread Andrew Pinski
and others). Other than that it looks good but I can't approve it. Thanks, Andrew Pinski > > Signed-off-by: Kugan Vivekanandarajah > > Bootstrapped and regression test on aarch64-linux-gnu. Is this OK for trunk? > Thanks, > Kugan > > &g

Re: [PATCH] regrename: Skip renaming register pairs [PR115860]

2024-07-22 Thread Andrew Pinski
fine_insn "*tf_to_fprx2_0" [(set (subreg:DF (match_operand:FPRX2 0 "nonimmediate_operand" "+f") 0) (subreg:DF (match_operand:TF1 "general_operand" "v") 0))] ... (define_insn "*tf_to_fprx2_1" [(set (subreg:DF

Re: [PATCH v2] Internal-fn: Only allow type matches mode for internal fn[PR115961]

2024-07-23 Thread Andrew Pinski
gt; + unsigned a : 4; > +}; > + > +static unsigned min_u (unsigned a, unsigned b) > +{ > + return (b < a) ? b : a; > +} > + > +__attribute__((noipa)) > +void bug (e * v, unsigned def, unsigned use) { > + e & defE = *v; > + defE.a = min_u (use + 1, 0xf); > +} > + > +__a

Re: [match.pd PATCH] Fold ctz(-x) as ctz(x).

2024-07-23 Thread Andrew Pinski
tion. ``` int f1(int a) { return __builtin_ctz(__builtin_abs(a)); } ``` Should also be handled. Though this might be good to handle in the backprop pass (gimple-ssa-backprop.cc) which handles sign changes like this already. Thanks, Andrew Pinski > > gcc/testsuite/ChangeLog > * gcc.dg/fold-ctz-1.c: New test case. > > > Thanks in advance, > Roger > -- >

Re: [RFC/PATCH] isel: Fold more in gimple_expand_vec_cond_expr with andc/iorc

2024-07-23 Thread Andrew Pinski
On Mon, Jul 22, 2024 at 7:41 PM Kewen.Lin wrote: > > Hi Andrew, > > on 2024/7/23 08:09, Andrew Pinski wrote: > > On Sun, Jun 30, 2024 at 11:17 PM Kewen.Lin wrote: > >> > >> Hi, > >> > >> As PR115659 shows, assuming c = x CMP y, there are som

[PATCH] optabs/rs6000: Rename iorc and andc to iorn and andn

2024-07-23 Thread Andrew Pinski
functions, ANDC/IORC to ANDN/IORN. Signed-off-by: Andrew Pinski --- gcc/config/rs6000/rs6000-builtins.def | 44 +-- gcc/config/rs6000/rs6000-string.cc| 2 +- gcc/config/rs6000/rs6000.md | 4 +-- gcc/doc/md.texi | 8 ++--- gcc/gimple-isel.cc

Re: [PATCH] c++: diagnose failed qualified lookup into current inst

2024-07-23 Thread Andrew Pinski
-fdelayed-template-parsing . Does it make sense to add a similar one for GCC? See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116064 and https://github.com/llvm/llvm-project/issues/96859 for reference. Thanks, Andrew Pinski > > -- >8 -- > > When the scope of a qualified name is t

Re: [PATCH 7/8] libstdc++: Stop copying all data files into test directory

2024-07-24 Thread Andrew Pinski
entry. I have a patch which calls "string trim" on v3_additional_files before calling split and that seems to fix the problem. I will post it once my testsuite run is done. Thanks, Andrew Pinski > > libstdc++-v3/ChangeLog: > > * testsuite/lib/libstdc++.exp (libstdc++_init): Do not

[PATCH] libstdc++: Fix testsuite for remote testing (and sim)

2024-07-24 Thread Andrew Pinski
7;t look at why it works for native testing though). Ran a full libstdc++ testsuite using a sim board for testing. libstdc++-v3/ChangeLog: * testsuite/lib/libstdc++.exp (v3_target_compile): Call string trim on v3_target_compile before calling split. Signed-off-by: Andrew Pinski --

[PATCH 1/5] aarch64: Rename bic/orn patterns to iorn/andn for vector modes

2024-07-24 Thread Andrew Pinski
/testsuite/ChangeLog: * g++.target/aarch64/vect_cmp-1.C: New test. Signed-off-by: Andrew Pinski --- gcc/config/aarch64/aarch64-simd.md| 20 +- gcc/testsuite/g++.target/aarch64/vect_cmp-1.C | 37 +++ 2 files changed, 47 insertions(+), 10 deletions(-) create

[PATCH 2/5] aarch64: sve: Rename aarch64_bic to standard pattern, andn

2024-07-24 Thread Andrew Pinski
with no regressions. gcc/ChangeLog: * config/aarch64/aarch64-sve-builtins-base.cc (svbic_impl::expand): Update to use andn optab instead of using code_for_aarch64_bic. * config/aarch64/aarch64-sve.md (@aarch64_bic): Rename to ... (andn3): This. Signed-off-by: Andrew

[PATCH 4/5] MATCH: Create BIT_ANDN and BIT_IORN from matching

2024-07-24 Thread Andrew Pinski
Likewise. * gcc.dg/tree-ssa/pr96671-1.c: Likewise. Signed-off-by: Andrew Pinski --- gcc/match.pd | 17 ++ gcc/testsuite/gcc.dg/tree-ssa/bitops-1.c | 10 +++--- gcc/testsuite/gcc.dg/tree-ssa/bitops-6.c | 12 +++ gcc/testsuite/gcc.dg/

[PATCH 3/5] aarch64: Use iorn and andn standard pattern names for scalar modes

2024-07-24 Thread Andrew Pinski
64.md (*_one_cmpl3): Rename to ... (n3): This. (*_one_cmplsidi3_ze): Rename to ... (*nsidi3_ze): this. Signed-off-by: Andrew Pinski --- gcc/config/aarch64/aarch64.md | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/gcc/config/aarch64/aarch64.md

[PATCH 5/5] MATCH: Add an alt pattern for ANDN and IORN with constants

2024-07-24 Thread Andrew Pinski
attern. gcc/testsuite/ChangeLog: * gcc.target/aarch64/bic-cst-2.c: New test. * gcc.target/aarch64/bic_simd-2.c: New test. Signed-off-by: Andrew Pinski --- gcc/match.pd | 10 ++ gcc/testsuite/gcc.target/aarch64/bic-cst-2.c | 31 + g

Re: [PATCH 1/5] aarch64: Rename bic/orn patterns to iorn/andn for vector modes

2024-07-24 Thread Andrew Pinski
On Wed, Jul 24, 2024 at 11:22 PM Kyrylo Tkachov wrote: > > > > > On 25 Jul 2024, at 04:14, Andrew Pinski wrote: > > > > External email: Use caution opening links or attachments > > > > > > This renames the patterns orn3 to iorn3 so it > >

[PATCH] MATCH: Optimize `VEC_SHL_INSERT (dup (A), A)` to just `dup (A) [PR116075]

2024-07-25 Thread Andrew Pinski
.c: New test. * gcc.target/aarch64/sve/dup-insr-2.c: New test. Signed-off-by: Andrew Pinski --- gcc/match.pd | 17 .../gcc.target/aarch64/sve/dup-insr-1.c | 26 +++ .../gcc.target/aarch64/sve/dup-insr-2.c | 26

Re: [PATCH v2] MATCH: Simplify (a ? x : y) eq/ne (b ? x : y) [PR111150]

2024-07-25 Thread Andrew Pinski
On Thu, Jul 25, 2024 at 12:01 PM Adhemerval Zanella Netto wrote: > > > > On 17/07/24 14:00, Andrew Pinski wrote: > > On Wed, Jul 17, 2024 at 5:24 AM Richard Biener > > wrote: > >> > >> On Tue, Jul 16, 2024 at 3:36 PM Eikansh Gupta > >> wrote

[PATCH] aarch64: Fix target/optimize option handling with transiting between O1 to O2

2024-07-25 Thread Andrew Pinski
. PR target/116065 gcc/ChangeLog: * config/aarch64/aarch64.opt (mearly-ra=): Mark as Optimization rather than Save. gcc/testsuite/ChangeLog: * gcc.target/aarch64/sve/target_optimization-1.c: New test. Signed-off-by: Andrew Pinski --- gcc/config/aarch64/aarch64.opt

Re: [PATCH] MATCH: Optimize `VEC_SHL_INSERT (dup (A), A)` to just `dup (A) [PR116075]

2024-07-25 Thread Andrew Pinski
On Thu, Jul 25, 2024 at 10:20 AM Richard Biener wrote: > > > > > Am 25.07.2024 um 17:56 schrieb Andrew Pinski : > > > > It was noticed if we have `.VEC_SHL_INSERT ({ 0, ... }, 0)` it was not > > being > > simplified to just `{ 0, ... }`. This was gener

Re: [PATCH 4/5] MATCH: Create BIT_ANDN and BIT_IORN from matching

2024-07-25 Thread Andrew Pinski
On Thu, Jul 25, 2024 at 5:16 AM Richard Biener wrote: > > On Thu, Jul 25, 2024 at 4:16 AM Andrew Pinski > wrote: > > > > To better create rtl directly from gimple, we can use > > these already internal functions from the gimple. > > > > That is simplify

Re: [PATCH v1 1/2] PR116080: Fix tail call dejagnu checks

2024-07-25 Thread Andrew Pinski
On Thu, Jul 25, 2024 at 4:09 PM Sam James wrote: > > Andi Kleen writes: > > > From: Andi Kleen > > > > - Run the target_effective tail_call checks without optimization to > > match the actual test cases. > > - Add an extra check for external tail calls to handle targets like > > powerpc that can

[PATCH 1/3] isel: Move duplicate comparisons to its own function

2024-07-25 Thread Andrew Pinski
el.cc (pass_gimple_isel::execute): Factor out duplicate comparisons out to ... (duplicate_comparison): New function. Signed-off-by: Andrew Pinski --- gcc/gimple-isel.cc | 66 -- 1 file changed, 35 insertions(+), 31 deletions(-) diff --

[PATCH 3/3] isel: Don't duplicate comparisons for -O0 nor -fno-tree-ter [PR116101]

2024-07-25 Thread Andrew Pinski
ff-by: Andrew Pinski --- gcc/gimple-isel.cc| 5 + .../gcc.dg/tree-ssa/dup_compare_cond-1.c | 19 +++ .../gcc.dg/tree-ssa/dup_compare_cond-2.c | 19 +++ .../gcc.dg/tree-ssa/dup_compare_cond-3.c | 19 +++ 4

[PATCH 2/3] isel: Small cleanup of duplicating comparisons

2024-07-25 Thread Andrew Pinski
aller. (pass_gimple_isel::execute): Don't check how many uses the comparison had and call maybe_duplicate_comparison instead of duplicate_comparison. Signed-off-by: Andrew Pinski --- gcc/gimple-isel.cc | 38 -- 1 file changed, 24 inserti

[PATCH] middle-end: Add and use few helper methods for current_properties

2024-07-26 Thread Andrew Pinski
y): Use prop_set_p. (c_parser_gimple_compound_statement): Use prop_set_p. (c_parser_gimple_goto_stmt): Use prop_set_p. (c_parser_gimple_if_stmt): Use prop_set_p. Signed-off-by: Andrew Pinski --- gcc/c-family/c-gimplify.cc | 2 +- gcc/c/gimple-parser.cc | 20 +--

Re: [PATCH] LoongArch: Use iorn and andn standard pattern names for scalar modes.

2024-07-27 Thread Andrew Pinski
On Sat, Jul 27, 2024 at 1:38 AM Lulu Cheng wrote: > > gcc/ChangeLog: > > * config/loongarch/loongarch.md (n): Rename to ... > (n3): This. Thanks for doing this for loongarch. Once I finish up my patch set; loongarch should get benefit. Also it might be useful after my patch set g

Re: [PATCH] LoongArch: Use iorn and andn standard pattern names.

2024-07-27 Thread Andrew Pinski
gt; * config/loongarch/lsx.md (vandn3): Rename to ... > (andn3): This. . > (vorn3): Rename to ... > (iorn3): This. You might want to add a testcase like I did for aarch64: https://gcc.gnu.org/pipermail/gcc-patches/2024-July/658219.html . Thanks

[PATCH 1/2] middle-end: Remove PROP_no_crit_edges [PR116114]

2024-07-27 Thread Andrew Pinski
s provided. * tree-ssa-sink.cc (pass_data_sink_code): Remove comment about PROP_no_crit_edges. Signed-off-by: Andrew Pinski --- gcc/function.h | 2 +- gcc/passes.cc| 2 -- gcc/tree-cfg.cc | 2 +- gcc/tree-ssa-sink.cc | 2 -- 4 files changed, 2 insertions(+), 6 deletions(-)

[PATCH 2/2] middle-end: Move the function current properties over to a .def file [PR116118]

2024-07-27 Thread Andrew Pinski
use an array. * ir-prop.def: New file. Signed-off-by: Andrew Pinski --- gcc/function.h | 47 --- gcc/ir-prop.def | 45 + gcc/passes.cc | 45 +++-- 3 fi

Re: [PATCH] MATCH: add abs support for half float

2024-07-29 Thread Andrew Pinski
d Biener > > > wrote: > > > > > > > > On Tue, Jul 23, 2024 at 10:27 AM Kugan Vivekanandarajah > > > > wrote: > > > > > > > > > > On Tue, Jul 23, 2024 at 10:35 AM Andrew Pinski > > > > > wrote: > > &g

[PATCH 1/2] match: Fix types matching for `(?:) !=/== (?:)` [PR116134]

2024-07-30 Thread Andrew Pinski
e-end/116134 gcc/ChangeLog: * match.pd (`(a ? x : y) eq/ne (b ? x : y)`): Check that a and b types match. (`(a ? x : y) eq/ne (b ? y : x)`): Likewise. gcc/testsuite/ChangeLog: * gcc.dg/torture/pr116134-1.c: New test. Signed-off-by: Andrew Pinski --- gcc/mat

[PATCH 2/2] match: Fix wrong code due to `(a ? e : f) !=/== (b ? e : f)` patterns [PR116120]

2024-07-30 Thread Andrew Pinski
* g++.dg/tree-ssa/pr50.C: Add extra checks on the test. * gcc.dg/tree-ssa/pr50-1.c: Likewise. * gcc.dg/tree-ssa/pr50.c: Likewise. * g++.dg/torture/pr116120-1.c: New test. * g++.dg/torture/pr116120-2.c: New test. Signed-off-by: Andrew Pinsk

Re: [PATCH 2/2] Add AVX2 code path to lexer

2024-07-30 Thread Andrew Pinski
;& !defined(__AVX2__) > /* A version of the fast scanner using SSE 4.2 vectorized string insns. */ > > static const uchar * > @@ -425,6 +438,71 @@ search_line_sse42 (const uchar *s, const uchar *end) > #define search_line_sse42 search_line_sse2 > #endif > > +#ifdef H

Re: [PATCH] RISC-V: Add deprecation warning to LP64E abi

2024-07-30 Thread Andrew Pinski
If you need LP64E to please notify GCC project via https://gcc.gnu.org/PR116152";); } ``` Or something to that effect, that is use the note function. The if around the warning function is to have the note only emit if the warning is emitted. Thanks, Andrew Pinski > + >/* Zfi

Re: [PATCH 2/2] match: Fix wrong code due to `(a ? e : f) !=/== (b ? e : f)` patterns [PR116120]

2024-07-31 Thread Andrew Pinski
On Wed, Jul 31, 2024 at 5:05 AM Richard Biener wrote: > > On Tue, Jul 30, 2024 at 5:26 PM Andrew Pinski > wrote: > > > > When this pattern was converted from being only dealing with 0/-1, we > > missed that if `e == f` is true > > then the optimization is w

Re: [RFC/RFA] [PATCH v2 09/12] Add symbolic execution support.

2024-07-31 Thread Andrew Pinski
s using the full path of the object file. I am not sure this is a problem we need to worry about right now but it might be one in the future and one which we should document on coding conventions on naming things that will be included in OBJS (which puts it into libbackend.a). Thanks,

[PATCH v2] match: Fix wrong code due to `(a ? e : f) !=/== (b ? e : f)` patterns [PR116120]

2024-07-31 Thread Andrew Pinski
.dg/tree-ssa/pr50-1.c: Likewise. * gcc.dg/tree-ssa/pr50.c: Likewise. * g++.dg/torture/pr116120-1.C: New test. * g++.dg/torture/pr116120-2.C: New test. Signed-off-by: Andrew Pinski --- gcc/match.pd | 23 ++ gcc/testsuite/g++.dg/t

[PATCH] forwprop: Don't add uses to dce list if debug statement [PR116156]

2024-08-01 Thread Andrew Pinski
f the statement was a debug statement. gcc/testsuite/ChangeLog: * c-c++-common/torture/pr116156-1.c: New test. Signed-off-by: Andrew Pinski --- .../c-c++-common/torture/pr116156-1.c | 30 +++ gcc/tree-ssa-forwprop.cc | 16 +- 2

Re: [committed] libstdc++: Remove unnecessary uses of

2024-08-01 Thread Andrew Pinski
ll to '(std::shared_ptr) (int)' compiler exited with status 1 UNRESOLVED: libstdc++-prettyprinters/shared_ptr.cc compilation failed to produce executable Thanks, Andrew Pinski > > Tested x86_64-linux. Pushed to trunk. > > -- >8 -- > > We don't need to include

[PATCH] genemit: Fix handling of explicit parallels for clobbers [PR116058]

2024-08-01 Thread Andrew Pinski
r_pat. (output_add_clobbers): Update call to gen_exp for the changed clobber_pat. Signed-off-by: Andrew Pinski --- gcc/genemit.cc | 38 +++--- 1 file changed, 23 insertions(+), 15 deletions(-) diff --git a/gcc/genemit.cc b/gcc/genemit.cc index 98d0477424b..5d3d10f5061 1

Re: [PATCH] forwprop: Don't add uses to dce list if debug statement [PR116156]

2024-08-02 Thread Andrew Pinski
On Thu, Aug 1, 2024 at 11:55 PM Richard Biener wrote: > > On Thu, Aug 1, 2024 at 10:40 PM Andrew Pinski > wrote: > > > > The problem here is that when forwprop does a copy prop, into a statement, > > we mark the uses of that statement as possibly need to b

Re: [PATCH] Make may_trap_p_1 return false for constant pool references [PR116145]

2024-08-02 Thread Andrew Pinski
(ashift:DI (reg:DI 0 ax [690]) (const_int 3 [0x3])) (label_ref:DI 1620))` as not trapping and allowing it to be moved before the check of ax being in the range [0..2] and we have eax being (unsigned long)(unsigned int)-9 in value. So we get a bogus address which will trap. I put my findings in PR 1162

[PATCH] IRA: Ignore debug insns for uses in split_live_ranges_for_shrink_wrap. [PR116179]

2024-08-02 Thread Andrew Pinski
it_live_ranges_for_shrink_wrap): For the uses loop, only look at non-debug insns. gcc/testsuite/ChangeLog: * g++.dg/torture/pr116179-1.C: New test. Signed-off-by: Andrew Pinski --- gcc/ira.cc| 4 +++- gcc/testsuite/g++.dg/torture/pr116179-1.C |

Re: [PATCH] IRA: Ignore debug insns for uses in split_live_ranges_for_shrink_wrap. [PR116179]

2024-08-04 Thread Andrew Pinski
On Sat, Aug 3, 2024 at 3:31 PM Jeff Law wrote: > > > > On 8/2/24 11:31 PM, Sam James wrote: > > Andrew Pinski writes: > > > >> Late_combine exposed this latent bug in split_live_ranges_for_shrink_wrap. > >> What it did was copy-prop regno 151 from reg

[PATCH] sh: Don't call make_insn_raw in sh_recog_treg_set_expr [PR116189]

2024-08-05 Thread Andrew Pinski
/ChangeLog: * config/sh/sh.cc (sh_recog_treg_set_expr): Don't call make_insn_raw, make the insn with a fake uid. gcc/testsuite/ChangeLog: * c-c++-common/torture/pr116189-1.c: New test. Signed-off-by: Andrew Pinski --- gcc/config/sh/sh.cc

Re: [PATCH] ASAN: call initialize_sanitizer_builtins for hwasan [PR115205]

2024-08-06 Thread Andrew Pinski
On Tue, May 28, 2024 at 8:28 PM Andrew Pinski wrote: > > Sometimes initialize_sanitizer_builtins is not called before emitting > the asan builtins with hwasan. In the case of the bug report, there > was a path with the fortran front-end where it was not called. > So l

Re: [x86_64 PATCH] Refactor V2DI arithmetic right shift expansion for STV.

2024-08-06 Thread Andrew Pinski
On Mon, Aug 5, 2024 at 3:23 AM Roger Sayle wrote: > > > This patch refactors ashrv2di RTL expansion into a function so that it may > be reused by a pre-reload splitter, such that DImode right shifts may be > considered candidates during the Scalar-To-Vector (STV) pass. Currently > DImode arithmet

[PATCH 0/5] some small ranger op table cleanup

2024-08-06 Thread Andrew Pinski
eally be in an anonymous namespaces but they were missing. Note there is some unused classes/instances I noticed after putting them in an anonymous namespace so I `#if 0`ed then. Should we just remove them instead? They were the pointer related ops which was just added too. Andrew Pinski (5):

[PATCH 1/5] range: Make range_op_table class final

2024-08-06 Thread Andrew Pinski
Since there will be only one instance of this class alive at any time, it is better to declare this class as final. Bootstrapped and tested on x86_64-linux-gnu. gcc/ChangeLog: * range-op.h (class range_op_table): Declare as a final class. Signed-off-by: Andrew Pinski --- gcc/range

[PATCH 3/5] ranger: constify range_op_table class

2024-08-06 Thread Andrew Pinski
): Make operator[] const. Have singleton return const reference. * range-op.cc (range_op_table::singleton): Update return type. (operator_table): Make const. Signed-off-by: Andrew Pinski --- gcc/range-op.cc | 4 ++-- gcc/range-op.h | 4 ++-- 2 files changed, 4 insertions

[PATCH 5/5] ranger: Fix LTO uninitialized variable warning about m_range_tree

2024-08-06 Thread Andrew Pinski
x86_64-linux-gnu with no regressions. gcc/ChangeLog: * range-op.h (class range_op_table): Value initialize m_range_tree. Signed-off-by: Andrew Pinski --- gcc/range-op.h | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/gcc/range-op.h b/gcc/range-op.h index

[PATCH 2/5] range: Make range_op_table a true singleton class [PR116209]

2024-08-06 Thread Andrew Pinski
leton. Make most functions private (rather than protected). Make ctor private. Signed-off-by: Andrew Pinski --- gcc/range-op.cc | 19 ++- gcc/range-op.h | 5 +++-- 2 files changed, 17 insertions(+), 7 deletions(-) diff --git a/gcc/range-op.cc b/gcc/range-op.cc index c576f6

[PATCH 4/5] ranger: Make some classes local to the TU

2024-08-06 Thread Andrew Pinski
(class pointer_min_max_operator): #if out and mark as final. (class pointer_and_operator): Likewise. (class pointer_or_operator): Likewise. (class operator_pointer_diff): Wrap with anonymous namespace and mark as final. Signed-off-by: Andrew Pinski --- gcc/range-op-flo

[PATCH] aarch64/testsuite: Fix gcc.target/aarch64/simd/vmmla.c [PR116207]

2024-08-06 Thread Andrew Pinski
: Add -save-temps to the options. Signed-off-by: Andrew Pinski --- gcc/testsuite/gcc.target/aarch64/simd/vmmla.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/testsuite/gcc.target/aarch64/simd/vmmla.c b/gcc/testsuite/gcc.target/aarch64/simd/vmmla.c index

[PATCH] aarch64/testsuite: Fix if-compare_2.c for removing vcond{, u, eq} patterns [PR116041]

2024-08-06 Thread Andrew Pinski
arget/aarch64/if-compare_2.c: Support bit and bif for both bar1 and bar2; add comment on why too. Signed-off-by: Andrew Pinski --- gcc/testsuite/gcc.target/aarch64/if-compare_2.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/gcc/testsuite/gcc.target/aarch

[PATCH] aarch64/testsuite: Add testcases for recently fixed PRs

2024-08-07 Thread Andrew Pinski
/116259 gcc/testsuite/ChangeLog: * gcc.target/aarch64/pr116258.c: New test. * gcc.target/aarch64/sve/pr116259-1.c: New test. Signed-off-by: Andrew Pinski --- gcc/testsuite/gcc.target/aarch64/pr116258.c | 17 + .../gcc.target/aarch64/sve/pr116259-1.c | 12

[PATCH] vect: Small C++11-ification of vect_vect_recog_func_ptrs

2024-08-07 Thread Andrew Pinski
: * tree-vect-patterns.cc (NUM_PATTERNS): Delete. (vect_pattern_recog_1): Constify and change recog_func to a reference. (vect_pattern_recog): Use range-based loop over vect_vect_recog_func_ptrs. Signed-off-by: Andrew Pinski --- gcc/tree-vect-patterns.cc | 12

[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

[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

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 1/2] Driver: Add new -truncate option

2024-04-17 Thread Andrew Pinski
should 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

[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

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

2024-04-26 Thread Andrew Pinski
gcc.c-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 P

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

2024-04-26 Thread Andrew Pinski
sted 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

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

2024-04-26 Thread Andrew Pinski
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 1/2] Add verification of gimple_assign_nontemporal_move_p [PR112976]

2024-04-26 Thread Andrew Pinski
geLog: 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

[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. (loop_versioning::loop_ver

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

2024-04-27 Thread Andrew Pinski
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 2/2] PHI-OPT: speed up value_replacement slightly

2024-04-27 Thread Andrew Pinski
rlier 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

[PATCH] PHIOPT: Value-replacement check undef

2024-04-28 Thread Andrew Pinski
linux-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/gc

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

2024-04-30 Thread Andrew Pinski
emove 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 +4

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 element of

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

2024-04-30 Thread Andrew Pinski
* gcc.dg/tree-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

Re: [COMMITTED] Reduce startup costs for Value_Range.

2024-05-01 Thread Andrew Pinski
le GCC 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 3/3] Add parentheses around DECL_INIT for .original [PR23872]

2024-05-02 Thread Andrew Pinski
_EXPR. 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(

[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

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

2024-05-02 Thread Andrew Pinski
ent is_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 f

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

2024-05-02 Thread Andrew Pinski
atexit-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/

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

2024-05-03 Thread Andrew Pinski
failing on 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 inserti

[PATCH] AARCH64: Add Qualcomnm oryon-1 core

2024-05-03 Thread Andrew Pinski
rch64 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 del

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

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 withou

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

2024-05-04 Thread Andrew Pinski
igned-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

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

2024-05-04 Thread Andrew Pinski
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 +++ gcc/testsuite/g++.dg/tree-ssa/cxa_atexit-4.C | 20 +++ gcc/t

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

2024-05-04 Thread Andrew Pinski
g++.dg/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 |

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

2024-05-05 Thread Andrew Pinski
* gcc.c-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

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

2024-05-06 Thread Andrew Pinski
;r' alternative. * 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 +++

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

2024-05-06 Thread Andrew Pinski
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] 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

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 >

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

2024-05-07 Thread Andrew Pinski
where 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

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

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: [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 MIN and

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: 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 aarch64-darwi

<    1   2   3   4   5   6   7   8   9   10   >