Re: [RFA] Attach MEM_EXPR information when flushing BLKmode args to the stack

2021-07-05 Thread Jeff Law via Gcc-patches
On 7/5/2021 5:17 AM, Richard Biener via Gcc-patches wrote: On Fri, Jul 2, 2021 at 6:13 PM Jeff Law wrote: This is a minor missed optimization we found with our internal port. Given this code: typedef struct {short a; short b;} T; extern void g1(); void f(T s) { if (s.a < 0)

[r12-2036 Regression] FAIL: gcc.dg/pr96573.c scan-tree-dump optimized "__builtin_bswap|VEC_PERM_EXPR[^\n\r]*7, 6, 5, 4, 3, 2, 1, 0" on Linux/x86_64

2021-07-05 Thread sunil.k.pandey via Gcc-patches
On Linux/x86_64, be8749f939a933bca6de19d9cf1a510d5954c2fa is the first bad commit commit be8749f939a933bca6de19d9cf1a510d5954c2fa Author: Uros Bizjak Date: Mon Jul 5 21:05:10 2021 +0200 i386: Implement 4-byte vector (V4QI/V2HI) constant permutations caused FAIL: gcc.dg/pr96573.c scan-tre

[PATCH, rs6000] fix failure test cases caused by disabling mode promotion for pseudos [PR100952]

2021-07-05 Thread HAO CHEN GUI via Gcc-patches
Hi    The patch changed matching conditions in pr81384.c and pr56605.c. The original conditions failed to match due to mode promotion disabled.    The attachments are the patch diff and change log file.    Bootstrapped and tested on powerpc64le-linux with no regressions. Is this okay for tru

[PATCH, rs6000] fix execution failure of parity_1.f90 on P10 [PR100952]

2021-07-05 Thread HAO CHEN GUI via Gcc-patches
Hi,    The patch fixed the wrong "if" fall through in "cstore4" expand, which causes comparison pattern expanded twice on P10.    The attachments are the patch diff and change log file.     Bootstrapped and tested on powerpc64le-linux with no regressions. Is this okay for trunk? Any recommen

Re: [PATCH] Add FMADDSUB and FMSUBADD SLP vectorization patterns and optabs

2021-07-05 Thread Hongtao Liu via Gcc-patches
On Mon, Jul 5, 2021 at 10:09 PM Richard Biener wrote: > > This adds named expanders for vec_fmaddsub4 and > vec_fmsubadd4 which map to x86 vfmaddsubXXXp{ds} and > vfmsubaddXXXp{ds} instructions. This complements the previous > addition of ADDSUB support. > > x86 lacks SUBADD and the negate varian

Re: PING: [PATCH] mips: check MSA support for vector modes [PR100760, PR100761, PR100762]

2021-07-05 Thread Paul Hua via Gcc-patches
Looks good to me, but I have no right to approve. On Wed, Jun 30, 2021 at 9:17 PM Xi Ruoyao wrote: > > Ping patch: > https://gcc.gnu.org/pipermail/gcc-patches/2021-June/573213.html > > Status update: bootstrapped with BOOT_CFLAGS="-O3 -mmsa -mloongson-mmi" > (it failed without the patch), and

Re: [PATCH 1/2] CALL_INSN may not be a real function call.

2021-07-05 Thread Hongtao Liu via Gcc-patches
On Tue, Jul 6, 2021 at 8:03 AM Jeff Law via Gcc-patches wrote: > > > > On 7/5/2021 5:30 PM, Segher Boessenkool wrote: > > Hi! > > > > I ran into this in shrink-wrap.c today. > > > > On Thu, Jun 03, 2021 at 02:54:07PM +0800, liuhongt via Gcc-patches wrote: > >> Use "used" flag for CALL_INSN to indi

Re: [PATCH 1/2] CALL_INSN may not be a real function call.

2021-07-05 Thread Hongtao Liu via Gcc-patches
On Tue, Jul 6, 2021 at 7:31 AM Segher Boessenkool wrote: > > Hi! > > I ran into this in shrink-wrap.c today. > > On Thu, Jun 03, 2021 at 02:54:07PM +0800, liuhongt via Gcc-patches wrote: > > Use "used" flag for CALL_INSN to indicate it's a fake call. If it's a > > fake call, it won't have its own

[PATCH] dwarf2ctf: the unit of sou field location is bits [PR101283]

2021-07-05 Thread Indu Bhagat via Gcc-patches
If the value of the DW_AT_data_member_location attribute is constant, the associated unit is bytes. This patch amends incorrect behaviour which was being exercised with -gdwarf-2. This caused some of the failures as noted in PR debug/101283 (specifically the BTF tests involving btm_offset). The te

[PATCH] Fix 101256: Wrong code due to range incorrect from PHI-OPT

2021-07-05 Thread apinski--- via Gcc-patches
From: Andrew Pinski So the problem here is that replace_phi_edge_with_variable will copy range information to a already (not newly) defined ssa name. This causes wrong code later on. This fixes the problem by require the new ssa name to be defined in the same bb as the conditional that is about

[PATCH] libffi/x86: Always check __x86_64__ for x86 hosts

2021-07-05 Thread H.J. Lu via Gcc-patches
Since for gnux32 hosts, -m32 generates i386 codes, always check __x86_64__ for x86 hosts. PR libffi/101336 * configure.host: Always check __x86_64__ for x86 hosts. --- libffi/configure.host | 21 +++-- 1 file changed, 7 insertions(+), 14 deletions(-) diff --git a/

[COMMITTED] CTF, BTF testsuite: Use -gdwarf-4 for restrict type qualifier [PR101283]

2021-07-05 Thread Indu Bhagat via Gcc-patches
[Committed as obvious.] DWARF DIEs do not contain DW_TAG_restrict_type when DWARF version is 2. CTF/BTF generation feeds off DWARF DIEs, and as such, CTF records of kind CTF_K_RESTRICT cease to be generated when DWARF version is 2. This patch fixes the failure of these testcases on Darwin by usin

Re: [PATCH 1/2] CALL_INSN may not be a real function call.

2021-07-05 Thread Jeff Law via Gcc-patches
On 7/5/2021 5:30 PM, Segher Boessenkool wrote: Hi! I ran into this in shrink-wrap.c today. On Thu, Jun 03, 2021 at 02:54:07PM +0800, liuhongt via Gcc-patches wrote: Use "used" flag for CALL_INSN to indicate it's a fake call. If it's a fake call, it won't have its own function stack. Could

Re: [PATCH 1/2] CALL_INSN may not be a real function call.

2021-07-05 Thread Segher Boessenkool
Hi! I ran into this in shrink-wrap.c today. On Thu, Jun 03, 2021 at 02:54:07PM +0800, liuhongt via Gcc-patches wrote: > Use "used" flag for CALL_INSN to indicate it's a fake call. If it's a > fake call, it won't have its own function stack. Could you document somewhere what a "fake call" *is*?

Re: [PATCH] build: Implement --with-multilib-list for avr target

2021-07-05 Thread Matt Jacobson via Gcc-patches
> On Jun 7, 2021, at 3:30 AM, Matt Jacobson wrote: > > The AVR target builds a lot of multilib variants of target libraries by > default, > and I found myself wanting to use the --with-multilib-list argument to limit > what I was building, to shorten build times. This patch implements that

Re: [PATCH 1/5] Fix 101256: Wrong code due to range incorrect from PHI-OPT

2021-07-05 Thread Andrew Pinski via Gcc-patches
On Mon, Jul 5, 2021 at 4:26 AM Richard Biener via Gcc-patches wrote: > > On Sun, Jul 4, 2021 at 8:40 PM apinski--- via Gcc-patches > wrote: > > > > From: Andrew Pinski > > > > So the problem here is that replace_phi_edge_with_variable > > will copy range information to a already (not newly) defi

[committed] Remove redundant compare in shift loop on H8

2021-07-05 Thread Jeff Law via Gcc-patches
As I've mentioned elsewhere, the H8, particularly early models has very limited shift capabilities -- including no inherent support for shift by a variable amount. Naturally GCC accommodates this by emitting a suitable loop. The shift loop has a typical sequence.  Shift, decrement counter, t

Re: [PATCH] Darwin, configury : Allow for specification and detection of dsymutil.

2021-07-05 Thread Joseph Myers
On Mon, 5 Jul 2021, Iain Sandoe wrote: > Hello Joseph, > > > On 5 Jul 2021, at 21:21, Joseph Myers wrote: > > > > On Sun, 4 Jul 2021, Iain Sandoe wrote: > > > >>* configure.ac: Handle --with-dsymutil in the same way as we > >>do for the assembler and linker. (DEFAULT_DSYMUTIL): New. >

Re: [PATCH] Darwin, configury : Allow for specification and detection of dsymutil.

2021-07-05 Thread Iain Sandoe
Hello Joseph, > On 5 Jul 2021, at 21:21, Joseph Myers wrote: > > On Sun, 4 Jul 2021, Iain Sandoe wrote: > >> * configure.ac: Handle --with-dsymutil in the same way as we >> do for the assembler and linker. (DEFAULT_DSYMUTIL): New. >> Extract the type and version for the dsymutil

Re: [PATCH] Darwin, configury : Allow for specification and detection of dsymutil.

2021-07-05 Thread Joseph Myers
On Sun, 4 Jul 2021, Iain Sandoe wrote: > * configure.ac: Handle --with-dsymutil in the same way as we > do for the assembler and linker. (DEFAULT_DSYMUTIL): New. > Extract the type and version for the dsymutil configured or > found by the default searches. This is missing

[PATCH] i386: Implement 4-byte vector (V4QI/V2HI) constant permutations [PR100637]

2021-07-05 Thread Uros Bizjak via Gcc-patches
2021-07-05 Uroš Bizjak gcc/ PR target/100637 * config/i386/i386-expand.c (ix86_split_mmx_punpck): Handle V4QI and V2HI modes. (expand_vec_perm_blend): Allow 4-byte vector modes with TARGET_SSE4_1. Handle V4QI mode. Emit mmx_pblendvb32 for 4-byte modes. (expand_vec_perm_p

contracts library support (was Re: [PATCH] PING implement pre-c++20 contracts)

2021-07-05 Thread Jason Merrill via Gcc-patches
On 6/26/21 10:23 AM, Andrew Sutton wrote: I ended up taking over this work from Jeff (CC'd on his existing email address). I scraped all the contracts changes into one big patch against master. See attached. The ChangeLog.contracts files list the sum of changes for the patch, not the full histor

Re: [patch, fortran] Fix PR 100227, write with implied DO loop

2021-07-05 Thread Jerry D via Gcc-patches
Looks OK Thomas, Good for backport as well. Regards, Jerry On 7/4/21 9:09 AM, Thomas Koenig via Fortran wrote: Hello world, after a bit of an absence, I am now back, at least for some regression fixing (and for reviewing patches, if that is called for). So, here's a regression fix to start

[PATCH] musl: always use 'lib' directory for all x86_64 ABIs [PR90077]

2021-07-05 Thread Sergei Trofimovich via Gcc-patches
From: Sergei Trofimovich musl library intentionally does not support glibc-style multilib layout and usually assumes --libdir=lib (Gentoo and Alpine Linux both use it). Before the change --disable-multilib x86_64-gentoo-linux-musl returned: $ gcc -print-multi-os-directory ../lib64 $

Re: [PATCH 2/2] Backwards jump threader rewrite with ranger.

2021-07-05 Thread Aldy Hernandez via Gcc-patches
PING. Aldy

Re: Commit: Update libiberty sources

2021-07-05 Thread Nick Clifton via Gcc-patches
Hi H.J. My patch is needed to build binutils with LTO. I submitted a patch for GCC: https://gcc.gnu.org/pipermail/gcc-patches/2021-July/574405.html Very well. I have reappplied your patch to the mainline and 2.37 branch sources. Cheers Nick

Re: [PATCH] Add FMADDSUB and FMSUBADD SLP vectorization patterns and optabs

2021-07-05 Thread Richard Biener
On Mon, 5 Jul 2021, Richard Biener wrote: > On Mon, Jul 5, 2021 at 4:09 PM Richard Biener wrote: > > > > This adds named expanders for vec_fmaddsub4 and > > vec_fmsubadd4 which map to x86 vfmaddsubXXXp{ds} and > > vfmsubaddXXXp{ds} instructions. This complements the previous > > addition of ADDS

Re: [PATCH] Add FMADDSUB and FMSUBADD SLP vectorization patterns and optabs

2021-07-05 Thread Richard Biener via Gcc-patches
On Mon, Jul 5, 2021 at 4:09 PM Richard Biener wrote: > > This adds named expanders for vec_fmaddsub4 and > vec_fmsubadd4 which map to x86 vfmaddsubXXXp{ds} and > vfmsubaddXXXp{ds} instructions. This complements the previous > addition of ADDSUB support. > > x86 lacks SUBADD and the negate variant

Re: [PATCH] Add gnu::diagnose_as attribute

2021-07-05 Thread Matthias Kretz
On Thursday, 1 July 2021 17:18:26 CEST Jason Merrill wrote: > You probably want to adjust is_late_template_attribute to change that. Right, I hacked is_late_template_attribute but now I only see a TYPE_DECL passed to my attribute handler (!DECL_ALIAS_TEMPLATE_P). I.e. I don't know how your previ

[PATCH] Add FMADDSUB and FMSUBADD SLP vectorization patterns and optabs

2021-07-05 Thread Richard Biener
This adds named expanders for vec_fmaddsub4 and vec_fmsubadd4 which map to x86 vfmaddsubXXXp{ds} and vfmsubaddXXXp{ds} instructions. This complements the previous addition of ADDSUB support. x86 lacks SUBADD and the negate variants of FMA with mixed plus minus so I did not add optabs or patterns

[Ada] Add Reference and Constant_Reference functions to formal containers

2021-07-05 Thread Pierre-Marie de Rodat
Reference and Constant_Reference functions are added to all formal containers types, returning an access to an element in the container. This takes avantage of pointer support in SPARK. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * libgnat/a-cfdlli.ads, libgnat/a-cfdlli.ad

[Ada] Remove Ada.Strings.Text_Output and child units

2021-07-05 Thread Pierre-Marie de Rodat
The GNAT-defined package Ada.Strings.Text_Output has been replaced by the Ada-defined package Ada.Strings.Text_Buffers. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * libgnat/a-stobbu.adb, libgnat/a-stobbu.ads, libgnat/a-stobfi.adb, libgnat/a-stobfi.ads, lib

[Ada] INOX: prototype alternative accessibility model

2021-07-05 Thread Pierre-Marie de Rodat
This patch implements an experimental restriction No_Dynamic_Accessibility_Checks which presents the two alternative accessibility models. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * checks.adb (Accessibility_Checks_Suppressed): Add check against restriction No_D

[Ada] Add Ada 2022 Image and Put_Image support for tagged types

2021-07-05 Thread Pierre-Marie de Rodat
GNAT's initial implementation of Ada 2022's Image and Put_Image attributes did not include full support for tagged types. Improve that level of support. This support is still disabled by default and is enabled via the -gnatd_z switch because it generates additional dispatching routines even for Ada

[Ada] Clean up Get_Index_Bounds

2021-07-05 Thread Pierre-Marie de Rodat
Replace some calls to procedure Get_Index_Bounds with calls to the function with the same name. Not all calls are replaced (some seem clearer as procedure calls). Change names to be more consistent with the RM. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * checks.adb, exp

Re: [PATCH] X86: Provide a CTOR for stringop_algs [PR100246].

2021-07-05 Thread Richard Biener via Gcc-patches
On Mon, Jul 5, 2021 at 3:04 PM Iain Sandoe wrote: > > Hi Richard, > > > On 5 Jul 2021, at 11:50, Richard Biener via Gcc-patches > > wrote: > > > > On Sun, Jul 4, 2021 at 10:04 PM Iain Sandoe wrote: > > >> Several older compilers fail to build modern GCC because of missing > >> or incomplete C++

[Ada] Simplify and reuse Is_Concurrent_Interface

2021-07-05 Thread Pierre-Marie de Rodat
Code cleanup; semantics is unaffected. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * exp_ch3.adb (Stream_Operation_OK): Reuse Is_Concurrent_Interface. * sem_ch3.adb (Analyze_Interface_Declaration, Build_Derived_Record_Type): Likewise. * sem_

[Ada] Reject overlays in Global/Depends/Initializes contracts

2021-07-05 Thread Pierre-Marie de Rodat
Object overlays, i.e. objects with an Address clause that specify the address of an overlaid object, are no longer allowed to appear in SPARK data and dependency flow contracts. Also, they do not contribute to the package state and so don't need to appear in Refined_State contracts. Tested on x86_

[Ada] Adapt SPARK RM rule on non-effectively volatile abstract state

2021-07-05 Thread Pierre-Marie de Rodat
SPARK RM 7.1.3(8) has been updated to reflect the fact that abstract states which do have Async_Writers or Effective_Reads cannot have as constituents objects which are effectively volatile for reading, hence need not require that a function reading such an abstract state be marked as a volatile fu

[Ada] Fix some "current instance" bugs

2021-07-05 Thread Pierre-Marie de Rodat
This started out as an Ada2022 ticket, but work on Ada 2022 constructs uncovered bugs that could affect pre-Ada2022 code. Fix those bugs. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * exp_ch3.adb (Build_Record_Init_Proc.Build_Assignment): When building the assignme

[Ada] Fix missing error messages when returning limited type

2021-07-05 Thread Pierre-Marie de Rodat
Check_Limited_Return originally used Comes_From_Source (N) in order to decide whether N was a return statement created from an extended return statement or not. This was a problem because the return statement from expression functions also have their Comes_From_Source flag set to false. The soluti

[Ada] Fix excessive check for alignment of overlaying objects

2021-07-05 Thread Pierre-Marie de Rodat
When generating alignment checks for Address representation clauses we optimized them away for clauses like: for X'Address use Arr (1)'Address; for X'Address use Rec.C'Address; but not: for X'Address use Obj'Address; even though the alignment of Obj is known. Tested on x86_64-pc-linux-gn

[Ada] The Unix Epochalypse of 2038 (Warn about time_t in the compiler)

2021-07-05 Thread Pierre-Marie de Rodat
Add some comments to warn about the use of time_t in the host based tools since it's not practical to remove the declaration itself. Rename some formal parameters in internal subprograms to reflect the fact that OS_Time is the preferred interface type. Tested on x86_64-pc-linux-gnu, committed on t

[Ada] The Unix Epochalyse of 2038 - OS_Time comparison

2021-07-05 Thread Pierre-Marie de Rodat
The comment in the public section of the spec says the comparison ops are intrinsic, but that doesn't match the private part implementation and comment. Fix this. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * libgnat/s-os_lib.ads: Import OS_Time comparison ops as i

[Ada] Fix missing minus sign in literal translation

2021-07-05 Thread Pierre-Marie de Rodat
When translating literals to big reals, the compiler would forget about the minus sign and turn a negative number into a positive one. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * sem_res.adb (Resolve): Insert minus sign if needed.diff --git a/gcc/ada/sem_res.adb b/gcc/ad

[Ada] Temporarily disable Ada 2022 Image and Put_Image support for tagged types

2021-07-05 Thread Pierre-Marie de Rodat
Revert to having support for Ada 2022's Image and Put_Image attributes of tagged types conditional on the -gnatd_z switch (as opposed to being enabled unconditionally). This is a temporary change, so the comments in debug.adb about the -gnatd_z switch have not been restored. Tested on x86_64-pc-li

[Ada] The Unix Epochalypse of 2038 - Use OS_Time

2021-07-05 Thread Pierre-Marie de Rodat
__gnat_set_file_time_name is called from Ada with OS_Time, but the C function argument is time_t. This is a violation of the interface rule that calls to the C parts use OS_Time. It currently works by accident. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * adaint.h (__gn

[Ada] The Unix Epochalyse of 2038 - OS_Time

2021-07-05 Thread Pierre-Marie de Rodat
OS_Time is use mainly in the interface to the "C" part of the GNAT RTL. Change it to a 64-bit signed type on all targets. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * adaint.h (OS_Time): typedef as long long. * osint.adb (Underlying_OS_Time): Declare as 64-bit sig

[Ada] Fix comment about the debug flag for strict alignment

2021-07-05 Thread Pierre-Marie de Rodat
The "strict alignment" compilation mode is controlled by -gnatd.a, as described in Adjust_Global_Switches. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * ttypes.ads (Target_Strict_Alignment): Fix comment.diff --git a/gcc/ada/ttypes.ads b/gcc/ada/ttypes.ads --- a/gcc/ada/tty

[Ada] Adapt SPARK checking after change in rules regarding heap modeling

2021-07-05 Thread Pierre-Marie de Rodat
Rules in SPARK RM section 3.10 regarding modeling of heap through dynamic (de)allocation has changed. As a result, the dependency contract of Ada.Unchecked_Deallocation can be added directly in the sources, and placement of allocators is not checked in the frontend anymore. Tested on x86_64-pc-lin

[Ada] Move overriding rename error message from declaration to use

2021-07-05 Thread Pierre-Marie de Rodat
Posting the error message on the declaration of the renamed subprogram is more confusing than posting the message on the name of the renamed subprogram in the renaming. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * sem_ch3.adb (Check_Abstract_Overriding): Post error messag

[Ada] Turn GNAT_Annotate into its own pragma

2021-07-05 Thread Pierre-Marie de Rodat
GNAT_Annotate being an alias of Annotate rather than its own pragma results in issues for tools that rely on snames to get a list of available pragmas. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * aspects.ads: Add GNAT_Annotate aspect. * gnat1drv.adb (Adjust_Globa

[Ada] Cleanup checking for compatible alignment

2021-07-05 Thread Pierre-Marie de Rodat
Code cleanup only related to handling of Address clauses in GNATprove; semantics is unaffected. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * sem_util.adb (Has_Compatible_Alignment_Internal): Fix indentation of ELSIF comments; remove explicit calls to UI_To

[Ada] Spurious error in instantiation with aggregate and private ancestor

2021-07-05 Thread Pierre-Marie de Rodat
Compiler rejects an instantiation but accepts the corresponding generic unit, when it includes a declaration for a private type whose full view is a record type with a controlled component, and the full view of an object of the type is given by an aggregate with default-initialized components. Tes

[Ada] Fix crash when printing error message

2021-07-05 Thread Pierre-Marie de Rodat
Missing Chars on N were causing a crash - the solution is to set the Sloc from N and to use F_type's chars. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * freeze.adb (Freeze_Profile): Use N's Sloc, F_type's chars.diff --git a/gcc/ada/freeze.adb b/gcc/ada/freeze.adb --- a/gc

[Ada] Print JSON continuation messages as separate messages

2021-07-05 Thread Pierre-Marie de Rodat
Printing continuation messages as a single JSON message was an error as consumers of the JSON output can take advantage of different locations of the continuation message. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * errout.adb (Output_JSON_Message): Recursively call

[Ada] Refactoring related to Returns_By_Ref

2021-07-05 Thread Pierre-Marie de Rodat
Split out the computation of Returns_By_Ref, to make subsequent changes easier. General cleanups. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * sem_util.ads, sem_util.adb (Compute_Returns_By_Ref): New procedure to compute Returns_By_Ref, to avoid some code

[Ada] Do not catch 'N rem -1' in CodePeer_Mode

2021-07-05 Thread Pierre-Marie de Rodat
The special case used for catching the 'rem -1' operation is not useful to CodePeer, and in fact may be detrimental to its precision. Remove it in CodePeer_Mode. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * exp_ch4.adb (Expand_N_Op_Rem): Remove special case for rem -1

[Ada] Fix overriding subprogram being incorrectly seen as returning

2021-07-05 Thread Pierre-Marie de Rodat
Before this commit, GNAT failed to notice that subprograms overriding non-returning subprograms could be renamings of non-returning subprograms and thus wrongfully emitted an error. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * sem_ch3.adb (Check_Abstract_Overriding): Chec

Re: [PATCH v4] ira: Support more matching constraint forms with param [PR100328]

2021-07-05 Thread Vladimir Makarov via Gcc-patches
On 2021-07-01 10:11 p.m., Kewen.Lin wrote: Hi Vladimir, on 2021/6/30 下午11:24, Vladimir Makarov wrote: Many thanks for your review! I've updated the patch according to your comments and also polished some comments and document words a bit. Does it look better to you? Sorry for the delay

Re: [PATCH] X86: Provide a CTOR for stringop_algs [PR100246].

2021-07-05 Thread Iain Sandoe
Hi Richard, > On 5 Jul 2021, at 11:50, Richard Biener via Gcc-patches > wrote: > > On Sun, Jul 4, 2021 at 10:04 PM Iain Sandoe wrote: >> Several older compilers fail to build modern GCC because of missing >> or incomplete C++11 support. >> >> (although the PR mentions clang, specifically, th

Re: [PATCH] Port GCC documentation to Sphinx

2021-07-05 Thread Richard Sandiford via Gcc-patches
Eli Zaretskii writes: >> Hans-Peter Nilsson writes: >> > I've read the discussion downthread, but I seem to miss (a recap >> > of) the benefits of moving to Sphinx. Maybe other have too and >> > it'd be a good idea to repeat them? Otherwise, the impression >> > is not so good, as all I see is b

Re: [PATCH] Port GCC documentation to Sphinx

2021-07-05 Thread Eli Zaretskii via Gcc-patches
> From: Richard Sandiford > Cc: Eli Zaretskii , g...@gcc.gnu.org, > gcc-patches@gcc.gnu.org, jos...@codesourcery.com > Date: Mon, 05 Jul 2021 10:17:38 +0100 > > Hans-Peter Nilsson writes: > > I've read the discussion downthread, but I seem to miss (a recap > > of) the benefits of moving to S

[COMMITTED] [PATCH] testsuite: gcc.dg/debug/btf/btf-bitfields-3.c requires -fno-short-enums PR debug/101321

2021-07-05 Thread Christophe LYON - foss via Gcc-patches
arm-eabi uses -fshort-enums by default while arm-linux-gnueabi* do not, like most (all?) other targets, but this test relies -fno-short-enums. Fix it by forcing -fno-short-enums. 2021-07-05 Christophe Lyon PR debug/101321 gcc/testsuite/ * gcc.dg/debug/btf/btf-bitfields-

[PATCH] Do not set both LOOP_C_INFINITE and LOOP_C_FINITE on vectorized loop

2021-07-05 Thread Richard Biener
The setting is likely a typo and was meant to affect the scalar version but even there LOOP_C_INFINITE is at most an optimization to the niter analysis. Clearly setting it on the vectorized loop which we just versioned to be _not_ infinite is bogus so the following change removes this. Bootstrapp

Re: [PATCH 5/5] Port most of the A CMP 0 ? A : -A to match

2021-07-05 Thread Richard Biener via Gcc-patches
On Sun, Jul 4, 2021 at 8:42 PM apinski--- via Gcc-patches wrote: > > From: Andrew Pinski > > To improve phiopt and be able to remove abs_replacement, this ports > most of "A CMP 0 ? A : -A" from fold_cond_expr_with_comparison to > match.pd. There is a few extra changes that are needed to remove

Re: [PATCH 3/5] Allow match-and-simplified phiopt to run in early phiopt

2021-07-05 Thread Richard Biener via Gcc-patches
On Sun, Jul 4, 2021 at 8:41 PM apinski--- via Gcc-patches wrote: > > From: Andrew Pinski > > To move a few things more to match-and-simplify from phiopt, > we need to allow match_simplify_replacement to run in early > phiopt. To do this we add a replacement for gimple_simplify > that is explictly

Re: [PATCH 1/5] Fix 101256: Wrong code due to range incorrect from PHI-OPT

2021-07-05 Thread Richard Biener via Gcc-patches
On Sun, Jul 4, 2021 at 8:40 PM apinski--- via Gcc-patches wrote: > > From: Andrew Pinski > > So the problem here is that replace_phi_edge_with_variable > will copy range information to a already (not newly) defined > ssa name. This causes wrong code later on. That's a bit too conservative I gue

Re: [PATCH 2/5] Fix PR 101237: Remove element_type call when used with the functions from real

2021-07-05 Thread Richard Biener via Gcc-patches
On Sun, Jul 4, 2021 at 8:39 PM apinski--- via Gcc-patches wrote: > > From: Andrew Pinski > > HONOR_SIGNED_ZEROS, HONOR_SIGN_DEPENDENT_ROUNDING, and HONOR_SNANS all > have an overload for taking a tree type now, so we should do that instead. > > OK? Bootstrapped and tested on x86_64-linux-gnu. O

Re: [PATCH 4/5] Try inverted comparison for match_simplify in phiopt

2021-07-05 Thread Richard Biener via Gcc-patches
On Sun, Jul 4, 2021 at 8:38 PM apinski--- via Gcc-patches wrote: > > From: Andrew Pinski > > Since match and simplify does not have all of the inverted > comparison patterns, it make sense to just have > phi-opt try to do the inversion and try match and simplify again. > > OK? Bootstrapped and te

Re: [RFA] Attach MEM_EXPR information when flushing BLKmode args to the stack

2021-07-05 Thread Richard Biener via Gcc-patches
On Fri, Jul 2, 2021 at 6:13 PM Jeff Law wrote: > > > This is a minor missed optimization we found with our internal port. > > Given this code: > > typedef struct {short a; short b;} T; > > extern void g1(); > > void f(T s) > { > if (s.a < 0) > g1(); > } > > > "s" is passe

Re: [PATCH 0/2] Initial support for AVX512FP16

2021-07-05 Thread Richard Biener via Gcc-patches
On Mon, Jul 5, 2021 at 3:21 AM Hongtao Liu via Gcc-patches wrote: > > On Fri, Jul 2, 2021 at 4:03 PM Uros Bizjak wrote: > > > > On Fri, Jul 2, 2021 at 8:25 AM Hongtao Liu wrote: > > > > > > > AVX512FP16 is disclosed, refer to [1]. > > > > > There're 100+ instructions for AVX512FP16, 67 gcc p

Re: [PATCH] Darwin, configury : Allow for specification and detection of dsymutil.

2021-07-05 Thread Richard Biener via Gcc-patches
On Sun, Jul 4, 2021 at 10:22 PM Iain Sandoe wrote: > > Hi, > > IMO this was an omission when the dsymutil program was added > (before my time). Essentially, we have been ‘getting away with it’ > on Darwin because of (a) restrictions in DWARF versions and (b) > that the installed tools handle a wi

[PATCH] middle-end/101291 - set loop copy of versioned loop

2021-07-05 Thread Richard Biener
This fixes the vectorizer loop versioning code failing to clear niter related info on the scalar loop as it assumed get_loop_copy would work even for the outermost loop. The patch makes that assumption hold by adjusting the loop versioning code. Bootstrapped and tested on x86_64-unknown-linux-gnu

Re: [PATCH] X86: Provide a CTOR for stringop_algs [PR100246].

2021-07-05 Thread Richard Biener via Gcc-patches
On Sun, Jul 4, 2021 at 10:04 PM Iain Sandoe wrote: > > Hi, > > Several older compilers fail to build modern GCC because of missing > or incomplete C++11 support. > > (although the PR mentions clang, specifically, this has also been reported > for some GCC versions within the range that should be

Re: [PATCH] combine: Check for paradoxical subreg

2021-07-05 Thread Robin Dapp via Gcc-patches
gcc/ChangeLog: * combine.c (try_combine): Check for paradoxical subreg. ping.

RE: [ARM] PR66791: Replace builtins for fp and unsigned vmul_n intrinsics

2021-07-05 Thread Kyrylo Tkachov via Gcc-patches
> -Original Message- > From: Prathamesh Kulkarni > Sent: 05 July 2021 10:18 > To: gcc Patches ; Kyrylo Tkachov > > Subject: [ARM] PR66791: Replace builtins for fp and unsigned vmul_n > intrinsics > > Hi Kyrill, > I assume this patch is OK to commit after bootstrap+testing ? Yes. Thank

[ARM] PR66791: Replace builtins for signed vmul_n intrinsics

2021-07-05 Thread Prathamesh Kulkarni via Gcc-patches
Hi, This patch replaces builtins with __a * __b for signed variants of vmul_n intrinsics. As discussed earlier, the patch has issue if __a * __b overflows, and whether we wish to leave that as UB. Thanks, Prathamesh diff --git a/gcc/config/arm/arm_neon.h b/gcc/config/arm/arm_neon.h index 41b596b5f

[ARM] PR66791: Replace builtins for fp and unsigned vmul_n intrinsics

2021-07-05 Thread Prathamesh Kulkarni via Gcc-patches
Hi Kyrill, I assume this patch is OK to commit after bootstrap+testing ? Thanks, Prathamesh diff --git a/gcc/config/arm/arm_neon.h b/gcc/config/arm/arm_neon.h index f42a15f7912..41b596b5fc6 100644 --- a/gcc/config/arm/arm_neon.h +++ b/gcc/config/arm/arm_neon.h @@ -8384,21 +8384,25 @@ __extension__

Re: [PATCH] Port GCC documentation to Sphinx

2021-07-05 Thread Richard Sandiford via Gcc-patches
Hans-Peter Nilsson writes: > I've read the discussion downthread, but I seem to miss (a recap > of) the benefits of moving to Sphinx. Maybe other have too and > it'd be a good idea to repeat them? Otherwise, the impression > is not so good, as all I see is bits here and there getting lost > in t