Re: [r14-159 Regression] FAIL: std/ranges/iota/max_size_type.cc execution test on Linux/x86_64

2023-04-22 Thread Jakub Jelinek via Gcc-patches
On Sat, Apr 22, 2023 at 11:30:24AM +0800, haochen.jiang via Gcc-patches wrote: > On Linux/x86_64, > > 03cebd304955a6b9c5607e09312d77f1307cc98e is the first bad commit > commit 03cebd304955a6b9c5607e09312d77f1307cc98e > Author: Jason Merrill > Date: Tue Apr 18 21:32:07 2023 -0400 > > c++: f

[PATCH] Fix up bootstrap with GCC 4.[89] after RAII auto_mpfr and autp_mpz [PR109589]

2023-04-22 Thread Jakub Jelinek via Gcc-patches
Hi! On Tue, Apr 18, 2023 at 03:39:41PM +0200, Richard Biener via Gcc-patches wrote: > The following adds two RAII classes, one for mpz_t and one for mpfr_t > making object lifetime management easier. Both formerly require > explicit initialization with {mpz,mpfr}_init and release with > {mpz,mpfr

[PATCH] testsuite: Fix up pr109011-*.c tests for powerpc [PR109572]

2023-04-22 Thread Jakub Jelinek via Gcc-patches
Hi! As reported, pr109011-{4,5}.c tests fail on powerpc. I thought they should have the same counts as the corresponding -{2,3}.c tests, the only difference is that -{2,3}.c are int while -{4,5}.c are long long. But there are 2 issues. One is that in the foo function the vectorization costs comp

[Patch, fortran] PRs 105152, 100193, 87946, 103389, 104429 and 82774

2023-04-22 Thread Paul Richard Thomas via Gcc-patches
Hi All, As usual, I received a string of emails on retargeting for PRs for which I was either responsible or was on the cc list. This time I decided to take a look at them all, in order to reward the tireless efforts of Richi, Jakub and Martin with some attention at least. I have fixed the PRs in

[PATCH v4 4/4] ree: Improve ree pass for rs6000 target using defined ABI interfaces.

2023-04-22 Thread Ajit Agarwal via Gcc-patches
Hello All: This new version of patch 4 use improve ree pass for rs6000 target using defined ABI interfaces. Bootstrapped and regtested on power64-linux-gnu. Thanks & Regards Ajit ree: Improve ree pass for rs6000 target using defined abi interfaces For rs6000 target we see redu

Re: [PATCH] Fortran: function results never have the ALLOCATABLE attribute [PR109500]

2023-04-22 Thread Mikael Morin
Hello, Le 20/04/2023 à 22:01, Harald Anlauf via Fortran a écrit : Dear all, Fortran 2018 added a clarification that the *result* of a function whose result *variable* has the ALLOCATABLE attribute is a *value* that itself does not have the ALLOCATABLE attribute. For those interested: there was

Re: [PATCH v4 1/4] rs6000: Enable REE pass by default

2023-04-22 Thread Segher Boessenkool
Hi! Please look at and reply to that message, with answers to the questions? And make sure you are listed in MAINTAINERS before anything else. Thanks! Segher

Re: [PATCH v3 1/4] ree: Default ree pass for O2 and above for rs6000 target.

2023-04-22 Thread Ajit Agarwal via Gcc-patches
Hello Segher: On 20/04/23 1:30 am, Segher Boessenkool wrote: > Hi! > > The subject should be something like > > rs6000: Enable REE pass by default > > (and no period at the end). > > On Wed, Apr 19, 2023 at 11:23:07PM +0530, Ajit Agarwal wrote: >> This is the patch-1 for improving ree pass for

Re: [PATCH v4 1/4] rs6000: Enable REE pass by default

2023-04-22 Thread Ajit Agarwal via Gcc-patches
Hello Segher: On 22/04/23 6:56 pm, Segher Boessenkool wrote: > Hi! > > Please look at > > and reply to that message, with answers to the questions? And make sure > you are listed in MAINTAINERS before anything e

Re: [PATCH v3 4/4] ree: Using ABI interfaces to improve ree pass for rs6000 target.

2023-04-22 Thread Ajit Agarwal via Gcc-patches
Hello Jeff: On 20/04/23 3:29 am, Jeff Law wrote: > > > On 4/19/23 12:03, Ajit Agarwal wrote: >> Hello All: >> >> This is patch-4 to improve ree pass for rs6000 target. >> Use ABI interfaces support. >> >> Bootstrapped and regtested on powerpc64-linux-gnu. >> >> Thanks & Regards >> Ajit >> >>    

Re: [PATCH] Fortran: function results never have the ALLOCATABLE attribute [PR109500]

2023-04-22 Thread Steve Kargl via Gcc-patches
On Sat, Apr 22, 2023 at 11:25:41AM +0200, Mikael Morin wrote: > > Le 20/04/2023 à 22:01, Harald Anlauf via Fortran a écrit : > > Dear all, > > > > Fortran 2018 added a clarification that the *result* of a function > > whose result *variable* has the ALLOCATABLE attribute is a *value* > > that its

Re: [PATCH] doc: Update install.texi for GCC 13

2023-04-22 Thread Gerald Pfeifer
On Fri, 21 Apr 2023, Rainer Orth wrote: > * We used a mixture of Solaris 2 and Solaris references. Since Solaris > 1/SunOS 4 is ancient history by now, consistently use Solaris > everywhere. Likewise, explicit references to Solaris 11 can go in > many places since Solaris 11.3 and 11.4 is a

Re: [PATCH] Fortran: function results never have the ALLOCATABLE attribute [PR109500]

2023-04-22 Thread Mikael Morin
Le 22/04/2023 à 15:52, Steve Kargl a écrit : On Sat, Apr 22, 2023 at 11:25:41AM +0200, Mikael Morin wrote: Le 20/04/2023 à 22:01, Harald Anlauf via Fortran a écrit : Dear all, Fortran 2018 added a clarification that the *result* of a function whose result *variable* has the ALLOCATABLE attrib

New Swedish PO file for 'gcc' (version 13.1-b20230409)

2023-04-22 Thread Translation Project Robot
Hello, gentle maintainer. This is a message from the Translation Project robot. A revised PO file for textual domain 'gcc' has been submitted by the Swedish team of translators. The file is available at: https://translationproject.org/latest/gcc/sv.po (This file, 'gcc-13.1-b20230409.sv.po'

[xstormy16 PATCH] Update xstormy16_rtx_costs.

2023-04-22 Thread Roger Sayle
This patch provides an improved rtx_costs target hook on xstormy16. The current implementation has the unfortunate property that it claims that zero_extendhisi2 is very cheap, even though the machine description doesn't provide that instruction/pattern. Doh! Rewriting the xstormy16_rtx_costs fun

[xstormy16 PATCH] Improved SImode shifts by two bits.

2023-04-22 Thread Roger Sayle
Currently on xstormy16 SImode shifts by a single bit require two instructions, and shifts by other non-zero integer immediate constants require five instructions. This patch implements the obvious optimization that shifts by two bits can be done in four instructions, by using two single-bit seque

[committed] Adjust rx movsicc tests

2023-04-22 Thread Jeff Law via Gcc-patches
The rx port has target specific test movsicc which is naturally meant to verify that if-conversion is happening on the expected cases. Unfortunately the test is poorly written. The core problem is there are 8 distinct tests and each of those tests is expected to generate a specific sequence.

Re: [PATCH] Fortran: function results never have the ALLOCATABLE attribute [PR109500]

2023-04-22 Thread Steve Kargl via Gcc-patches
On Sat, Apr 22, 2023 at 05:17:30PM +0200, Mikael Morin wrote: > Le 22/04/2023 à 15:52, Steve Kargl a écrit : > > On Sat, Apr 22, 2023 at 11:25:41AM +0200, Mikael Morin wrote: > > > > > > Le 20/04/2023 à 22:01, Harald Anlauf via Fortran a écrit : > > > > Dear all, > > > > > > > > Fortran 2018 adde

Re: [PATCH] Fix up bootstrap with GCC 4.[89] after RAII auto_mpfr and autp_mpz [PR109589]

2023-04-22 Thread Richard Biener via Gcc-patches
> Am 22.04.2023 um 10:03 schrieb Jakub Jelinek : > > Hi! > >> On Tue, Apr 18, 2023 at 03:39:41PM +0200, Richard Biener via Gcc-patches >> wrote: >> The following adds two RAII classes, one for mpz_t and one for mpfr_t >> making object lifetime management easier. Both formerly require >> exp

Re: [PATCH] testsuite: Fix up pr109011-*.c tests for powerpc [PR109572]

2023-04-22 Thread Richard Biener via Gcc-patches
> Am 22.04.2023 um 10:23 schrieb Jakub Jelinek : > > Hi! > > As reported, pr109011-{4,5}.c tests fail on powerpc. > I thought they should have the same counts as the corresponding -{2,3}.c > tests, the only difference is that -{2,3}.c are int while -{4,5}.c are > long long. But there are 2 i

Re: [PATCH] Fortran: function results never have the ALLOCATABLE attribute [PR109500]

2023-04-22 Thread Harald Anlauf via Gcc-patches
Hi Mikael, Am 22.04.23 um 11:25 schrieb Mikael Morin: Hello, Le 20/04/2023 à 22:01, Harald Anlauf via Fortran a écrit : Dear all, Fortran 2018 added a clarification that the *result* of a function whose result *variable* has the ALLOCATABLE attribute is a *value* that itself does not have the

Re: [PATCH] Fortran: function results never have the ALLOCATABLE attribute [PR109500]

2023-04-22 Thread Mikael Morin
Le 22/04/2023 à 20:19, Harald Anlauf a écrit : Hi Mikael, Am 22.04.23 um 11:25 schrieb Mikael Morin: Hello, Le 20/04/2023 à 22:01, Harald Anlauf via Fortran a écrit : Dear all, Fortran 2018 added a clarification that the *result* of a function whose result *variable* has the ALLOCATABLE attr

[xstormy16] Add extendhisi2 and zero_extendhisi2 patterns to stormy16.md

2023-04-22 Thread Roger Sayle
This patch adds a pair of define_insn patterns to the xstormy16 machine description that provide extendhisi2 and zero_extendhisi2, i.e. 16-bit to 32-bit sign- and zero-extension respectively. This functionality is already synthesized during RTL expansion, but providing patterns allow the semantic

Re: [PATCH] arm: Implement arm Function target attribute 'branch-protection'

2023-04-22 Thread Ramana Radhakrishnan
On Fri, Jan 27, 2023 at 2:44 PM Andrea Corallo via Gcc-patches wrote: > > gcc/ > > * config/arm/arm.cc (arm_valid_target_attribute_rec): Add ARM function > attribute 'branch-protection' and parse its options. > * doc/extend.texi: Document ARM Function attribute > 'branch-p

Re: [PATCH] aarch64: Add the scheduling model for Neoverse N1

2023-04-22 Thread Ramana Radhakrishnan
On Tue, Apr 18, 2023 at 10:42 PM Evandro Menezes via Gcc-patches wrote: > > This patch adds the scheduling model for Neoverse N1, based on the > information from the "Arm Neoverse N1 Software Optimization Guide”. There haven't been many large core schedulers recently - so it will be interesting

Re: [PATCH] dse: Use SUBREG_REG for copy_to_mode_reg in DSE replace_read for WORD_REGISTER_OPERATIONS targets [PR109040]

2023-04-22 Thread Jeff Law via Gcc-patches
On 4/18/23 07:47, Jakub Jelinek wrote: On Tue, Apr 18, 2023 at 07:35:44AM -0600, Jeff Law wrote: On 4/18/23 03:06, Jakub Jelinek wrote: Hi! While we've agreed this is not the right fix for the PR109040 bug, the patch clearly improves generated code (at least on the testcase from the PR),

Re: [PATCH] Avoid repeated forwarder_block_p calls in CFG cleanup

2023-04-22 Thread Jeff Law via Gcc-patches
On 4/19/23 04:32, Richard Biener via Gcc-patches wrote: CFG cleanup maintains BB_FORWARDER_BLOCK and uses FORWARDER_BLOCK_P to check that apart from two places which use forwarder_block_p in outgoing_edges_match alongside many BB_FORWARDER_BLOCK uses. The following adjusts those. Bootstrappe

Re: [PATCH] PHIOPT: Improve minmax diamond detection for phiopt1

2023-04-22 Thread Jeff Law via Gcc-patches
On 4/19/23 15:36, Andrew Pinski via Gcc-patches wrote: For diamond bb phi node detection, there is a check to make sure bb1 is not empty. But in the case where bb1 is empty except for a predicate, empty_block_p will still return true but the minmax code handles that case already so there is no

Re: [PATCH] PHIOPT: Improve readability of tree_ssa_phiopt_worker

2023-04-22 Thread Jeff Law via Gcc-patches
On 4/19/23 19:05, Andrew Pinski via Gcc-patches wrote: This small patch just changes around the code slightly to make it easier to understand that the cases were handling diamond shaped BB for both do_store_elim/do_hoist_loads. There is no effect on code output at all since all of the checks a

Re: [xstormy16 PATCH] Improved SImode shifts by two bits.

2023-04-22 Thread Jeff Law via Gcc-patches
On 4/22/23 10:43, Roger Sayle wrote: Currently on xstormy16 SImode shifts by a single bit require two instructions, and shifts by other non-zero integer immediate constants require five instructions. This patch implements the obvious optimization that shifts by two bits can be done in four i

Re: [xstormy16] Add extendhisi2 and zero_extendhisi2 patterns to stormy16.md

2023-04-22 Thread Jeff Law via Gcc-patches
On 4/22/23 14:57, Roger Sayle wrote: This patch adds a pair of define_insn patterns to the xstormy16 machine description that provide extendhisi2 and zero_extendhisi2, i.e. 16-bit to 32-bit sign- and zero-extension respectively. This functionality is already synthesized during RTL expansion,

[PATCH 1/6] PHIOPT: Move check on diamond bb to tree_ssa_phiopt_worker from minmax_replacement

2023-04-22 Thread Andrew Pinski via Gcc-patches
This moves the check to make sure on the diamond shaped form bbs that the the two middle bbs are only for that diamond shaped form earlier in the shared code. Also remove the redundant check for single_succ_p since that was already done before hand. The next patch will simplify the code even furthe

[PATCH 0/6] Improve PHIOPT match and simplify for diamond shaped bbs

2023-04-22 Thread Andrew Pinski via Gcc-patches
This set of patches implement match and simplify for diamond shaped bbs. Right now there are no match-and-simplify patterns which take advantages of this directly. Though predicates can cause a diamond shaped bb to show up in phiopt1 even though the BB is empty. This allows for that and fixes phi-o

[PATCH 5/6] PHIOPT: Ignore predicates for match-and-simplify phi-opt

2023-04-22 Thread Andrew Pinski via Gcc-patches
This fixes a missed optimization where early phi-opt would not work when there was predicates. The easiest fix is to change empty_bb_or_one_feeding_into_p to ignore those statements while checking for only feeding statement. Note phi-opt-23.c and phi-opt-24.c still fail as we don't handle diamond

[PATCH 4/6] PHIOPT: Factor out some code from match_simplify_replacement

2023-04-22 Thread Andrew Pinski via Gcc-patches
This factors out the code checking if we have an empty bb or one statement that feeds into the phi so it can be used when adding diamond shaped bb form to match_simplify_replacement in the next patch. Also allows for some improvements in the next patches too. OK? Bootstrapped and tested on x86_64-

[PATCH 2/6] PHIOPT: Cleanup tree_ssa_phiopt_worker code

2023-04-22 Thread Andrew Pinski via Gcc-patches
This patch cleans up tree_ssa_phiopt_worker by merging common code. Making do_store_elim handled earlier. Note this does not change any overall logic of the code, just moves code around enough to be able to do this. This will make it easier to move code around even more and a few other fixes I have

[PATCH 3/6] PHIOPT: Allow other diamond uses when do_hoist_loads is true

2023-04-22 Thread Andrew Pinski via Gcc-patches
While working on adding diamond shaped form to match-and-simplify phiopt, I Noticed that we would not reach there if do_hoist_loads was true. In the original code before the cleanups it was not obvious why but after I finished the cleanups, it was just a matter of removing a continue and that is wh

[PATCH 6/6] PHIOPT: Add support for diamond shaped bb to match_simplify_replacement

2023-04-22 Thread Andrew Pinski via Gcc-patches
This adds diamond shaped form of basic blocks to match_simplify_replacement. This is the patch is the start of removing/moving all of what minmax_replacement does to match.pd to reduce the code duplication. OK? Bootstrapped and tested on x86_64-linux-gnu with no regressions. Note phi-opt-{23,24}.

Re: [xstormy16 PATCH] Update xstormy16_rtx_costs.

2023-04-22 Thread Jeff Law via Gcc-patches
On 4/22/23 10:38, Roger Sayle wrote: This patch provides an improved rtx_costs target hook on xstormy16. The current implementation has the unfortunate property that it claims that zero_extendhisi2 is very cheap, even though the machine description doesn't provide that instruction/pattern. D

Re: [r14-159 Regression] FAIL: std/ranges/iota/max_size_type.cc execution test on Linux/x86_64

2023-04-22 Thread Jonathan Wakely via Gcc-patches
On Saturday, April 22, 2023, Jakub Jelinek wrote: > On Sat, Apr 22, 2023 at 11:30:24AM +0800, haochen.jiang via Gcc-patches wrote: >> On Linux/x86_64, >> >> 03cebd304955a6b9c5607e09312d77f1307cc98e is the first bad commit >> commit 03cebd304955a6b9c5607e09312d77f1307cc98e >> Author: Jason Merrill

Re: Re: [PATCH] RISC-V: Optimize zbb ins sext.b and sext.h in rv64

2023-04-22 Thread Feng Wang
On 2023-04-22 08:08  Jeff Law wrote: > > > >On 3/23/23 19:53, Feng Wang wrote: >> This patch optimize the combine processing for sext.b/h in rv64. >> Please refer to the following test case, >> int sextb32(int x) >> { return (x << 24) >> 24; } >> >> The rtl expression is as follows, >> (insn 6 3 7

RE: [PATCH 1/2] Use NO_REGS in cost calculation when the preferred register class are not known yet.

2023-04-22 Thread Liu, Hongtao via Gcc-patches
> -Original Message- > From: Vladimir Makarov > Sent: Saturday, April 22, 2023 3:26 AM > To: Liu, Hongtao ; gcc-patches@gcc.gnu.org > Cc: crazy...@gmail.com; hjl.to...@gmail.com > Subject: Re: [PATCH 1/2] Use NO_REGS in cost calculation when the > preferred register class are not known y

Re: [aarch64] Use dup and zip1 for interleaving elements in initializing vector

2023-04-22 Thread Prathamesh Kulkarni via Gcc-patches
On Fri, 21 Apr 2023 at 20:45, Prathamesh Kulkarni wrote: > > On Fri, 21 Apr 2023 at 14:47, Richard Sandiford > wrote: > > > > Prathamesh Kulkarni writes: > > > Hi, > > > I tested the interleave+zip1 for vector init patch and it segfaulted > > > during bootstrap while trying to build > > > libgfo

[PATCH] Add testcases for ffs/ctz vectorization.

2023-04-22 Thread liuhongt via Gcc-patches
Ready push to trunk. gcc/testsuite/ChangeLog: PR tree-optimization/109011 * gcc.target/i386/pr109011-b1.c: New test. * gcc.target/i386/pr109011-b2.c: New test. * gcc.target/i386/pr109011-d1.c: New test. * gcc.target/i386/pr109011-d2.c: New test. * g

Re: [match.pd] [SVE] Add pattern to transform svrev(svrev(v)) --> v

2023-04-22 Thread Prathamesh Kulkarni via Gcc-patches
On Fri, 21 Apr 2023 at 21:57, Richard Sandiford wrote: > > Prathamesh Kulkarni writes: > > On Wed, 19 Apr 2023 at 16:17, Richard Biener > > wrote: > >> > >> On Wed, Apr 19, 2023 at 11:21 AM Prathamesh Kulkarni > >> wrote: > >> > > >> > On Tue, 11 Apr 2023 at 19:36, Prathamesh Kulkarni > >> >