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

2024-06-11 Thread Andrew Pinski
. (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/aarch64/aarch64

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

2024-06-11 Thread Andrew Pinski
op: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 = ~c.0_4; _16 = (c

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

[gcc r13-8842] Fix building JIT with musl libc [PR115442]

2024-06-11 Thread Andrew Pinski via Gcc-cvs
https://gcc.gnu.org/g:6eb0e931097a8fec01591051c9ef582d52fe7f0c commit r13-8842-g6eb0e931097a8fec01591051c9ef582d52fe7f0c Author: Andrew Pinski Date: Tue Jun 11 12:30:01 2024 -0700 Fix building JIT with musl libc [PR115442] Just like r13-6662-g0e6f87835ccabf but this time for jit

[gcc r14-10304] Fix building JIT with musl libc [PR115442]

2024-06-11 Thread Andrew Pinski via Gcc-cvs
https://gcc.gnu.org/g:e6b1c0820590a1f330099ed7560982b5c6da4e91 commit r14-10304-ge6b1c0820590a1f330099ed7560982b5c6da4e91 Author: Andrew Pinski Date: Tue Jun 11 12:30:01 2024 -0700 Fix building JIT with musl libc [PR115442] Just like r13-6662-g0e6f87835ccabf but this time for jit

[gcc r15-1188] Fix building JIT with musl libc [PR115442]

2024-06-11 Thread Andrew Pinski via Gcc-cvs
https://gcc.gnu.org/g:e4244b88d75124f6957bfa080c8ad34017364e53 commit r15-1188-ge4244b88d75124f6957bfa080c8ad34017364e53 Author: Andrew Pinski Date: Tue Jun 11 12:30:01 2024 -0700 Fix building JIT with musl libc [PR115442] Just like r13-6662-g0e6f87835ccabf but this time for jit

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

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

[gcc r12-10546] PHIOPT: Don't transform minmax if middle bb contains a phi [PR115143]

2024-06-11 Thread Andrew Pinski via Gcc-cvs
https://gcc.gnu.org/g:d30afaae6764379a63c22459b40aaecfa82b0fc4 commit r12-10546-gd30afaae6764379a63c22459b40aaecfa82b0fc4 Author: Andrew Pinski Date: Sat May 18 11:55:58 2024 -0700 PHIOPT: Don't transform minmax if middle bb contains a phi [PR115143] The problem here is even

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

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

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

2024-06-10 Thread Andrew Pinski (QUIC)
> -Original Message- > From: Kyrylo Tkachov > Sent: Monday, June 10, 2024 12:26 AM > To: Andrew Pinski (QUIC) ; gcc- > patc...@gcc.gnu.org > Subject: Re: [PATCH] aarch64: Improve popcount for bytes > [PR113042] > > Hi Andrew > > -----Original M

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

2024-06-10 Thread Andrew Pinski
: 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/testsuite

[gcc r15-1165] Fix pr115388.c: plain char could be unsigned by default [PR115415]

2024-06-10 Thread Andrew Pinski via Gcc-cvs
https://gcc.gnu.org/g:c3d1153bc0a2b820e3c373ecf19a5a127703f854 commit r15-1165-gc3d1153bc0a2b820e3c373ecf19a5a127703f854 Author: Andrew Pinski Date: Mon Jun 10 08:23:00 2024 -0700 Fix pr115388.c: plain char could be unsigned by default [PR115415] This is a simple fix

[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] aarch64: Improve popcount for bytes [PR113042]

2024-06-09 Thread Andrew Pinski
: * 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/popcnt5.c | 19

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

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

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

2024-06-06 Thread Andrew Pinski via Gcc-cvs
https://gcc.gnu.org/g:6e6471806d886bc052d3922d636d49aaf75d5d16 commit r15-1076-g6e6471806d886bc052d3922d636d49aaf75d5d16 Author: Andrew Pinski Date: Thu May 30 07:59:00 2024 -0700 Plugins: Add label-text.h to CPPLIB_H so it will be installed [PR115288] After r15-874

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

2024-06-06 Thread Andrew Pinski
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 +++ b/gcc

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

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

2024-06-05 Thread Andrew Pinski
{ > > - 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 names was recorded as

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

Re: GCC trouble in dump_printf_loc

2024-06-03 Thread Andrew Pinski via Gcc
rintf_loc in vect_pattern_recog_1. `-fopt-info-all-internals` as documented https://gcc.gnu.org/onlinedocs/gcc-14.1.0/gcc/Developer-Options.html#index-fopt-info Note you can find the same information in the vect dump file if you dump if via -fdump-tree-vect-details too. Thanks, Andrew Pinski > > > > Thanks > Sent using https://www.zoho.com/mail/

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

2024-06-03 Thread Andrew Pinski (QUIC)
> -Original Message- > From: Andrew Pinski (QUIC) > Sent: Saturday, May 4, 2024 2:03 AM > To: gcc-patches@gcc.gnu.org > Cc: Andrew Pinski (QUIC) > Subject: [PATCH] aarch64: Support multiple variants including > up to 3 > > On some of the Qualcomm's SoC

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 >

[gcc r15-938] Fix some opindex for some options [PR115022]

2024-05-31 Thread Andrew Pinski via Gcc-cvs
https://gcc.gnu.org/g:a0d60660f2aae2d79685f73d568facb2397582d8 commit r15-938-ga0d60660f2aae2d79685f73d568facb2397582d8 Author: Andrew Pinski Date: Wed May 29 20:40:31 2024 -0700 Fix some opindex for some options [PR115022] While looking at the index I noticed that some options

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

[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: Is fcommon related with performance optimization logic?

2024-05-29 Thread Andrew Pinski via Gcc
CC can do about this since data layout is "hard" to do to get the best performance always. Thanks, Andrew Pinski > > > Best regards. > > > Clark Zhao

[gcc r15-908] match: Add support for `a ^ CST` to bitwise_inverted_equal_p [PR115224]

2024-05-29 Thread Andrew Pinski via Gcc-cvs
https://gcc.gnu.org/g:547143df5aa0960fb149a26933dad7ca1c363afb commit r15-908-g547143df5aa0960fb149a26933dad7ca1c363afb Author: Andrew Pinski Date: Sun May 26 17:38:37 2024 -0700 match: Add support for `a ^ CST` to bitwise_inverted_equal_p [PR115224] While looking into something

[gcc r15-907] Match: Add maybe_bit_not instead of plain matching

2024-05-29 Thread Andrew Pinski via Gcc-cvs
https://gcc.gnu.org/g:0a9154d154957b21eb2c9e4fbe9869e50fb9742f commit r15-907-g0a9154d154957b21eb2c9e4fbe9869e50fb9742f Author: Andrew Pinski Date: Sat May 25 23:29:48 2024 -0700 Match: Add maybe_bit_not instead of plain matching While working on adding matching of negative

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

2024-05-28 Thread Andrew Pinski
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/asan.cc

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

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 via Gcc-regression
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

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

2024-05-27 Thread Andrew Pinski via Gcc-cvs
https://gcc.gnu.org/g:4fcdc37e8856bde847d3b8dd2915b68d56ad1d62 commit r15-855-g4fcdc37e8856bde847d3b8dd2915b68d56ad1d62 Author: Andrew Pinski Date: Mon May 27 17:24:11 2024 -0700 Fix bitops-9.c for -m32 and other targets that don't have vector modes This just moves the tree scan

[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

[gcc r15-853] match: Use uniform_integer_cst_p in bitwise_inverted_equal_p [PR115238]

2024-05-27 Thread Andrew Pinski via Gcc-cvs
https://gcc.gnu.org/g:c5a7628470a7fb801ebeea82e16a4549db43bfa5 commit r15-853-gc5a7628470a7fb801ebeea82e16a4549db43bfa5 Author: Andrew Pinski Date: Sun May 26 17:59:21 2024 -0700 match: Use uniform_integer_cst_p in bitwise_inverted_equal_p [PR115238] I noticed while working

[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

[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 1/2] Match: Add maybe_bit_not instead of plain matching

2024-05-26 Thread Andrew Pinski
-linux-gnu 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

[gcc r15-813] Use simple_dce_from_worklist in phiprop

2024-05-24 Thread Andrew Pinski via Gcc-cvs
https://gcc.gnu.org/g:3e06763a695d97aa46c9de71573ec6a43bb92449 commit r15-813-g3e06763a695d97aa46c9de71573ec6a43bb92449 Author: Andrew Pinski Date: Thu May 23 09:56:37 2024 -0700 Use simple_dce_from_worklist in phiprop I noticed that phiprop leaves around phi nodes which

[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

[gcc r15-784] AARCH64: Add Qualcomnm oryon-1 core

2024-05-22 Thread Andrew Pinski via Gcc-cvs
https://gcc.gnu.org/g:01cfd6018250141a262219c5803c3f2a278d909d commit r15-784-g01cfd6018250141a262219c5803c3f2a278d909d Author: Andrew Pinski Date: Fri Apr 5 13:40:35 2024 -0700 AARCH64: Add Qualcomnm oryon-1 core This patch adds Qualcomm's new oryon-1 core; this is enough

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

[gcc r15-778] aarch64: Fold vget_high_* intrinsics to BIT_FIELD_REF [PR102171]

2024-05-22 Thread Andrew Pinski via Gcc-cvs
https://gcc.gnu.org/g:1d1ef1c22752b3e250ee769ae6d79f537471a57f commit r15-778-g1d1ef1c22752b3e250ee769ae6d79f537471a57f Author: Pengxuan Zheng Date: Tue May 21 10:55:06 2024 -0700 aarch64: Fold vget_high_* intrinsics to BIT_FIELD_REF [PR102171] This patch is a follow-up of

[gcc r13-8784] PHIOPT: Don't transform minmax if middle bb contains a phi [PR115143]

2024-05-21 Thread Andrew Pinski via Gcc-cvs
https://gcc.gnu.org/g:3f6a42510a1bd4b004ed70ac44cdad2770b732a8 commit r13-8784-g3f6a42510a1bd4b004ed70ac44cdad2770b732a8 Author: Andrew Pinski Date: Sat May 18 11:55:58 2024 -0700 PHIOPT: Don't transform minmax if middle bb contains a phi [PR115143] The problem here is even

[gcc r13-8783] match: Disable `(type)zero_one_valuep*CST` for 1bit signed types [PR115154]

2024-05-21 Thread Andrew Pinski via Gcc-cvs
https://gcc.gnu.org/g:d6cf49eaf5ac237c57785dce42c89deac911affa commit r13-8783-gd6cf49eaf5ac237c57785dce42c89deac911affa Author: Andrew Pinski Date: Mon May 20 00:16:40 2024 -0700 match: Disable `(type)zero_one_valuep*CST` for 1bit signed types [PR115154] The problem here

[gcc r14-10224] match: Disable `(type)zero_one_valuep*CST` for 1bit signed types [PR115154]

2024-05-21 Thread Andrew Pinski via Gcc-cvs
https://gcc.gnu.org/g:b2bb49d6a77e4568c0b91db17b2599f5929fb85b commit r14-10224-gb2bb49d6a77e4568c0b91db17b2599f5929fb85b Author: Andrew Pinski Date: Mon May 20 00:16:40 2024 -0700 match: Disable `(type)zero_one_valuep*CST` for 1bit signed types [PR115154] The problem here

[gcc r15-755] match: Disable `(type)zero_one_valuep*CST` for 1bit signed types [PR115154]

2024-05-21 Thread Andrew Pinski via Gcc-cvs
https://gcc.gnu.org/g:49c87d22535ac4f8aacf088b3f462861c26cacb4 commit r15-755-g49c87d22535ac4f8aacf088b3f462861c26cacb4 Author: Andrew Pinski Date: Mon May 20 00:16:40 2024 -0700 match: Disable `(type)zero_one_valuep*CST` for 1bit signed types [PR115154] The problem here

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

[gcc r14-10222] PHIOPT: Don't transform minmax if middle bb contains a phi [PR115143]

2024-05-20 Thread Andrew Pinski via Gcc-cvs
https://gcc.gnu.org/g:89ab128656b9da1359705bd770ae7d2367b33ec2 commit r14-10222-g89ab128656b9da1359705bd770ae7d2367b33ec2 Author: Andrew Pinski Date: Sat May 18 11:55:58 2024 -0700 PHIOPT: Don't transform minmax if middle bb contains a phi [PR115143] The problem here is even

[gcc r15-699] PHIOPT: Don't transform minmax if middle bb contains a phi [PR115143]

2024-05-20 Thread Andrew Pinski via Gcc-cvs
https://gcc.gnu.org/g:9ff8f041331ef8b56007fb3c4d41d76f9850010d commit r15-699-g9ff8f041331ef8b56007fb3c4d41d76f9850010d Author: Andrew Pinski Date: Sat May 18 11:55:58 2024 -0700 PHIOPT: Don't transform minmax if middle bb contains a phi [PR115143] The problem here is even

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

[gcc r15-697] aarch64: Fold vget_low_* intrinsics to BIT_FIELD_REF [PR102171]

2024-05-20 Thread Andrew Pinski via Gcc-cvs
https://gcc.gnu.org/g:a2e4fe5a53cf75cd055f64e745ebd51253e42254 commit r15-697-ga2e4fe5a53cf75cd055f64e745ebd51253e42254 Author: Pengxuan Zheng Date: Mon May 13 10:47:10 2024 -0700 aarch64: Fold vget_low_* intrinsics to BIT_FIELD_REF [PR102171] This patch folds vget_low_*

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

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

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

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

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

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

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

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

Re: [PATCH] Optab: add isfinite_optab for __builtin_isfinite

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

Re: [PATCH] Optab: add isnormal_optab for __builtin_isnormal

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

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

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

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

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

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

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

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

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

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

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

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

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

Re: [PATCH] AArch64: Improve costing of ctz

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

  1   2   3   4   5   6   7   8   9   10   >