[PATCH] tree-optimization/89317 - another pattern for &p->x != p + 4

2022-12-11 Thread Richard Biener via Gcc-patches
As seen in the original testcase for PR89317 we are missing comparison simplification patterns for &p->x != p + 4. Fixed by making an existing one apply. To make the pattern apply during CCP we need to simplify ccp_fold to not use GENERIC folding of conditions but also use GIMPLE folding. Bootst

Re: [PATCH] libstdc++: Make chrono::hh_mm_ss more compact

2022-12-11 Thread Stephan Bergmann via Gcc-patches
On 11/21/22 21:43, Jonathan Wakely via Libstdc++ wrote: + static constexpr bool __is_unsigned + = __and_v, + is_unsigned>; Using `__is_unsigned` as an identifier here causes compilation issues with Clang, which predefines that as a builtin predicate.

Re: [PATCH v5, rs6000] Change mode and insn condition for VSX scalar extract/insert instructions

2022-12-11 Thread HAO CHEN GUI via Gcc-patches
Hi Kewen, 在 2022/12/8 16:47, Kewen.Lin 写道: > This documentation update reminds me of that the current prototype of > __ieee128 > variant can be: > > unsigned int scalar_extract_exp (__ieee128 source); > > type unsigned int is enough for the exponent. It means xsxexpqp_ can > also > use SImo

[PATCH V2] rs6000: Load high and low part of 64bit constant independently

2022-12-11 Thread Jiufu Guo via Gcc-patches
Hi, Compare with previous patch, this patch updates accoding to comments; fixes conflicts with trunk, and recheck bootstrap®test. https://gcc.gnu.org/pipermail/gcc-patches/2022-November/607333.html For a complicate 64bit constant, blow is one instruction-sequence to build: lis 9,0x800a

[PATCH V4 1/2] rs6000: use li;x?oris to build constant

2022-12-11 Thread Jiufu Guo via Gcc-patches
Hi, For constant C: If '(c & 0x8000ULL) == 0x8000ULL' or say: 32(1) || 16(x) || 1(1) || 15(x), using "li; xoris" would be ok. If '(c & 0x80008000ULL) == 0x8000ULL' or say: 32(0) || 1(1) || 15(x) || 1(0) || 15(x), we could use "li; oris" to build constant 'C'.

[PATCH V4 2/2] rs6000: use li;x?oris to build constant

2022-12-11 Thread Jiufu Guo via Gcc-patches
Hi, For constant C: If '(c & 0xULL) == 0x' or say: 32(1) || 1(0) || 15(x) || 16(0), we could use "lis; xoris" to build. Here N(M) means N continuous bit M, x for M means it is ok for either 1 or 0; '||' means concatenation. This patch update rs6000_emit_set_long_c

Re: Java front-end and library patches.

2022-12-11 Thread Zopolis0 via Gcc-patches
I've been looking over the reviews as well as a few things I've encountered locally, and collected this list: Unfortunately, I am simply not familiar enough with the gcc tree to implement patch 16, although there is a slight possibility that I may be able to do patch 19, and a stronger one that I

Re: [PATCH] Fortran: improve checking of assumed size array spec [PR102180]

2022-12-11 Thread Steve Kargl via Gcc-patches
On Sun, Dec 11, 2022 at 11:33:43PM +0100, Harald Anlauf via Fortran wrote: > Dear all, > > the attached patch improves checking of array specs in two ways: > - bad assumed size array spec > - a bad first array element spec may already trigger an error, > leading to a more consistent behavior >

[PATCH] Fortran: improve checking of assumed size array spec [PR102180]

2022-12-11 Thread Harald Anlauf via Gcc-patches
Dear all, the attached patch improves checking of array specs in two ways: - bad assumed size array spec - a bad first array element spec may already trigger an error, leading to a more consistent behavior Regtested on x86_64-pc-linux-gnu. OK for mainline? Thanks, Harald From 06c1d0a96544640

[GCC-12][committed] d: Remove "final" and "override" from visitor method.

2022-12-11 Thread Iain Buclaw via Gcc-patches
Hi, This patch removes "final" and "override" from the OverloadSet visitor method. This was added by the backport of an ICE in r12-8969. While harmless, it was not until r13-758 that "final" and "override" were introduced to all visitor methods in the D front-end. Removing it from the release b

[committed] d: Fix internal compiler error: in visit, at d/imports.cc:72 (PR108050)

2022-12-11 Thread Iain Buclaw via Gcc-patches
Hi, This patch fixes an ICE in the D front-end when importing symbols that have multiple overloads. The visitor for lowering IMPORTED_DECLs did not have an override for dealing with importing OverloadSet symbols. This has now been implemented in the code generator. Bootstrapped and regression t

Re: [PATCH] Fortran: fix ICE on bad use of statement function [PR107995]

2022-12-11 Thread Jerry D via Gcc-patches
On 12/10/22 1:23 PM, Harald Anlauf via Fortran wrote: Dear all, I'm submitting the attached patch on behalf of Steve. It fixes an ICE that occurs on an obscure use of a statement function as argument to that function. Regtested on x86_64-pc-linux-gnu. OK for mainline? Thanks, Harald OK, lo

[PATCH (pushed)] unidiff: use newline='\n' argument

2022-12-11 Thread Martin Liška
In order to support CR on a line, we need to open files with newline='\n' as our line endings supposed to be of UNIX style. Pushed to master. contrib/ChangeLog: * check_GNU_style.py: Use newline=\n. * check_GNU_style_lib.py: Simplify. * gcc-changelog/git_commit.py: Fix is

Re: [PATCH] contracts: Stop relying on mangling for naming .pre/.post clones

2022-12-11 Thread Arsen Arsenović via Gcc-patches
Hi Bernhard, Bernhard Reutner-Fischer writes: > From a very distant POV this auto sounds really like an ugly bandaid and I, > personally would have used a conditional in place argument. auto is really > like > c++ didn't have the guts to go straight to implicit typed LHS like python et > al >

[committed] d: Expand bsr intrinsic as `clz(arg) ^ (argsize - 1)'

2022-12-11 Thread Iain Buclaw via Gcc-patches
Hi, This patch tweaks the code expansion of the D intrinsic bsr() function. As well as removing unnecessary casts, this results in less temporaries being generated during the initial gimple lowering pass. Otherwise the code generated is identical to the former intrinsic expansion. Bootstrapped

Re: [PATCH] tree-optimization/106904 - bogus -Wstringopt-overflow with vectors

2022-12-11 Thread Richard Biener via Gcc-patches
On Wed, 7 Dec 2022, Richard Biener wrote: > The following avoids CSE of &ps->wp to &ps->wp.hwnd confusing > -Wstringopt-overflow by making sure to produce addresses to the > biggest container from vectorization. For this I introduce > strip_zero_offset_components which turns &ps->wp.hwnd into > &

gcc-patches@gcc.gnu.org

2022-12-11 Thread Richard Biener via Gcc-patches
The PR notices we fail to simplify a_4 = &x_3(D)->data; b_5 = x_3(D) + 16; _1 = b_5 - a_4; together with the enabler handling ADDR_EXPR leafs in separate stmts in match.pd the suggested patterns work. Bootstrapped on x86_64-unknown-linux-gnu, testing in progress. PR tree-optimizat

[PATCH 1/2] Treat ADDR_EXPR and CONSTRUCTOR as GIMPLE/GENERIC magically

2022-12-11 Thread Richard Biener via Gcc-patches
The following allows to match ADDR_EXPR for both the invariant &a.b case as well as the &p->d case in a separate definition transparently. This also allows to remove the hack we employ for CONSTRUCTOR which we handle for example with (match vec_same_elem_p CONSTRUCTOR@0 (if (TREE_CODE (@0) =

[committed] fortran/openmp.cc: Remove 's' that slipped in during %<..%> replacement (was: [Patch] Fortran: Replace simple '.' quotes by %<.%>)

2022-12-11 Thread Tobias Burnus
On 09.12.22 22:12, Tobias Burnus wrote: Found when working on the just submitted/committed patch. Committed as r13-4590 – but it required a follow-up that I somehow missed :-/ but that is now committed as well (as r13-4597). Tobias - Siemens Electronic Design Automation GmbH;

Re: [PATCH] Backport gcc-12: jobserver FIFO support

2022-12-11 Thread Richard Biener via Gcc-patches
On Fri, Dec 9, 2022 at 11:07 AM Martin Liška wrote: > > Hi. > > As make 4.4 has been release, it switches to FIFO by default. That makes > troubles to the latest GCC release, version 12. Can you elaborate on "troubles" here? I'm fine with backporting the whole series to GCC 12 but I wonder if ea

Re: [PATCH v4 1/19] modula2 front end: changes outside gcc/m2, libgm2 and gcc/testsuite.

2022-12-11 Thread Richard Biener via Gcc-patches
On Sat, Dec 10, 2022 at 1:49 AM Gaius Mulley via Gcc-patches wrote: > > > While writing the ChangeLog entries git gcc-verify spotted an oversight > with v3 of this patch set. I had forgotten to post gm2.texi and also a > tiny patchlet in gcc/configure.ac (to detect Python). HAVE_PYTHON is > used

Re: [PATCH v5 1/19] modula2 front end: changes outside gcc/m2, libgm2 and gcc/testsuite. Addendum.

2022-12-11 Thread Gaius Mulley via Gcc-patches
Richard Biener writes: > On Sat, Dec 10, 2022 at 12:29 PM Gaius Mulley via Gcc-patches > wrote: >> >> >> This patch contains a replacement doc/gm2.texi which uses American >> spelling, all references to gm2 outside the gcc tree purged and the >> News/Obtaining sections have been removed. >> >> A

Re: [PATCH v5 1/19] modula2 front end: changes outside gcc/m2, libgm2 and gcc/testsuite. Addendum.

2022-12-11 Thread Richard Biener via Gcc-patches
On Sat, Dec 10, 2022 at 12:29 PM Gaius Mulley via Gcc-patches wrote: > > > This patch contains a replacement doc/gm2.texi which uses American > spelling, all references to gm2 outside the gcc tree purged and the > News/Obtaining sections have been removed. > > Also included at the end is the lang.