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

2024-05-21 Thread Andrew Pinski
ram instead of execute. That should 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 do

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

2024-05-21 Thread Andrew Pinski
@0 @1)` directly 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 ;

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 framework

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 tu

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]

[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

[PATCH 1/2] Match: Add maybe_bit_not instead of plain matching

2024-05-26 Thread Andrew Pinski
nu with no regressions. gcc/ChangeLog: * match.pd (bit_not_with_nop): Unconditionalize. (maybe_cmp): Likewise. (maybe_bit_not): New match pattern. (`~X & X`): Use maybe_bit_not and add `:c` back. (`~x ^ x`/`~x | x`): Likewise. Signed-off-by: Andrew Pi

[PATCH 2/2] match: Add support for `a ^ CST` to bitwise_inverted_equal_p [PR115224]

2024-05-26 Thread Andrew Pinski
case. gcc/testsuite/ChangeLog: * gcc.dg/tree-ssa/bitops-8.c: New test. Signed-off-by: Andrew Pinski --- gcc/generic-match-head.cc| 10 ++ gcc/gimple-match-head.cc | 13 + gcc/match.pd | 4 gcc

[PATCH] match: Use uniform_integer_cst_p in bitwise_inverted_equal_p [PR115238]

2024-05-26 Thread Andrew Pinski
: * gcc.dg/tree-ssa/bitops-9.c: New test. Signed-off-by: Andrew Pinski --- gcc/generic-match-head.cc| 6 -- gcc/gimple-match-head.cc | 6 -- gcc/testsuite/gcc.dg/tree-ssa/bitops-9.c | 15 +++ 3 files changed, 23 insertions(+), 4 deletions

[COMMITTED] Fix bitops-9.c for -m32 and other targets that don't have vector modes

2024-05-27 Thread Andrew Pinski
This just moves the tree scan earlier so we can detect the optimization and not need to detect the vector splitting too. Committed as obvious after a quick test. gcc/testsuite/ChangeLog: * gcc.dg/tree-ssa/bitops-9.c: Look at cdcde1 rather than optmization. Signed-off-by: Andrew Pinski

Re: [r15-853 Regression] FAIL: gcc.dg/tree-ssa/bitops-9.c scan-tree-dump-times optimized "bit_not_expr, " 1 on Linux/x86_64

2024-05-27 Thread Andrew Pinski
On Mon, May 27, 2024 at 4:30 PM haochen.jiang wrote: > > On Linux/x86_64, > > c5a7628470a7fb801ebeea82e16a4549db43bfa5 is the first bad commit > commit c5a7628470a7fb801ebeea82e16a4549db43bfa5 > Author: Andrew Pinski > Date: Sun May 26 17:59:21 2024 -07

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

2024-05-28 Thread Andrew Pinski
d for aarch64-linux-gnu with no regressions. gcc/ChangeLog: PR sanitizer/115205 * asan.cc (asan_instrument): Call initialize_sanitizer_builtins for hwasan. Signed-off-by: Andrew Pinski --- gcc/asan.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/gcc/asan.cc b/gcc/as

[PATCH] Fix some opindex for some options [PR115022]

2024-05-29 Thread Andrew Pinski
. * config/or1k/or1k.opt.urls: Regenerate. * config/riscv/riscv.opt.urls: Regenerate. * config/rs6000/aix64.opt.urls: Regenerate. * config/rs6000/linux64.opt.urls: Regenerate. * config/sparc/sparc.opt.urls: Regenerate. Signed-off-by: Andrew Pinski --- gcc/common.opt.urls

Re: [PATCH] gimple ssa: Teach switch conversion to optimize powers of 2 switches

2024-05-30 Thread Andrew Pinski
On Thu, May 30, 2024 at 5:09 AM Filip Kastl wrote: > > Hi, > > This patch adds a transformation into the switch conversion pass -- > the "exponential index transform". This transformation can help switch > conversion convert switches it otherwise could not. The transformation is > intended for s

Re: [PATCH v7 2/9] Fix pro_and_epilogue for sibcalls at -O0

2024-06-02 Thread Andrew Pinski
On Sun, Jun 2, 2024, 10:24 AM Andi Kleen wrote: > Some of the cfg fixups in pro_and_epilogue for sibcalls were dependent on > "optimize". > Make them check cfun->tail_call_marked instead to handle the -O0 musttail > case. This fixes the musttail test cases on arm targets. > > PR115255 > >

Re: [PATCH] libstdc++: Implement C++26 features (P2546R5)

2024-06-03 Thread Andrew Pinski
On Mon, Jun 3, 2024 at 9:06 AM Peter0x44 wrote: > > 3 Jun 2024 4:14:28 pm Jonathan Wakely : > > > On Mon, 3 Jun 2024 at 14:36, Peter0x44 wrote: > >>> +void > >>> +std::breakpoint() noexcept > >>> +{ > >>> +#if _GLIBCXX_HAVE_DEBUGAPI_H && defined(_WIN32) && > >>> !defined(__CYGWIN__) > >>> + Debug

Re: [nvptx] Pass -m32/-m64 to host_compiler if it has multilib support

2024-08-08 Thread Andrew Pinski
e -mabi=ilp32/-mabi=lp64 (riscv it is more complex). This most likely should be something more complex due to the above. Maybe call it HOST_64_32 but even that seems wrong due to Aarch64 having ILP32 support and such. What about HOST_64ABI_OPTS="-mabi=lp64"/HOST_32ABI_OPTS="-mabi=ilp32&q

Re: [PATCH] lra: emit caller-save register spills before call insn [PR116028]

2024-08-08 Thread Andrew Pinski
On Fri, Aug 2, 2024 at 7:30 AM Jeff Law wrote: > > > > On 8/1/24 4:12 AM, Surya Kumari Jangala wrote: > > lra: emit caller-save register spills before call insn [PR116028] > > > > LRA emits insns to save caller-save registers in the > > inheritance/splitting pass. In this pass, LRA builds EBBs (Ex

Re: [committed] c-family: Add some more ARRAY_SIZE uses

2024-08-09 Thread Andrew Pinski
On Fri, Aug 9, 2024 at 12:39 AM Jakub Jelinek wrote: > > Hi! > > These two spots were just non-standard, because they divided > sizeof (omp_pragmas_simd) by sizeof (*omp_pragmas) and not > the expected sizeof (*omp_pragmas_simd) and so weren't converted > into ARRAY_SIZE. Both of the latter sizes

Re: [PATCH] lra: emit caller-save register spills before call insn [PR116028]

2024-08-09 Thread Andrew Pinski
lier today. Linaro CI's does `--disable-bootstrap` and there was no extra testsuite failures with the patch. So Linaro CI's is not catching all the bugs that a developer would catch in the end. Because bootstrap is one of the normal requirements; though usually only on one target. Thanks, Andrew

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

2024-08-11 Thread Andrew Pinski
wasan. (hwasan_finish_file): Likewise. Signed-off-by: Andrew Pinski --- gcc/asan.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gcc/asan.cc b/gcc/asan.cc index 9e0f51b1477..5f262d54a3a 100644 --- a/gcc/asan.cc +++ b/gcc/asan.cc @@ -4276,6 +4276,7 @@ asan_instrument (void) { if (hwasan_sanit

[PATCH 1/3] testsuite: Add testcases for part of PR 103660

2024-08-12 Thread Andrew Pinski
/ChangeLog: * g++.dg/tree-ssa/pr103660-0.C: New test. * g++.dg/tree-ssa/pr103660-1.C: New test. * gcc.dg/tree-ssa/pr103660-0.c: New test. * gcc.dg/tree-ssa/pr103660-1.c: New test. Signed-off-by: Andrew Pinski --- gcc/testsuite/g++.dg/tree-ssa/pr103660-0.C | 28

[PATCH 3/3] Match: Add pattern for `(a ? b : 0) | (a ? 0 : c)` into `a ? b : c` [PR103660]

2024-08-12 Thread Andrew Pinski
: New test. * gcc.dg/tree-ssa/pr103660-4.c: New test. Signed-off-by: Andrew Pinski --- gcc/match.pd | 10 + gcc/testsuite/g++.dg/tree-ssa/pr103660-4.C | 35 ++ gcc/testsuite/gcc.dg/tree-ssa/pr103660-4.c | 43 ++ 3 files

[PATCH 2/3] match: extend the `((a CMP b) ? c : 0) | ((a CMP' b) ? d : 0)` patterns to support ^ and + [PR103660]

2024-08-12 Thread Andrew Pinski
0-3.c: New test. Signed-off-by: Andrew Pinski --- gcc/match.pd | 42 +++- gcc/testsuite/g++.dg/tree-ssa/pr103660-2.C | 30 +++ gcc/testsuite/g++.dg/tree-ssa/pr103660-3.C | 30 +++ gcc/testsuite/gcc.dg/tree-ssa/pr103660-2.c

Re: [optc-save-gen.awk] Fix streaming of command line options for offloading

2024-08-12 Thread Andrew Pinski
that is marked as Optimization that would might also cause issues. We should check to make sure that also gets fixed here too. Or error out for offloading targets can't have target options with Optimization on them during the build. Thanks, Andrew Pinski > > Signed-off-by: Prathamesh Kulkarni > > Thanks, > Prathamesh

[PATCH v3] aarch64: Improve popcount for bytes [PR113042]

2024-08-14 Thread Andrew Pinski
t. Signed-off-by: Andrew Pinski --- gcc/config/aarch64/aarch64.md | 37 ++ gcc/testsuite/gcc.target/aarch64/popcnt5.c | 19 +++ gcc/testsuite/gcc.target/aarch64/popcnt6.c | 19 +++ gcc/testsuite/gcc.target/aarch64/popcnt7.c | 18 +++ gcc

Re: [PATCH v2] aarch64: Improve popcount for bytes [PR113042]

2024-08-14 Thread Andrew Pinski
On Wed, Aug 14, 2024 at 2:21 PM Richard Sandiford wrote: > > Andrew Pinski writes: > > For popcount for bytes, we don't need the reduction addition > > after the vector cnt instruction as we are only counting one > > byte's popcount. > > This changes the

[PUSHED] PHIOPT: Fix comment before factor_out_conditional_operation

2024-08-15 Thread Andrew Pinski
From: Andrew Pinski I didn't update the comment before factor_out_conditional_operation correctly. this updates it to be correct and mentions unary operations rather than just conversions. Pushed as obvious. gcc/ChangeLog: * tree-ssa-phiopt.cc (factor_out_conditional_oper

[PATCH 1/2] builtins: Don't expand bit query builtins for __int128_t if the target supports an optab for it

2024-08-16 Thread Andrew Pinski
(fold_builtin_bit_query): Don't expand double `unsigned long long` typess if there is an optab entry for that type. Signed-off-by: Andrew Pinski --- gcc/builtins.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gcc/builtins.cc b/gcc/builtins.cc index 0b902896ddd..b4d51e

[PATCH 2/2] aarch64: Implement popcountti2 pattern [PR113042]

2024-08-16 Thread Andrew Pinski
/ChangeLog: * config/aarch64/aarch64.md (popcountti2): New define_expand. gcc/testsuite/ChangeLog: * gcc.target/aarch64/popcnt10.c: New test. * gcc.target/aarch64/popcnt9.c: New test. Signed-off-by: Andrew Pinski --- gcc/config/aarch64/aarch64.md | 16

[PATCH] PHIOPT: move factor_out_conditional_operation over to use gimple_match_op

2024-08-16 Thread Andrew Pinski
ch_op instead of manually extracting from/creating the gimple. gcc/testsuite/ChangeLog: * gcc.target/i386/pr87007-5.c: Disable phi-opt. Signed-off-by: Andrew Pinski --- gcc/gimple-match-exports.cc | 14 + gcc/gimple-match.h| 2 + gcc/test

[PATCH] forwprop: Also dce from added statements from gimple_simplify

2024-08-17 Thread Andrew Pinski
(pass_forwprop::execute): Update call to fold_stmt. Signed-off-by: Andrew Pinski --- gcc/gimple-fold.cc | 43 +--- gcc/gimple-fold.h| 4 ++-- gcc/tree-ssa-forwprop.cc | 2 +- 3 files changed, 39 insertions(+), 10 deletions(-) diff --git a/gcc/gimple

Re: [PATCH] libstdc++: Remove note from the GCC 4.0.1 days

2024-08-18 Thread Andrew Pinski
considering the binutils version is also mentioned as part of the prerequisites for GCC with a newish version; I think mentioning it also (which might get out of sync) in libstdc++ manual a little over board. See https://gcc.gnu.org/install/prerequisites.html . Thanks, Andrew Pinski > > > O

Re: [PATCH] libstdc++: Remove note from the GCC 4.0.1 days

2024-08-18 Thread Andrew Pinski
On Sun, Aug 18, 2024 at 3:42 PM Andrew Pinski wrote: > > On Sun, Aug 18, 2024 at 3:39 PM Eric Gallager wrote: > > > > On Sun, Aug 18, 2024 at 4:52 AM Gerald Pfeifer wrote: > > > > > > When I updated one of the links yesterday I noticed we have this obsol

Re: [PATCH] PHIOPT: move factor_out_conditional_operation over to use gimple_match_op

2024-08-18 Thread Andrew Pinski
On Sun, Aug 18, 2024 at 11:06 AM Jeff Law wrote: > > > > On 8/16/24 8:13 PM, Andrew Pinski wrote: > > To start working on more with expressions with more than one operand, > > converting > > over to use gimple_match_op is needed. > > The added side-effect here

[PATCH 1/2] phi-opt: Fix for non-const functions for factor_out_conditional_operation [PR 116409]

2024-08-19 Thread Andrew Pinski
functions). gcc/testsuite/ChangeLog: * gcc.dg/torture/pr116409-1.c: New test. * gcc.dg/torture/pr116409-2.c: New test. Signed-off-by: Andrew Pinski --- gcc/testsuite/gcc.dg/torture/pr116409-1.c | 7 +++ gcc/testsuite/gcc.dg/torture/pr116409-2.c | 7 +++ gcc/tree-ssa

[PATCH 2/2] phiopt: Reject non gimple val inside factor_out_conditional_operation [PR116412]

2024-08-19 Thread Andrew Pinski
. PR tree-optimization/116412 gcc/ChangeLog: * tree-ssa-phiopt.cc (factor_out_conditional_operation): Make sure new_arg0 and new_arg1 are both gimple values. gcc/testsuite/ChangeLog: * gcc.dg/torture/pr116412-1.c: New test. Signed-off-by: Andrew Pinski --- gcc

[PATCH v2 1/2] phi-opt: Fix for failing maybe_push_res_to_seq in factor_out_conditional_operation [PR 116409]

2024-08-20 Thread Andrew Pinski
-by: Andrew Pinski --- gcc/testsuite/gcc.dg/torture/pr116409-1.c | 7 ++ gcc/testsuite/gcc.dg/torture/pr116409-2.c | 7 ++ gcc/tree-ssa-phiopt.cc| 30 +++ 3 files changed, 34 insertions(+), 10 deletions(-) create mode 100644 gcc/testsuite/gcc.dg

[PATCH v2 2/2] match: Reject non-ssa name/min invariants in gimple_extract [PR116412]

2024-08-20 Thread Andrew Pinski
tract): Return false if op0 was not a SSA name nor a min invariant for REALPART_EXPR/IMAGPART_EXPR/VCE and BIT_FIELD_REF. gcc/testsuite/ChangeLog: * gcc.dg/torture/pr116412-1.c: New test. Signed-off-by: Andrew Pinski --- gcc/gimple-match-exports.cc

[PATCH v2] aarch64: Implement popcountti2 pattern [PR113042]

2024-08-20 Thread Andrew Pinski
-by: Andrew Pinski --- gcc/config/aarch64/aarch64.md | 13 +++ gcc/testsuite/gcc.target/aarch64/popcnt10.c | 25 + gcc/testsuite/gcc.target/aarch64/popcnt9.c | 25 + 3 files changed, 63 insertions(+) create mode 100644 gcc/testsuite

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

2024-08-20 Thread Andrew Pinski
On Sun, Aug 11, 2024 at 9:36 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: [PATCH 1/2] builtins: Don't expand bit query builtins for __int128_t if the target supports an optab for it

2024-08-20 Thread Andrew Pinski
On Tue, Aug 20, 2024 at 9:46 AM Richard Sandiford wrote: > > Andrew Pinski writes: > > On aarch64 (without !CSSC instructions), since popcount is implemented > > using the SIMD instruction cnt, > > instead of using two SIMD cnt (V8QI mode), it is better to use one 128

Re: [PATCH 2/2] aarch64: Implement popcountti2 pattern [PR113042]

2024-08-20 Thread Andrew Pinski
On Tue, Aug 20, 2024 at 11:18 AM Richard Sandiford wrote: > > Richard Sandiford writes: > > Andrew Pinski writes: > >> When CSSC is not enabled, 128bit popcount can be implemented > >> just via the vector (v16qi) cnt instruction followed by a reduction, > >&

Re: [committed] libstdc++: Fix std::variant to reject array types [PR116381]

2024-08-21 Thread Andrew Pinski
On Wed, Aug 21, 2024 at 1:56 AM Jonathan Wakely wrote: > > Tested x86_64-linux. Pushed to trunk. > > Probably worth backporting too. It could potentially cause new errors > for people using arrays in std::variant, but that's forbidden by the > standard. It might be worth mentioning in porting_to

[PATCH] fold: Fix `a * 1j` if a has side effects [PR116454]

2024-08-22 Thread Andrew Pinski
by wrapping arg0 with save_expr when it is not COMPLEX_EXPR. gcc/testsuite/ChangeLog: * gcc.dg/torture/pr116454-1.c: New test. * gcc.dg/torture/pr116454-2.c: New test. Signed-off-by: Andrew Pinski Co-Authored-By: Richard Biener --- gcc/fold-const.cc

Re: [PATCH] PR tree-optimization/101390: Vectorize modulo operator

2024-08-22 Thread Andrew Pinski
On Thu, Aug 22, 2024 at 4:12 AM Richard Biener wrote: > > On Thu, 22 Aug 2024, Jennifer Schmitz wrote: > > > On 19 Aug 2024, at 21:02, Richard Sandiford > > wrote: > > > > > > External email: Use caution opening links or attachments > > > > > > > > > Jennifer Schmitz writes: > > >> Thanks for t

[PATCH] Don't remove /usr/lib and /lib from when passing to the linker [PR97304/104707]

2024-08-22 Thread Andrew Pinski
ve library argument. (add_to_obstack): Update call to is_directory. (driver_handle_option): Likewise. (spec_path): Likewise. Signed-off-by: Andrew Pinski --- gcc/gcc.cc | 24 ++-- 1 file changed, 6 insertions(+), 18 deletions(-) diff --git a/gcc/gcc.cc b/

[PATCH] toplevel: Error out if using --disable-libstdcxx with bootstrap [PR105474]

2024-08-22 Thread Andrew Pinski
. PR bootstrap/105474 ChangeLog: * configure: Regenerate. * configure.ac: Error out if libstdc++ is not enabled with bootstrapping. Signed-off-by: Andrew Pinski --- configure| 9 + configure.ac | 9 + 2 files changed, 18 insertions(+) diff

[PUSHED] testsuite: Fix gcc.dg/torture/pr116420.c for targets default unsigned char [PR116464]

2024-08-22 Thread Andrew Pinski
testsuite/116464 gcc/testsuite/ChangeLog: * gcc.dg/torture/pr116420.c: Signed-off-by: Andrew Pinski --- gcc/testsuite/gcc.dg/torture/pr116420.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/testsuite/gcc.dg/torture/pr116420.c b/gcc/testsuite/gcc.dg/torture

[PATCH] testsuite: Fix vect-mod-var.c for division by 0 [PR116461]

2024-08-22 Thread Andrew Pinski
so that `b[i]` is never 0. Use 1 in those places. Signed-off-by: Andrew Pinski --- gcc/testsuite/gcc.dg/vect/vect-mod-var.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gcc/testsuite/gcc.dg/vect/vect-mod-var.c b/gcc/testsuite/gcc.dg/vect/vect-mod-var.c index eeed318c62b

Re: [PATCH] PR tree-optimization/101390: Vectorize modulo operator

2024-08-22 Thread Andrew Pinski
On Thu, Aug 22, 2024 at 11:28 AM Andrew Pinski wrote: > > On Thu, Aug 22, 2024 at 4:12 AM Richard Biener wrote: > > > > On Thu, 22 Aug 2024, Jennifer Schmitz wrote: > > > > > On 19 Aug 2024, at 21:02, Richard Sandiford > > > wrote: > > > >

Re: [PATCH] tree-optimization/116463 - complex lowering leaves around dead stmts

2024-08-23 Thread Andrew Pinski
to the _BitInt lower. Thanks, Andrew Pinski > > Bootstrapped and tested on x86_64-unknown-linux-gnu, this will cause > the following fallout which is similar to the aarch64 fallout in > PR116463, complex SLP recognition being somewhat fragile. I'll track > this there. Pushed. &g

[PATCH] expand: Use the correct mode for store flags for popcount [PR116480]

2024-08-25 Thread Andrew Pinski
store flags. gcc/testsuite/ChangeLog: * gcc.dg/torture/pr116480-1.c: New test. * gcc.dg/torture/pr116480-2.c: New test. Signed-off-by: Andrew Pinski --- gcc/internal-fn.cc| 3 ++- gcc/testsuite/gcc.dg/torture/pr116480-1.c | 8 gcc/testsuite/gcc.dg/to

Re: [committed] libstdc++: Make std::vector::reference constructor private [PR115098]

2024-08-25 Thread Andrew Pinski
e/libstdc++-prettyprinters/simple11.cc:31: /home/apinski/src/upstream-gcc-isel/gcc/objdir/x86_64-pc-linux-gnu/libstdc++-v3/include/bits/stl_bvector.h:90: note: declared private here compiler exited with status 1 ``` Noticed because of the new UNRESOLVED . Thanks, Andrew Pinski > > li

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

2024-08-27 Thread Andrew Pinski
>> External email: Use caution opening links or attachments > >>>>>>> > >>>>>>> > >>>>>>> On Fri, Aug 2, 2024 at 11:20 AM Kugan Vivekanandarajah > >>>>>>> wrote: > >>>>>>>>

[PATCH 1/3] expand: Add debug dump on the cost for `popcount==1` expand

2024-08-27 Thread Andrew Pinski
While working on PR 114224, I found it would be useful to dump the different costs of the expansion to make easier to understand why one was chosen over the other. Bootstrapped and tested on x86_64-linux-gnu. Build and tested for aarch64-linux-gnu. gcc/ChangeLog: * internal-fn.cc (expand

[PATCH 3/3] aarch64: Add rtx cost for popcount [PR114224]

2024-08-27 Thread Andrew Pinski
xtra_costs, cortexa12_extra_costs, cortexa15_extra_costs, v7m_extra_costs): Likewise. gcc/testsuite/ChangeLog: * gcc.target/aarch64/popcnt11.c: New test. * gcc.target/aarch64/popcnt12.c: New test. Signed-off-by: Andrew Pinski --- gcc/config/aarch64/aarch64-cost-tables

[PATCH 2/3] aarch64: Handle cost for vector add reduction

2024-08-27 Thread Andrew Pinski
(aarch64_rtx_addv_costs): New function. (aarch64_rtx_costs): For unspec_addv, call aarch64_rtx_addv_costs. For unspec_addv under a zero_extend, call aarch64_rtx_addv_costs. Signed-off-by: Andrew Pinski --- gcc/config/aarch64/aarch64.cc | 35 +++ 1 file

Re: [PATCH 1/3] expand: Add debug dump on the cost for `popcount==1` expand

2024-08-28 Thread Andrew Pinski
On Wed, Aug 28, 2024 at 12:26 AM Richard Biener wrote: > > On Wed, Aug 28, 2024 at 6:34 AM Andrew Pinski > wrote: > > > > While working on PR 114224, I found it would be useful to dump the > > different costs of the expansion to make easier to understand why one &g

Re: [PATCH v2 2/5] testsuite: Add scan-ltrans-rtl* for use in dg-final [PR116140]

2024-08-28 Thread Andrew Pinski
those are ok > > for trunk, thanks. > > Gah, sorry -- those got lost in the rebase. Is it OK to commit this > together with the doc changes included as per the previous patch? I am getting a new ERROR after this. Maybe you didn't notice this since you were looking for new

[PATCH] expand: Allow widdening optab when expanding popcount==1 [PR116508]

2024-08-28 Thread Andrew Pinski
internal-fn.cc (expand_POPCOUNT): Use OPTAB_WIDEN for PLUS and XOR/AND expansion. gcc/testsuite/ChangeLog: * gcc.target/aarch64/popcnt-eq-1.c: New test. Signed-off-by: Andrew Pinski --- gcc/internal-fn.cc| 4 +- .../gcc.target/aarch64/popcn

Re: [PATCH] testsuite: Improve check-function-bodies

2024-06-05 Thread Andrew Pinski
t; > } else { > > - set up_config(start) {{^([a-zA-Z_]\S+):$}} > > + set up_config(start) {{^([a-zA-Z_]\S*):$}} > > } > > > > # Regexp for the end of a function definition. > > This part is ok, thanks. Note the issue with single function na

Re: [pushed 2/3] libcpp: move label_text to its own header

2024-06-06 Thread Andrew Pinski
On Thu, Jun 6, 2024 at 6:02 AM Bert Wesarg wrote: > > Dear David, > > On Tue, May 28, 2024 at 10:07 PM David Malcolm wrote: > > > > No functional change intended. > > > > Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu. > > Pushed to trunk as r15-874-g9bda2c4c81b668. > > > > libcpp/

[COMMITTED] Plugins: Add label-text.h to CPPLIB_H so it will be installed [PR115288]

2024-06-06 Thread Andrew Pinski
eader file is installed. gcc/ChangeLog: * Makefile.in (CPPLIB_H): Add label-text.h. Signed-off-by: Andrew Pinski --- gcc/Makefile.in | 1 + 1 file changed, 1 insertion(+) diff --git a/gcc/Makefile.in b/gcc/Makefile.in index c983b0c102a..f5adb647d3f 100644 --- a/gcc/Makefile.in +++

Re: [pushed 2/3] libcpp: move label_text to its own header

2024-06-06 Thread Andrew Pinski
On Thu, Jun 6, 2024 at 9:00 AM David Malcolm wrote: > > On Thu, 2024-06-06 at 08:40 -0700, Andrew Pinski wrote: > > On Thu, Jun 6, 2024 at 6:02 AM Bert Wesarg > > wrote: > > > > > > Dear David, > > > > > > On Tue, May 28, 2024 at 10:07 PM Dav

Re: [PATCH] FreeBSD: Stop linking _p libs for -pg as of FreeBSD 14

2024-06-09 Thread Andrew Pinski
On Sun, Jun 9, 2024 at 2:22 PM Gerald Pfeifer wrote: > > On Fri, 13 Aug 2021, Andreas Tobler via Gcc-patches wrote: > > I would like to commit the attached patch to trunk and after a settling > > period also to all open branches. > > Is this ok? > > Our MAINTAINERS file has the following entry: >

[PATCH] aarch64: Improve popcount for bytes [PR113042]

2024-06-09 Thread Andrew Pinski
/ChangeLog: * config/aarch64/aarch64.md (popcountqi2): New pattern. gcc/testsuite/ChangeLog: * gcc.target/aarch64/popcnt5.c: New test. Signed-off-by: Andrew Pinski --- gcc/config/aarch64/aarch64.md | 26 ++ gcc/testsuite/gcc.target/aarch64/popc

[PUSHED] Fix pr115388.c: plain char could be unsigned by default [PR115415]

2024-06-10 Thread Andrew Pinski
/115388 * gcc.dg/torture/pr115388.c: Use `signed char` directly instead of plain `char`. Signed-off-by: Andrew Pinski --- gcc/testsuite/gcc.dg/torture/pr115388.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/testsuite/gcc.dg/torture/pr115388.c b/gcc/testsuite

[PATCH v2] aarch64: Improve popcount for bytes [PR113042]

2024-06-10 Thread Andrew Pinski
/popcnt5.c: New test. * gcc.target/aarch64/popcnt6.c: New test. Signed-off-by: Andrew Pinski --- gcc/config/aarch64/aarch64.md | 52 +++--- gcc/testsuite/gcc.target/aarch64/popcnt5.c | 19 gcc/testsuite/gcc.target/aarch64/popcnt6.c | 19 gcc

Re: [PATCH v1] Test: Move target independent test cases to gcc.dg/torture

2024-06-11 Thread Andrew Pinski
On Mon, Jun 10, 2024, 11:20 PM wrote: > From: Pan Li > > The test cases of pr115387 are target independent, at least x86 > and riscv are able to reproduce. Thus, move these cases to > the gcc.dg/torture. > > The below test suites are passed. > 1. The rv64gcv fully regression test. > 2. The x8

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

2024-06-11 Thread Andrew Pinski
On Mon, May 20, 2024 at 11:08 PM Richard Biener wrote: > > On Mon, May 20, 2024 at 11:37 PM Andrew Pinski (QUIC) > wrote: > > > > > -Original Message- > > > From: Richard Biener > > > Sent: Sunday, May 19, 2024 11:55 AM > > > To: Andr

[PUSHED] Fix building JIT with musl libc [PR115442]

2024-06-11 Thread Andrew Pinski
d-off-by: Andrew Pinski --- gcc/jit/jit-recording.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/jit/jit-recording.cc b/gcc/jit/jit-recording.cc index 68a2e860c1f..70830e34965 100644 --- a/gcc/jit/jit-recording.cc +++ b/gcc/jit/jit-recording.cc @@ -19,6 +19,7 @@ along

Re: [PUSHED] Fix building JIT with musl libc [PR115442]

2024-06-11 Thread Andrew Pinski
On Tue, Jun 11, 2024 at 12:42 PM Andrew Pinski wrote: > > Just like r13-6662-g0e6f87835ccabf but this time for jit/jit-recording.cc. > > Pushed as obvious after a quick build to make sure jit still builds. Backported also to GCC 14 and GCC 13. Thanks, Andrew > >

Re: [committed] [v2] More logical op simplifications in simplify-rtx.cc

2024-06-11 Thread Andrew Pinski
*/ (simplify (bitop:c (rbitop:c @2 @1) @0) (with { bool wascmp; } (if (bitwise_inverted_equal_p (@0, @2, wascmp) && (!wascmp || element_precision (type) == 1)) (bitop @0 @1 The problem is bitwise_inverted_equal_p does not see that: c.0_4 = (signed char) _1; _5

[PATCH] aarch64: Use bitreverse rtl code instead of unspec [PR115176]

2024-06-11 Thread Andrew Pinski
t_op): Likewise. (SVE_INT_UNARY): Remove UNSPEC_RBIT. (optab): Likewise. (sve_int_op): Likewise. (min_elem_bits): Likewise. Signed-off-by: Andrew Pinski --- gcc/config/aarch64/aarch64-simd.md | 3 +-- gcc/config/aarch64/aarch64-sve-builtins-base.cc | 2 +- gcc/config/

Re: [PATCH] [testsuite] add linkonly to dg-additional-sources [PR115295]

2024-06-11 Thread Andrew Pinski
-g948dbc5ee45f9f ). Since this is only working around this one testcase this way. Thanks, Andrew Pinski > > > for gcc/ChangeLog > > * doc/sourcebuild.texi (dg-additional-sources): Add linkonly. > > for gcc/testsuite/ChangeLog > >

[PATCH] match: Improve gimple_bitwise_equal_p and gimple_bitwise_inverted_equal_p for truncating casts [PR115449]

2024-06-11 Thread Andrew Pinski
_bitwise_equal_p. * match.pd (maybe_truncate): New match pattern. gcc/testsuite/ChangeLog: * gcc.dg/tree-ssa/bitops-10.c: New test. Signed-off-by: Andrew Pinski --- gcc/gimple-match-head.cc | 17 +--- gcc/match.pd | 7 + gcc/testsuite

Re: [pushed] c++: repeated export using

2024-06-12 Thread Andrew Pinski
On Wed, Jun 12, 2024 at 1:32 PM Jason Merrill wrote: > > Tested x86_64-pc-linux-gnu, applying to trunk. > > -- 8< -- > > A sample implementation of module std was breaking because the exports > included 'using std::operator&' twice. Since Nathaniel's r15-964 for > PR114867, the first using added

[PATCH] expand: constify sepops operand to expand_expr_real_2 and expand_widen_pattern_expr [PR113212]

2024-06-13 Thread Andrew Pinski
(expand_widen_pattern_expr): Likewise. * optabs.h (expand_widen_pattern_expr): Likewise. * expr.cc (expand_expr_real_2): Likewise (do_store_flag): Likewise. Remove incorrect store to ops->code. Signed-off-by: Andrew Pinski --- gcc/expr.cc | 8 gcc/expr.h| 4 +++-

Re: [PATCH] Enhance if-conversion for automatic arrays

2024-06-14 Thread Andrew Pinski
rays (but maybe that is not tracked). Thanks, Andrew Pinski > This applies to OMP SIMD in-branch lowered > functions result array which for the testcase otherwise prevents > vectorization with SSE and for AVX and AVX512 ends up with spurious > .MASK_STORE to the stack surviving. >

Re: [PATCH v26 03/13] libstdc++: Optimize std::is_pointer compilation performance

2024-06-14 Thread Andrew Pinski
ate can still use the built-in even though the > name '__is_pointer' has been declared as an identifier. > > So Clang matches GCC and it works fine. Good! Actually clang does not work the same as GCC in the end; it is much more inconsistent in what it allows. See https://gcc.gnu.org/b

[PATCH] aarch64: Fix reg_is_wrapped_separately array size [PR100211]

2024-06-16 Thread Andrew Pinski
gcc/ChangeLog: * config/aarch64/aarch64.h (machine_function): Fix the size of reg_is_wrapped_separately. Signed-off-by: Andrew Pinski --- gcc/config/aarch64/aarch64.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/config/aarch64/aarch64.h b/gcc/config/aarc

Re: [PATCH v3] aarch64: Add vector popcount besides QImode [PR113859]

2024-06-17 Thread Andrew Pinski
On Mon, Jun 17, 2024, 5:59 AM Tamar Christina wrote: > Hi, > > > -Original Message- > > From: Pengxuan Zheng > > Sent: Friday, June 14, 2024 12:57 AM > > To: gcc-patches@gcc.gnu.org > > Cc: Pengxuan Zheng > > Subject: [PATCH v3] aarch64: Add vector popcount besides QImode > [PR113859] >

Re: [c-family] Add minimal support for __bf16 to -fdump-ada-spec

2024-06-17 Thread Andrew Pinski
ending on the name. Thanks, Andrew Pinski > > -- > Eric Botcazou

[COMMITTED] aarch64: Add testcase for PR97405

2024-06-17 Thread Andrew Pinski
/testsuite/ChangeLog: * gcc.target/aarch64/sve/pr97405-1.c: New test. Signed-off-by: Andrew Pinski --- gcc/testsuite/gcc.target/aarch64/sve/pr97405-1.c | 13 + 1 file changed, 13 insertions(+) create mode 100644 gcc/testsuite/gcc.target/aarch64/sve/pr97405-1.c diff --git a/gcc

[PATCH 0/2] aarch64: Small cleanups of the cavium cores

2024-06-17 Thread Andrew Pinski
ne in this patch set. Note there is a core which uses the variant selection so we can't remove the code there. Andrew Pinski (2): aarch64: make thunderxt88p1 an alias of thunderxt88 aarch64: Add comment about thunderxt81/t83 being aliases gcc/config/aarch64/aarch64-cores.def | 6 +++---

[PATCH 2/2] aarch64: Add comment about thunderxt81/t83 being aliases

2024-06-17 Thread Andrew Pinski
Since these were already aliases just make it clear on that. gcc/ChangeLog: * config/aarch64/aarch64-cores.def: Add comment saying thunderxt81/t83 are aliases of octeontx81/83. Signed-off-by: Andrew Pinski --- gcc/config/aarch64/aarch64-cores.def | 1 + 1 file changed, 1

[PATCH 1/2] aarch64: make thunderxt88p1 an alias of thunderxt88

2024-06-17 Thread Andrew Pinski
rch64-cores.def (thunderxt88p1): Make an alias of thunderxt88 and move below thunderxt88. * config/aarch64/aarch64-tune.md: Regenerate. Signed-off-by: Andrew Pinski --- gcc/config/aarch64/aarch64-cores.def | 5 ++--- gcc/config/aarch64/aarch64-tune.md | 2 +- 2 files chang

Re: [PATCH v4] aarch64: Add vector popcount besides QImode [PR113859]

2024-06-18 Thread Andrew Pinski
On Mon, Jun 17, 2024 at 11:25 PM Pengxuan Zheng wrote: > > This patch improves GCC’s vectorization of __builtin_popcount for aarch64 > target > by adding popcount patterns for vector modes besides QImode, i.e., HImode, > SImode and DImode. > > With this patch, we now generate the following for V8

Re: [PATCH] middle-end/114070 - folding breaking VEC_COND expansion

2024-06-19 Thread Andrew Pinski
abled. Note it is a (minor) missed optimization regression so the impact looks to be small. I am not sure if people have written code with this pattern, it requires vectors and it fails only on targets where there is no vector support enabled. https://gcc.gnu.org/bugzilla/show_bu

[PATCH] complex-lowering: Better handling of PAREN_EXPR [PR68855]

2024-06-20 Thread Andrew Pinski
ations_1): Handle PAREN_EXPR like NEGATE_EXPR. And call expand_complex_paren for PAREN_EXPR. gcc/testsuite/ChangeLog: * gcc.dg/vect/pr68855.c: New test. * gfortran.dg/vect/pr68855.f90: New test. Signed-off-by: Andrew Pinski --- gcc/testsuite/gcc.dg/vect/pr68855.c

Re: [PATCH] [match.pd] Optimize a < 0 ? -1 : 0 to (signed)a >> 31.

2024-06-20 Thread Andrew Pinski
&& target_supports_op_p (unsigned_type_for (type), > +RSHIFT_EXPR, optab_scalar)) > +(with > + { > + unsigned int prec = element_precision (type); > + tree utype = unsigned_type_for (type); > + } > +(view_convert:type &

Re: [PATCH] Remove outdated info from passes.texi

2024-06-20 Thread Andrew Pinski
tps://gcc.gnu.org/bugzilla/show_bug.cgi?id=951 . Thanks, Andrew Pinski > > make pdf tested, pushed. > > * doc/passes.texi: Remove references to no longer existing > passes. > --- > gcc/doc/passes.texi | 70 ++--- > 1 fi

Re: [PATCH 3/8] Make more use of force_subreg

2024-06-21 Thread Andrew Pinski
On Fri, Jun 21, 2024 at 1:11 PM Jeff Law wrote: > > > > On 6/17/24 3:53 AM, Richard Sandiford wrote: > > This patch makes target-independent code use force_subreg instead > > of simplify_gen_subreg in some places. The criteria were: > > > > (1) The code is obviously specific to expand (where new

[PATCH] Ranger: Mark a few classes as final

2024-06-22 Thread Andrew Pinski
* value-range.h (class int_range): Mark as final. (class prange): Likewise. (class frange): Likewise. Signed-off-by: Andrew Pinski --- gcc/value-range.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gcc/value-range.h b/gcc/value-range.h index 4

Re: [PATCH] MATCH: Simplify (vec CMP vec) eq/ne (vec CMP vec) [PR111150]

2024-06-22 Thread Andrew Pinski
t; > * match.pd: Optimization for above mentioned pattern. Oh I just noticed the changelog should be improved too. Eikansh, The wording there needs to be independent from the commit message as it gets added to ChangeLog and has no real reference back to the commit message.

Re: [PATCH] Add param for bb limit to invoke fast_vrp.

2024-06-24 Thread Andrew Pinski
On Mon, Jun 24, 2024 at 7:20 PM Andrew MacLeod wrote: > > > On 6/22/24 09:15, Richard Biener wrote: > > On Fri, Jun 21, 2024 at 3:02 PM Andrew MacLeod wrote: > >> This patch adds > >> > >> --param=vrp-block-limit=N > >> > >> When the basic block counter for a function exceeded 'N' , VRP is

Re: [PATCH] Add param for bb limit to invoke fast_vrp.

2024-06-24 Thread Andrew Pinski
On Mon, Jun 24, 2024 at 7:35 PM Andrew Pinski wrote: > > On Mon, Jun 24, 2024 at 7:20 PM Andrew MacLeod wrote: > > > > > > On 6/22/24 09:15, Richard Biener wrote: > > > On Fri, Jun 21, 2024 at 3:02 PM Andrew MacLeod > > > wrote: > > >>

[PUSHED] c-family: Add Warning property to Wnrvo option [PR115624]

2024-06-24 Thread Andrew Pinski
: Andrew Pinski --- gcc/c-family/c.opt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/c-family/c.opt b/gcc/c-family/c.opt index b067369fa7e..864ef4e3b3d 100644 --- a/gcc/c-family/c.opt +++ b/gcc/c-family/c.opt @@ -1137,7 +1137,7 @@ C ObjC Var

[PATCH] c++: structured bindings and lookup of tuple_size/tuple_element [PR115605]

2024-06-24 Thread Andrew Pinski
: Copied from decomp22.C and wrap tuple_size/tuple_element inside std namespace. Signed-off-by: Andrew Pinski --- gcc/cp/decl.cc| 16 +--- gcc/testsuite/g++.dg/cpp1z/decomp22.C | 2 +- gcc/testsuite/g++.dg/cpp1z/decomp61.C | 53 +++ gcc

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