[PATCH v2] c++: Strengthen checks on 'main'

2024-05-16 Thread Nathaniel Shead
On Tue, May 14, 2024 at 06:25:29PM -0400, Jason Merrill wrote: > On 5/11/24 08:32, Nathaniel Shead wrote: > > I wasn't entirely sure what to do with the 'abi/main.C' testcase here; > > is this OK, or should I e.g. lower the linkage error to a pedwarn for > > the purposes of this test? > > I think

[PATCH v2] c++/modules: Remember that header units have CMIs

2024-05-16 Thread Nathaniel Shead
On Tue, May 14, 2024 at 06:21:48PM -0400, Jason Merrill wrote: > On 5/12/24 22:58, Nathaniel Shead wrote: > > Bootstrapped and regtested on x86_64-pc-linux-gnu, OK for trunk? > > OK. > I realised as I was looking over this again that I might have spoken too soon with the header unit example bein

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

2024-05-16 Thread Richard Biener
On Thu, May 16, 2024 at 11:19 PM Tamar Christina wrote: > > Hi, > > > -Original Message- > > From: Victor Do Nascimento > > Sent: Thursday, May 16, 2024 2:57 PM > > To: gcc-patches@gcc.gnu.org > > Cc: Richard Sandiford ; Richard Earnshaw > > ; Victor Do Nascimento > > > > Subject: [PATCH

Re: [PATCH] s390: Implement TARGET_NOCE_CONVERSION_PROFITABLE_P [PR109549]

2024-05-16 Thread Andreas Krebbel
On 5/8/24 10:06, Stefan Schulze Frielinghaus wrote: > Consider a NOCE conversion as profitable if there is at least one > conditional move. > > gcc/ChangeLog: > > * config/s390/s390.cc (TARGET_NOCE_CONVERSION_PROFITABLE_P): > Define. > (s390_noce_conversion_profitable_p): Implem

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

2024-05-16 Thread Richard Biener
On Thu, May 16, 2024 at 4:40 PM Victor Do Nascimento 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 optab for this is that backend

Re: [PATCH] make -freg-struct-return visibly a negative alias of -fpcc-struct-return

2024-05-16 Thread Alexandre Oliva
On Apr 30, 2024, Richard Biener wrote: > OK. Thanks, I'm back (from LibrePlanet), and I've just installed it in the trunk. >> for gcc/ChangeLog >> >> * common.opt (freg-struct-return): Make it explicitly >> fpcc-struct-return's NegativeAlias. Copy Optimization... >> (freg-struct-return): ...

RE: [PATCH v5 1/3] Internal-fn: Support new IFN SAT_ADD for unsigned scalar int

2024-05-16 Thread Li, Pan2
Hi Tamar, I am trying to add more shape(s) like below branch version for SAT_ADD. I suspect that widening_mul may not be the best place to take care of this shape. Because after_dom_children almost works on bb but we actually need to find the def/use cross the bb. Thus, is there any suggestion

Re: [PATCH] add rlwinm pattern for DImode for constant building

2024-05-16 Thread Jiufu Guo
Hi, Gentle ping ... BR, Jeff(Jiufu) Guo Jiufu Guo writes: > Hi, > > 'rlwinm' pattern is already well used for SImode. As this instruction > can touch the whole 64bit register, so some constants in 64bit(DImode) > can be built via 'lis/li+rlwinm'. To achieve this, a new pattern for > 'rlwin

Re: [PATCH-4, rs6000] Implement optab_isnormal for SFmode, DFmode and TFmode [PR97786]

2024-05-16 Thread HAO CHEN GUI
Hi Segher, Thanks for your review comments. I will modify it and resend. Just one question on the insn condition. 在 2024/5/17 1:25, Segher Boessenkool 写道: >> +(define_expand "isnormal2" >> + [(use (match_operand:SI 0 "gpc_reg_operand")) >> +(use (match_operand:SFDF 1 "gpc_reg_operand"))] >>

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

2024-05-16 Thread Hongtao Liu
> > > Sorry to chime in, for x86 backend, we defined usdot_prodv16hi, and > 2-way dot_prod operations can be generated > This is the link https://godbolt.org/z/hcWr64vx3, x86 define udot_prodv16qi/udot_prod8hi and both 2-way and 4-way dot_prod instructions are generated -- BR, Hongtao

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

2024-05-16 Thread Hongtao Liu
On Thu, May 16, 2024 at 10:40 PM Victor Do Nascimento 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 optab for this is that backen

[PATCH] Use pblendw instead of pand to clear upper 16 bits.

2024-05-16 Thread liuhongt
For vec_pack_truncv8si/v4si w/o AVX512, (const_vector:v4si (const_int 0x) x4) is used as mask to clear upper 16 bits, but vpblendw with zero_vector can also be used, and zero vector is cheaper than (const_vector:v4si (const_int 0x) x4). Bootstrapped and regtested on x86_64-pc-linux-gnu{-m3

[PATCH] RISC-V: Fix testcases renamed test flag options

2024-05-16 Thread juzhe.zh...@rivai.ai
LGTM. juzhe.zh...@rivai.ai

[PATCH] RISC-V: Fix testcases renamed test flag options

2024-05-16 Thread Edwin Lu
Some testcases still had --param=riscv-autovec-preference=_, update to use -mrvv-vector-bits=_. Also add missing period in riscv.opt which caused a compiler driver error. gcc/ChangeLog: * config/riscv/riscv.opt: Add missing period gcc/testsuite/ChangeLog: * gcc.target/riscv/rvv/

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

2024-05-16 Thread Tamar Christina
Hi, > -Original Message- > From: Victor Do Nascimento > Sent: Thursday, May 16, 2024 2:57 PM > To: gcc-patches@gcc.gnu.org > Cc: Richard Sandiford ; Richard Earnshaw > ; Victor Do Nascimento > > Subject: [PATCH] middle-end: Drop __builtin_pretech calls in autovectorization > [PR114061]'

[r15-580 Regression] FAIL: experimental/functional/searchers.cc -std=gnu++17 execution test on Linux/x86_64

2024-05-16 Thread haochen.jiang
On Linux/x86_64, f3e5f4c58591f5dacdd14a65ec47bbe310df02a0 is the first bad commit commit f3e5f4c58591f5dacdd14a65ec47bbe310df02a0 Author: Richard Biener Date: Mon Mar 11 11:17:32 2024 +0100 tree-optimization/13962 - handle ptr-ptr compares in ptrs_compare_unequal caused FAIL: experimenta

Re: [Patch, fortran] PR114874 - [14/15 Regression] ICE with select type, type is (character(*)), and substring

2024-05-16 Thread Harald Anlauf
Hi Paul! Am 15.05.24 um 19:07 schrieb Paul Richard Thomas: Hi All, I have been around several circuits with a patch for this regression. I posted one in Bugzilla but rejected it because it was not direct enough. This one, however, is more to my liking and fixes another bug lurking in the shadow

New Swedish PO file for 'gcc' (version 14.1.0)

2024-05-16 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-14.1.0.sv.po', has ju

Re: [PATCH] AArch64: Use LDP/STP for large struct types

2024-05-16 Thread Richard Sandiford
Richard Sandiford writes: > Wilco Dijkstra writes: >> Use LDP/STP for large struct types as they have useful immediate offsets and >> are typically faster. >> This removes differences between little and big endian and allows use of >> LDP/STP without UNSPEC. >> >> Passes regress and bootstrap,

Re: [PATCH] c++: paren aggr CTAD with base classes [PR115114]

2024-05-16 Thread Jason Merrill
On 5/16/24 11:32, Patrick Palka wrote: Bootstrapped and regtested on x86_64-pc-linux-gnu, does this look OK for trunk and perhaps 14? OK for both. -- >8 -- We're accidentally ignoring base classes during parenthesized aggregate CTAD because the TYPE_FIELDS of a template type doesn't contain

Re: [PATCH] AArch64: Use LDP/STP for large struct types

2024-05-16 Thread Richard Sandiford
Wilco Dijkstra writes: > Use LDP/STP for large struct types as they have useful immediate offsets and > are typically faster. > This removes differences between little and big endian and allows use of > LDP/STP without UNSPEC. > > Passes regress and bootstrap, OK for commit? > > gcc: > *

Re: [PATCH 1/5] RISC-V: Remove float vector eqne pattern

2024-05-16 Thread Robin Dapp
> Can eqne pattern removal patches be committed firstly? Please first make sure you test with corner cases, NaNs in particular. I'm pretty sure we don't have any test cases for those. Regards Robin

Re: [PATCH gcc-13] Fix RISC-V missing stack tie

2024-05-16 Thread Jeff Law
On 5/16/24 12:24 PM, Palmer Dabbelt wrote: gcc/ * config/riscv/riscv.cc (riscv_expand_prologue): Add missing stack tie for scalable and final stack adjustment if needed. Co-authored-by: Raphael Zinsly (cherry picked from commit c65046ff2ef0a9a46e59bc0b3369b2d226f6a

[PATCH] libstdc++: detect DLLs on windows with

2024-05-16 Thread Björn Schäpers
From: Björn Schäpers libstdc++-v3/Changelog * acinclude.m4 (GLIBCXX_ENABLE_BACKTACE): Add check for tlhelp32.h, matching libbacktrace. * configure: Regenerate. * config.h.in: Regenerate. Signed-off-by: Björn Schäpers --- libstdc++-v3/acinclude.m4 | 4 l

Re: [PATCH] Fix overwriting files with fs::copy_file on windows

2024-05-16 Thread One of your IPs tried to hack me
Am 25.04.2024 um 22:16 schrieb Björn Schäpers: Am 24.03.2024 um 22:34 schrieb Björn Schäpers: From: Björn Schäpers This fixes i.e. https://github.com/msys2/MSYS2-packages/issues/1937 I don't know if I picked the right way to do it. When acceptable I think the declaration should be moved into

[PATCH gcc-13] Fix RISC-V missing stack tie

2024-05-16 Thread Palmer Dabbelt
From: Jeff Law As some of you know, Raphael has been working on stack-clash support for the RISC-V port. A little while ago Florian reached out to us with an issue where glibc was failing its smoke test due to referencing an unallocated stack slot. Without diving into the code in detail I (inco

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

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

2024-05-16 Thread Tamar Christina
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: [PATCH] middle-end: Expand {u|s}dot product support in autovectorizer > > Fr

Re: [PATCH-4, rs6000] Implement optab_isnormal for SFmode, DFmode and TFmode [PR97786]

2024-05-16 Thread Segher Boessenkool
Hi! On Fri, Apr 12, 2024 at 04:24:23PM +0800, HAO CHEN GUI wrote: > This patch implemented optab_isnormal for SF/DF/TFmode by rs6000 test > data class instructions. > > This patch relies on former patch which adds optab_isnormal. > https://gcc.gnu.org/pipermail/gcc-patches/2024-April/649366.h

Re: [Patch, aarch64] v6: Preparatory patch to place target independent and,dependent changed code in one file

2024-05-16 Thread Alex Coplan
Hi Ajit, Thanks a lot for working through the review feedback. The patch LGTM with the two minor suggested changes below. I can't approve the patch, though, so you'll need an OK from Richard S. Also, I'm not sure if it makes sense to apply the patch in isolation, it might make more sense to onl

[PATCH] attribs: Fix and refactor diag_attr_exclusions

2024-05-16 Thread Andrew Carlotti
The existing implementation of this function was convoluted, and had multiple control flow errors that became apparent to me while reading the code: 1. The initial early return only checked the properties of the first exclusion in the list, when these properties could be different for subsequent e

[PATCH] c++: paren aggr CTAD with base classes [PR115114]

2024-05-16 Thread Patrick Palka
Bootstrapped and regtested on x86_64-pc-linux-gnu, does this look OK for trunk and perhaps 14? -- >8 -- We're accidentally ignoring base classes during parenthesized aggregate CTAD because the TYPE_FIELDS of a template type doesn't contain bases, so we need to consider them separately. P

Re: [PATCH] report message for operator %a on unaddressible exp

2024-05-16 Thread Segher Boessenkool
Hi! On Thu, May 16, 2024 at 02:56:49PM +0800, Jiufu Guo wrote: > Jiufu Guo writes: > > Segher Boessenkool writes: > >> On Tue, May 14, 2024 at 05:53:56PM +0800, Jiufu Guo wrote: > >>> Thanks so much for your great review! > >>> Reference other messages, I'm wondering "invalid %%a value" may be >

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 opt

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

2024-05-16 Thread Victor Do Nascimento
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 optab for this is that backend-pattern selection is only ever able to match against one datatype - Eit

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

2024-05-16 Thread Victor Do Nascimento
On 5/16/24 15:16, Andrew Pinski wrote: On Thu, May 16, 2024, 3:58 PM Victor Do Nascimento mailto: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 bel

Re: Re: [PATCH] RISC-V: Do not allow v0 as dest when merging [PR115068].

2024-05-16 Thread 钟居哲
LGTM this patch (fix for vfwadd.wf). And here is a simpel case to reproduce same bug for vwadd.wx: https://compiler-explorer.com/z/4rP9Yvdq1 #include #include vint64m8_t test_vwadd_wx_i64m8_m(vbool8_t vm, vint64m8_t vs2, int rs1, size_t vl) { return __riscv_vwadd_wx_i64m8_m(vm, vs2, rs1, v

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 b

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

2024-05-16 Thread Victor Do Nascimento
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 b, int n){ int i; for(i=0; i *references) clobbers_memory = true; break;

[PATCH] libatomic: Add rcpc3 128-bit atomic operations for AArch64

2024-05-16 Thread Victor Do Nascimento
The introduction of the optional RCPC3 architectural extension for Armv8.2-A upwards provides additional support for the release consistency model, introducing the Load-Acquire RCpc Pair Ordered, and Store-Release Pair Ordered operations in the form of LDIAPP and STILP. These operations are single

RE: [PATCH v2 3/3] RISC-V: Enable vectorizable early exit testsuite

2024-05-16 Thread Li, Pan2
Committed, thanks Juzhe. Pan From: juzhe.zh...@rivai.ai Sent: Thursday, May 16, 2024 8:19 PM To: Li, Pan2 ; gcc-patches Cc: kito.cheng ; tamar.christina ; Richard Biener ; richard.sandiford ; Li, Pan2 Subject: Re: [PATCH v2 3/3] RISC-V: Enable vectorizable early exit testsuite RISC-V part L

RE: [PATCH v2 2/3] RISC-V: Implement vectorizable early exit with vcond_mask_len

2024-05-16 Thread Li, Pan2
Committed, thanks Juzhe. Pan From: juzhe.zh...@rivai.ai Sent: Thursday, May 16, 2024 8:19 PM To: Li, Pan2 ; gcc-patches Cc: kito.cheng ; tamar.christina ; Richard Biener ; richard.sandiford ; Li, Pan2 Subject: Re: [PATCH v2 2/3] RISC-V: Implement vectorizable early exit with vcond_mask_len

[PATCH 1/4] Libatomic: Define per-file identifier macros

2024-05-16 Thread Victor Do Nascimento
In order to facilitate the fine-tuning of how `libatomic_i.h' and `host-config.h' headers are used by different atomic functions, we define distinct identifier macros for each file which, in implementing atomic operations, imports these headers. The idea is that different parts of these headers co

[PATCH 4/4] Libatomic: Clean up AArch64 `atomic_16.S' implementation file

2024-05-16 Thread Victor Do Nascimento
At present, `atomic_16.S' groups different implementations of the same functions together in the file. Therefore, as an example, the LSE128 implementation of `exchange_16' follows on immediately from its core implementation, as does the `fetch_or_16' LSE128 implementation. Such architectural exte

[PATCH 2/4] Libatomic: Make ifunc selector behavior contingent on importing file

2024-05-16 Thread Victor Do Nascimento
By querying previously-defined file-identifier macros, `host-config.h' is able to get information about its environment and, based on this information, select more appropriate function-specific ifunc selectors. This reduces the number of unnecessary feature tests that need to be carried out in ord

[PATCH 3/4] Libatomic: Clean up AArch64 ifunc aliasing

2024-05-16 Thread Victor Do Nascimento
Following improvements to the way ifuncs are selected based on detected architectural features, we are able to do away with many of the aliases that were previously needed for subsets of atomic functions that were not implemented in a given extension. This may be clarified by virtue of an example.

[PATCH 0/4] Libatomic: Cleanup ifunc selector and aliasing

2024-05-16 Thread Victor Do Nascimento
The recent introduction of the optional LSE128 and RCPC3 architectural extensions to AArch64 has further led to the increased flexibility of atomic support in the architecture, with many extensions providing support for distinct atomic operations, each with different potential applications in mind.

Re: [PATCH] tree-optimization/13962 - handle ptr-ptr compares in ptrs_compare_unequal

2024-05-16 Thread Richard Biener
On Thu, 16 May 2024, Jeff Law wrote: > > > On 5/16/24 6:03 AM, Richard Biener wrote: > > Now that we handle pt.null conservatively we can implement the missing > > tracking of constant pool entries (aka STRING_CST) and handle > > ptr-ptr compares using points-to info in ptrs_compare_unequal. > >

Fix points_to_local_or_readonly_memory_p wrt TARGET_MEM_REF

2024-05-16 Thread Jan Hubicka
Hi, TARGET_MEM_REF can be used to offset constant base into a memory object (to produce lea instruction). This confuses points_to_local_or_readonly_memory_p which treats the constant address as a base of the access. Bootstrapped/regtsted x86_64-linux, comitted. Honza gcc/ChangeLog: PR i

Re: [PATCH v5 1/3] Internal-fn: Support new IFN SAT_ADD for unsigned scalar int

2024-05-16 Thread Jeff Law
On 5/16/24 5:58 AM, Richard Biener wrote: On Thu, May 16, 2024 at 11:35 AM Li, Pan2 wrote: OK. Thanks Richard for help and coaching. To double confirm, are you OK with this patch only or for the series patch(es) of SAT middle-end? Thanks again for reviewing and suggestions. For the se

Re: [PATCH] tree-optimization/13962 - handle ptr-ptr compares in ptrs_compare_unequal

2024-05-16 Thread Jeff Law
On 5/16/24 6:03 AM, Richard Biener wrote: Now that we handle pt.null conservatively we can implement the missing tracking of constant pool entries (aka STRING_CST) and handle ptr-ptr compares using points-to info in ptrs_compare_unequal. Bootstrapped on x86_64-unknown-linux-gnu, (re-)testing

C++ Patch ping - Re: [PATCH] c++: Fix parsing of abstract-declarator starting with ... followed by [ or ( [PR115012]

2024-05-16 Thread Jakub Jelinek
Hi! I'd like to ping the https://gcc.gnu.org/pipermail/gcc-patches/2024-May/651199.html patch. Thanks. On Thu, May 09, 2024 at 08:12:30PM +0200, Jakub Jelinek wrote: > The C++26 P2662R3 Pack indexing paper mentions that both GCC > and MSVC don't handle T...[10] parameter declaration when T > is

Re: [PATCH] c++: represent all class non-dep assignments as CALL_EXPR

2024-05-16 Thread Jason Merrill
On 5/15/24 13:55, Patrick Palka wrote: Bootstrapped and regtested on x86_64-pc-linu-xgnu, does this look OK for trunk? OK. -- >8 -- Non-dependent compound assignment expressions are currently represented as CALL_EXPR to the selected operator@= overload. Non-dependent simple assignments on t

Re: [PATCH, OpenACC 2.7] Connect readonly modifier to points-to analysis

2024-05-16 Thread Richard Biener
On Wed, 3 Apr 2024, Chung-Lin Tang wrote: > Hi Richard, Thomas, > > On 2023/10/30 8:46 PM, Richard Biener wrote: > >> > >> What Chung-Lin's first patch does is mark the OMP clause for 'x' (not the > >> 'x' decl itself!) as 'readonly', via a new 'OMP_CLAUSE_MAP_READONLY' > >> flag. > >> > >> The a

RE: [PATCH v2 1/3] Vect: Support loop len in vectorizable early exit

2024-05-16 Thread Li, Pan2
Committed, thanks Richard. Pan -Original Message- From: Richard Biener Sent: Thursday, May 16, 2024 8:13 PM To: Tamar Christina Cc: Li, Pan2 ; gcc-patches@gcc.gnu.org; juzhe.zh...@rivai.ai; kito.ch...@gmail.com; Richard Sandiford Subject: Re: [PATCH v2 1/3] Vect: Support loop len in

Re: [PATCH v2 3/3] RISC-V: Enable vectorizable early exit testsuite

2024-05-16 Thread juzhe.zh...@rivai.ai
RISC-V part LGTM. juzhe.zh...@rivai.ai From: pan2.li Date: 2024-05-16 12:05 To: gcc-patches CC: juzhe.zhong; kito.cheng; tamar.christina; richard.guenther; Richard.Sandiford; Pan Li Subject: [PATCH v2 3/3] RISC-V: Enable vectorizable early exit testsuite From: Pan Li After we supported vec

Re: [PATCH v2 2/3] RISC-V: Implement vectorizable early exit with vcond_mask_len

2024-05-16 Thread juzhe.zh...@rivai.ai
RISC-V part LGTM. juzhe.zh...@rivai.ai From: pan2.li Date: 2024-05-16 12:05 To: gcc-patches CC: juzhe.zhong; kito.cheng; tamar.christina; richard.guenther; Richard.Sandiford; Pan Li Subject: [PATCH v2 2/3] RISC-V: Implement vectorizable early exit with vcond_mask_len From: Pan Li After we

Re: [PATCH] Optab: add isfinite_optab for __builtin_isfinite

2024-05-16 Thread Richard Biener
On Fri, Apr 12, 2024 at 5:07 AM 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 im

Re: [PATCH] Optab: add isnormal_optab for __builtin_isnormal

2024-05-16 Thread Richard Biener
On Fri, Apr 12, 2024 at 10: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 i

Re: [PATCH v2 1/3] Vect: Support loop len in vectorizable early exit

2024-05-16 Thread Richard Biener
On Thu, May 16, 2024 at 8:50 AM Tamar Christina wrote: > > > -Original Message- > > From: pan2...@intel.com > > Sent: Thursday, May 16, 2024 5:06 AM > > To: gcc-patches@gcc.gnu.org > > Cc: juzhe.zh...@rivai.ai; kito.ch...@gmail.com; Tamar Christina > > ; richard.guent...@gmail.com; Richar

[PATCH] tree-optimization/13962 - handle ptr-ptr compares in ptrs_compare_unequal

2024-05-16 Thread Richard Biener
Now that we handle pt.null conservatively we can implement the missing tracking of constant pool entries (aka STRING_CST) and handle ptr-ptr compares using points-to info in ptrs_compare_unequal. Bootstrapped on x86_64-unknown-linux-gnu, (re-)testing in progress. Richard. PR tree-optimiz

RE: [PATCH v5 1/3] Internal-fn: Support new IFN SAT_ADD for unsigned scalar int

2024-05-16 Thread Li, Pan2
> For the series, the riscv specific part of course needs riscv approval. Thanks a lot, have a nice day! Pan -Original Message- From: Richard Biener Sent: Thursday, May 16, 2024 7:59 PM To: Li, Pan2 Cc: Tamar Christina ; gcc-patches@gcc.gnu.org; juzhe.zh...@rivai.ai; kito.ch...@gmail

Re: [PATCH v5 1/3] Internal-fn: Support new IFN SAT_ADD for unsigned scalar int

2024-05-16 Thread Richard Biener
On Thu, May 16, 2024 at 11:35 AM Li, Pan2 wrote: > > > OK. > > Thanks Richard for help and coaching. To double confirm, are you OK with this > patch only or for the series patch(es) of SAT middle-end? > Thanks again for reviewing and suggestions. For the series, the riscv specific part of course

[PATCH] wrong code with points-to and volatile

2024-05-16 Thread Richard Biener
The following fixes points-to analysis which ignores the fact that volatile qualified refs can result in any pointer. Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed. Btw, I noticed this working on ptr-vs-ptr compare simplification using points-to info and running into gcc.c-torture/e

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: > > > > > > > > If we consider code like: > > > > > > > > i

Re: [PATCH v3] driver: Output to a temp file; rename upon success [PR80182]

2024-05-16 Thread Peter0x44
On 2024-05-16 01:29, Richard Biener wrote: On Sun, May 12, 2024 at 3:40 PM Peter Damianov wrote: Currently, commands like: gcc -o file.c -lm will delete the user's code. This patch makes the linker write executables to a temp file, and then renames the temp file if successful. This fixes the

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

2024-05-16 Thread Oleg Endo
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: > > > > > > If we consider code like: > > > > > > if (bar1 == x) > > > return foo(); > > > if (bar2 !

[wwwdocs] Document reimplementation of GNU threads library on Windows

2024-05-16 Thread Eric Botcazou
... which happened in GCC 13. Validated with W3C's Validator and applied. -- Eric Botcazoudiff --git a/htdocs/gcc-13/changes.html b/htdocs/gcc-13/changes.html index e324b782..3ab4a101 100644 --- a/htdocs/gcc-13/changes.html +++ b/htdocs/gcc-13/changes.html @@ -770,8 +770,17 @@ You may also want

Re: [COMMITTED] Revert "Revert: "Enable prange support.""

2024-05-16 Thread Jakub Jelinek
On Thu, May 16, 2024 at 12:14:09PM +0200, Aldy Hernandez wrote: > Wait, what's the preferred way of reverting a patch? I followed what I saw > in: Reverting a patch (that isn't a reversion) just push git revert. The important part is not to modify the This reverts commit line from what git rever

Re: [COMMITTED] Revert "Revert: "Enable prange support.""

2024-05-16 Thread Xi Ruoyao
On Thu, 2024-05-16 at 12:14 +0200, Aldy Hernandez wrote: > Wait, what's the preferred way of reverting a patch?  I followed what > I saw in: > > commit 04ee1f788ceaa4c7f777ff3b9441ae076191439c > Author: Jeff Law > Date:   Mon May 13 21:42:38 2024 -0600 > >     Revert "[PATCH v2 1/3] RISC-V: movm

Re: [COMMITTED] Revert "Revert: "Enable prange support.""

2024-05-16 Thread Aldy Hernandez
Wait, what's the preferred way of reverting a patch? I followed what I saw in: commit 04ee1f788ceaa4c7f777ff3b9441ae076191439c Author: Jeff Law Date: Mon May 13 21:42:38 2024 -0600 Revert "[PATCH v2 1/3] RISC-V: movmem for RISCV with V extension" This reverts commit df15eb15b5f820321

Re: [COMMITTED] Revert "Revert: "Enable prange support.""

2024-05-16 Thread Jakub Jelinek
On Thu, May 16, 2024 at 12:01:01PM +0200, Aldy Hernandez wrote: > This reverts commit d7bb8eaade3cd3aa70715c8567b4d7b08098e699 and enables > prange > support again. Please don't do this. This breaks ChangeLog generation, will need to handle it tomorrow by hand again. Both the ammendments to the g

[COMMITTED] Revert "Revert: "Enable prange support.""

2024-05-16 Thread Aldy Hernandez
This reverts commit d7bb8eaade3cd3aa70715c8567b4d7b08098e699 and enables prange support again. --- gcc/gimple-range-cache.cc | 4 ++-- gcc/gimple-range-fold.cc | 4 ++-- gcc/gimple-range-fold.h | 2 +- gcc/gimple-range-infer.cc | 2 +- gcc/gimple-range-op.cc| 2 +-

[COMMITTED] Use a boolean type when folding conditionals in simplify_using_ranges.

2024-05-16 Thread Aldy Hernandez
In adding some traps for PR114985 I noticed that the conditional folding code in simplify_using_ranges was using the wrong type. This cleans up the oversight. gcc/ChangeLog: PR tree-optimization/114985 * vr-values.cc (simplify_using_ranges::fold_cond_with_ops): Use boolea

[COMMITTED] Cleanup prange sanity checks.

2024-05-16 Thread Aldy Hernandez
The pointers_handled_p() code was a temporary sanity check, and not even a good one, since we have a cleaner way of checking type mismatches with operand_check_p. This patch removes all the code, and adds an explicit type check for relational operators, which are the main problem in PR114985. Add

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

2024-05-16 Thread Kewen.Lin
Hi, on 2024/5/16 12:08, Andrew Pinski wrote: > > 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

RE: [PATCH v5 1/3] Internal-fn: Support new IFN SAT_ADD for unsigned scalar int

2024-05-16 Thread Li, Pan2
> OK. Thanks Richard for help and coaching. To double confirm, are you OK with this patch only or for the series patch(es) of SAT middle-end? Thanks again for reviewing and suggestions. Pan -Original Message- From: Richard Biener Sent: Thursday, May 16, 2024 4:10 PM To: Li, Pan2 Cc:

[COMMITTED 35/35] ada: Remove obsolete reference in comment

2024-05-16 Thread Marc Poulhiès
From: Eric Botcazou gcc/ada/ * exp_ch7.adb (Attach_Object_To_Master_Node): Remove reference to a transient object in comment. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/exp_ch7.adb | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a

[COMMITTED 34/35] ada: Reset scope of top level object declaration during unnesting

2024-05-16 Thread Marc Poulhiès
When unnesting, the compiler gathers elaboration code and wraps it with a new dedicated procedure. While doing so, it resets the scopes of entities that are wrapped to point to this new procedure. This change also resets the scopes of N_Object_Declaration and N_Object_Renaming_Declaration nodes onl

[COMMITTED 33/35] ada: Redundant validity checks

2024-05-16 Thread Marc Poulhiès
From: Steve Baird In some cases with validity checking enabled via the -gnatVa option, the compiler generates validity checks that can (obviously) never fail. These include validity checks for (some) static expressions, and consecutive identical checks generated for a single read of an object. g

[COMMITTED 32/35] ada: Exception on Indefinite_Vector aggregate with loop_parameter_specification

2024-05-16 Thread Marc Poulhiès
From: Gary Dismukes Constraint_Error is raised on evaluation of a container aggregate with a loop_parameter_specification for the type Indefinite_Vector. This happens due to the Aggregate aspect for type Indefinite_Vector specifying the Empty_Vector constant for the type's Empty operation rather

[COMMITTED 29/35] ada: Fix missing length checks with case expressions

2024-05-16 Thread Marc Poulhiès
From: Ronan Desplanques This fixes an issue where length checks were not generated when the right-hand side of an assigment involved a case expression. gcc/ada/ * sem_res.adb (Resolve_Case_Expression): Add length check insertion. * exp_ch4.adb (Expand_N_Case_Expression):

[COMMITTED 30/35] ada: Fix reference to RM clause in comment

2024-05-16 Thread Marc Poulhiès
From: Ronan Desplanques gcc/ada/ * sem_util.ads (Check_Function_Writable_Actuals): Fix comment. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/sem_util.ads | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/ada/sem_util.ads b/gcc/ada/sem_util.ads

[COMMITTED 22/35] ada: No need to follow New_Occurrence_Of with Set_Etype

2024-05-16 Thread Marc Poulhiès
From: Piotr Trojanek Routine New_Occurrence_Of itself sets the Etype of its result; there is no need to set it explicitly afterwards. Code cleanup related to fix for attribute 'Old; semantics is unaffected. gcc/ada/ * exp_ch13.adb (Expand_N_Free_Statement): After analysis, the

[COMMITTED 28/35] ada: Fix standalone Windows builds of adaint.c

2024-05-16 Thread Marc Poulhiès
From: Sebastian Poeplau Define PATH_SEPARATOR and HOST_EXECUTABLE_SUFFIX in standalone MinGW builds; the definitions normally come from GCC, and the defaults don't work for native Windows. gcc/ada/ * adaint.c: New defines for STANDALONE mode. Tested on x86_64-pc-linux-gnu, committed on

[COMMITTED 24/35] ada: Propagate Program_Error from failed finalization of collection

2024-05-16 Thread Marc Poulhiès
From: Eric Botcazou This aligns finalization collections with finalization masters when it comes to propagating an exception raised by the finalization of a specific object, by always propagating Program_Error instead of the aforementioned exception. gcc/ada/ * libgnat/s-finpri.adb (Rai

[COMMITTED 18/35] ada: Fixup one more pattern of broken scope information

2024-05-16 Thread Marc Poulhiès
When an array's initialization contains a `others =>` clause with an expression that involves finalization, the resulting scope information is incorrect and can cause crashes with backend (i.e. gnat-llvm) that also use unnesting. The observable symptom is a nested object declaration (created by the

[COMMITTED 27/35] ada: Avoid checking parameters of protected procedures

2024-05-16 Thread Marc Poulhiès
From: Viljar Indus The compiler triggers warnings on generated protected procedures if the procedure does not have an explicit spec. Instead check if the body was created for a protected procedure if the spec is not present. gcc/ada/ * sem_ch6.adb (Analyze_Subprogram_Body_Helper):

[COMMITTED 26/35] ada: Ignore ghost nodes in call graph information for dispatching calls

2024-05-16 Thread Marc Poulhiès
From: Piotr Trojanek When emitting call graph information, we already skipped calls to ignored ghost entities, but this code was causing crashes (in production builds) and assertion failures (in development builds), because the ignored ghost entities are not fully decorated, e.g. when they come f

[COMMITTED 19/35] ada: Minor performance improvement for dynamically-allocated controlled objects

2024-05-16 Thread Marc Poulhiès
From: Eric Botcazou The values returned by Header_Alignment and Header_Size are known at compile time and powers of two on almost all platforms, so inlining them by means of an expression function improves the object code generated for alignment and size calculations involving them. gcc/ada/

[COMMITTED 25/35] ada: Fix reason code for length check

2024-05-16 Thread Marc Poulhiès
From: Ronan Desplanques This patch fixes the reason code used by Apply_Selected_Length_Checks, which was wrong in some cases when the check could be determined to always fail at compile time. gcc/ada/ * checks.adb (Apply_Selected_Length_Checks): Fix reason code. Tested on x86_64-pc-lin

[COMMITTED 11/35] ada: Follow up fixes for Put_Image/streaming regressions

2024-05-16 Thread Marc Poulhiès
From: Steve Baird A recent change to reduce duplication of compiler-generated Put_Image and streaming subprograms introduced some regressions. The fix for one of them was incomplete. gcc/ada/ * exp_attr.adb (Build_And_Insert_Type_Attr_Subp): Further tweaking of the point where a

[COMMITTED 14/35] ada: Fix bogus error on function returning noncontrolling result in private part

2024-05-16 Thread Marc Poulhiès
From: Eric Botcazou This occurs in the additional case of RM 3.9.3(10) in Ada 2012, that is to say the access controlling result, because the implementation does not use the same (correct) conditions as in the original case. This factors out these conditions and uses them in both cases, as well

[COMMITTED 16/35] ada: Fix latent alignment issue for dynamically-allocated controlled objects

2024-05-16 Thread Marc Poulhiès
From: Eric Botcazou Dynamically-allocated controlled objects are attached to a finalization collection by means of a hidden header placed right before the object, which means that the size effectively allocated must naturally account for the size of this header. But the allocation must also acco

[COMMITTED 21/35] ada: Fix detection of if_expressions that are known on entry

2024-05-16 Thread Marc Poulhiès
From: Piotr Trojanek Fix a small glitch in routine Is_Known_On_Entry, which returned False for all if_expressions, regardless whether their conditions or dependent expressions are known on entry. gcc/ada/ * sem_util.adb (Is_Known_On_Entry): Check whether condition and dependent

[COMMITTED 07/35] ada: Remove Aspect_Specifications field from N_Procedure_Specification

2024-05-16 Thread Marc Poulhiès
From: Piotr Trojanek Sync Has_Aspect_Specifications_Flag with the actual flags in the AST. Code cleanup; behavior is unaffected. gcc/ada/ * gen_il-gen-gen_nodes.adb (N_Procedure_Specification): Remove Aspect_Specifications field. Tested on x86_64-pc-linux-gnu, committed on mast

[COMMITTED 12/35] ada: Fix crash with -gnatdJ and -gnatw_q

2024-05-16 Thread Marc Poulhiès
From: Ronan Desplanques This commit makes the emission of -gnatw_q warnings pass node information so as to handle the enclosing subprogram display of -gnatdJ instead of crashing. gcc/ada/ * exp_ch4.adb (Expand_Composite_Equality): Call Error_Msg_N instead of Error_Msg. Tested o

[COMMITTED 20/35] ada: Fix comments about Get_Ranged_Checks

2024-05-16 Thread Marc Poulhiès
From: Ronan Desplanques Checks.Get_Ranged_Checks was onced named Range_Check, and a few comments referred to it by that name before this commit. To avoid confusion with Types.Range_Check, this commits fixes those comments. gcc/ada/ * checks.ads: Fix comments. * checks.adb: Likew

[COMMITTED 23/35] ada: Improve recovery from illegal occurrence of 'Old in if_expression

2024-05-16 Thread Marc Poulhiès
From: Piotr Trojanek Fix assertion failure in developer builds which happened when the THEN expression contains an illegal occurrence of 'Old and the type of the THEN expression is left as Any_Type, but there is no ELSE expression. gcc/ada/ * sem_ch4.adb (Analyze_If_Expression): Add gua

[COMMITTED 15/35] ada: Fix resolving tagged operations in array aggregates

2024-05-16 Thread Marc Poulhiès
From: Viljar Indus In the Two_Pass_Aggregate_Expansion we were removing all of the entity links in the Iterator_Specification to avoid reusing the same Iterator_Definition in both loops. However this approach was also breaking the links to calls with dot notation that had been transformed to the

  1   2   >