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

2024-05-17 Thread Li, Pan2
Thanks Tamer for enlightening, will have a try for the ingenious idea! Pan -Original Message- From: Tamar Christina Sent: Friday, May 17, 2024 10:46 PM To: Li, Pan2 ; gcc-patches@gcc.gnu.org Cc: juzhe.zh...@rivai.ai; kito.ch...@gmail.com; richard.guent...@gmail.com; Liu, Hongtao

Re: [PATCH] tree-optimization/114589 - remove profile based sink heuristics

2024-05-17 Thread Hans-Peter Nilsson
> Date: Wed, 15 May 2024 11:38:58 +0200 (CEST) > From: Richard Biener > The following removes the profile based heuristic limiting sinking > and instead uses post-dominators to avoid sinking to places that > are executed under the same conditions as the earlier location which > the profile based

[COMMITTED] RISC-V: Fix "Nan-box the result of movbf on soft-bf16"

2024-05-17 Thread Xiao Zeng
2024-05-18 09:57  Jeff Law wrote: > > > >On 5/15/24 7:55 PM, Xiao Zeng wrote: >> 1 According to unpriv-isa spec: >> >>    1.1 "FMV.H.X moves the half-precision value encoded

Re: Re: [PATCH] RISC-V: Modify _Bfloat16 to __bf16

2024-05-17 Thread Xiao Zeng
2024-05-18 08:36  Jeff Law wrote: > > > >On 5/17/24 2:19 AM, Kito Cheng wrote: >> LGTM, thanks for fixing this :) >And just to be clear for Xiao, you can go ahead and commit this patch to >the trunk. > An ACK from Kito, Juzhe, Palmer, Robin or myself good. >is all you need for a change that is

[COMMITTED] RISC-V: Modify _Bfloat16 to __bf16

2024-05-17 Thread Xiao Zeng
2024-05-17 16:19  Kito Cheng wrote: > >LGTM, thanks for fixing this :) 1 Passed CI testing: 2 pushed to trunk. > >On Fri, May 17, 2024 at 4:05 PM Xiao Zeng wrote: >> >> According to the

RE: [PATCH v6] RISC-V: Implement IFN SAT_ADD for both the scalar and vector

2024-05-17 Thread Li, Pan2
Committed with more comments, thanks Robin. Pan -Original Message- From: Robin Dapp Sent: Saturday, May 18, 2024 3:32 AM To: Li, Pan2 ; gcc-patches@gcc.gnu.org Cc: rdapp@gmail.com; juzhe.zh...@rivai.ai; kito.ch...@gmail.com Subject: Re: [PATCH v6] RISC-V: Implement IFN SAT_ADD for

Re: [PATCH] RISC-V: Fix "Nan-box the result of movbf on soft-bf16"

2024-05-17 Thread Jeff Law
On 5/15/24 7:55 PM, Xiao Zeng wrote: 1 According to unpriv-isa spec: 1.1 "FMV.H.X moves the half-precision value encoded in IEEE 754-2008 standard encoding from the

Re: [PATCH v1] libstdc++: Optimize removal from unique assoc containers [PR112934]

2024-05-17 Thread Barnabás Pőcze
Hi 2024. március 13., szerda 12:43 keltezéssel, Jonathan Wakely írta: > On Mon, 11 Mar 2024 at 23:36, Barnabás Pőcze wrote: > > > > Previously, calling erase(key) on both std::map and std::set > > would execute that same code that std::multi{map,set} would. > > However, doing that is

Re: [PATCH] RISC-V: Modify _Bfloat16 to __bf16

2024-05-17 Thread Jeff Law
On 5/17/24 2:19 AM, Kito Cheng wrote: LGTM, thanks for fixing this :) And just to be clear for Xiao, you can go ahead and commit this patch to the trunk. An ACK from Kito, Juzhe, Palmer, Robin or myself is all you need for a change that is isolated to RISC-V code. jeff

Re: [PATCH] RISC-V: Remove dead perm series code and document.

2024-05-17 Thread Jeff Law
On 5/17/24 9:27 AM, Robin Dapp wrote: Hi, with the introduction of shuffle_series_patterns the explicit handler code for a perm series is dead. This patch removes it and also adds a function-level comment to shuffle_series_patterns. Regtested on rv64gcv_zvfh_zvbb. Regards Robin

Re: [PATCH] RISC-V: Split vwadd.wx and vwsub.wx and add helpers.

2024-05-17 Thread Palmer Dabbelt
On Fri, 17 May 2024 15:37:43 PDT (-0700), juzhe.zh...@rivai.ai wrote: I think it should be backport to GCC-14 since it is a bug. Seems reasonable to me -- I guess in theory those extended scalar patterns aren't bug fixes and we should split them out, but I don't think it's all that big of a

Re: [PATCH] RISC-V: Split vwadd.wx and vwsub.wx and add helpers.

2024-05-17 Thread 钟居哲
I think it should be backport to GCC-14 since it is a bug. juzhe.zh...@rivai.ai From: Robin Dapp Date: 2024-05-17 23:24 To: gcc-patches CC: palmer; Kito Cheng; juzhe.zh...@rivai.ai; jeffreyalaw; rdapp.gcc Subject: [PATCH] RISC-V: Split vwadd.wx and vwsub.wx and add helpers. Hi, vwadd.wx and

Re: [PATCH] RISC-V: Add vector popcount, clz, ctz.

2024-05-17 Thread 钟居哲
LGTM juzhe.zh...@rivai.ai From: Robin Dapp Date: 2024-05-17 23:26 To: gcc-patches CC: rdapp.gcc; palmer; Kito Cheng; juzhe.zh...@rivai.ai; jeffreyalaw Subject: [PATCH] RISC-V: Add vector popcount, clz, ctz. Hi, this patch adds the zvbb vcpop, vclz and vctz to the autovec machinery as well

Re: [PATCH] RISC-V: Add vandn combine helper.

2024-05-17 Thread 钟居哲
LGTM juzhe.zh...@rivai.ai From: Robin Dapp Date: 2024-05-17 23:26 To: gcc-patches CC: rdapp.gcc; palmer; Kito Cheng; juzhe.zh...@rivai.ai; jeffreyalaw Subject: [PATCH] RISC-V: Add vandn combine helper. Hi, this patch adds a combine pattern for vandn as well as tests for it. Regtested on

Re: [PATCH] RISC-V: Use widening shift for scatter/gather if applicable.

2024-05-17 Thread 钟居哲
LGTM juzhe.zh...@rivai.ai From: Robin Dapp Date: 2024-05-17 23:25 To: gcc-patches CC: rdapp.gcc; palmer; Kito Cheng; juzhe.zh...@rivai.ai; jeffreyalaw Subject: [PATCH] RISC-V: Use widening shift for scatter/gather if applicable. Hi, with the zvbb extension we can emit a widening shift for

Re: [PATCH] RISC-V: Add vwsll combine helpers.

2024-05-17 Thread 钟居哲
LGTM. juzhe.zh...@rivai.ai From: Robin Dapp Date: 2024-05-17 23:25 To: gcc-patches CC: rdapp.gcc; palmer; Kito Cheng; juzhe.zh...@rivai.ai; jeffreyalaw Subject: [PATCH] RISC-V: Add vwsll combine helpers. Hi, this patch enables the usage of vwsll in autovec context by adding the necessary

Re: [PATCH] RISC-V: Split vwadd.wx and vwsub.wx and add helpers.

2024-05-17 Thread 钟居哲
LGTM. juzhe.zh...@rivai.ai From: Robin Dapp Date: 2024-05-17 23:24 To: gcc-patches CC: palmer; Kito Cheng; juzhe.zh...@rivai.ai; jeffreyalaw; rdapp.gcc Subject: [PATCH] RISC-V: Split vwadd.wx and vwsub.wx and add helpers. Hi, vwadd.wx and vwsub.wx have the same problem vfwadd.wf had. This

[Ada] Fix PR ada/115133

2024-05-17 Thread Eric Botcazou
The recent changes made to the runtime library broke its build on Solaris because it uses Solaris threads instead of POSIX threads on this platform. Tested by Rainer, applied on the mainline. 2024-05-17 Eric Botcazou Rainer Orth PR ada/115133 *

[pushed] Regenerate common.opt.urls

2024-05-17 Thread David Malcolm
I forgot to do this for r15-636-g770657d02c986c. Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu. Pushed to trunk as r15-640-g4e3bb431bbf280. gcc/ChangeLog: * common.opt.urls: Regenerate to add fdiagnostics-show-event-links. Signed-off-by: David Malcolm ---

Re: [committed][wwwdocs] gcc-12/changes.html: Document RISC-V changes

2024-05-17 Thread Palmer Dabbelt
On Fri, 17 May 2024 14:30:49 PDT (-0700), ger...@pfeifer.com wrote: On Thu, 28 Apr 2022, Kito Cheng wrote: --- htdocs/gcc-12/changes.html | 13 - : +New ISA extension support for vector and scalar crypto was added, only + support architecture testing marco and -march=

[pushed] wwwdocs: gcc-4.6: Use 64-bit instead of 64 bit

2024-05-17 Thread Gerald Pfeifer
--- htdocs/gcc-4.6/changes.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/gcc-4.6/changes.html b/htdocs/gcc-4.6/changes.html index c96d347f..d1e15af3 100644 --- a/htdocs/gcc-4.6/changes.html +++ b/htdocs/gcc-4.6/changes.html @@ -791,7 +791,7 @@ Several

Re: [committed][wwwdocs] gcc-12/changes.html: Document RISC-V changes

2024-05-17 Thread Gerald Pfeifer
On Thu, 28 Apr 2022, Kito Cheng wrote: > --- > htdocs/gcc-12/changes.html | 13 - : > +New ISA extension support for vector and scalar crypto was added, > only > + support architecture testing marco and -march= > parsing. I realized I'm not sure I understand what the second

[pushed] wwwdocs: gcc-12: Fix typo

2024-05-17 Thread Gerald Pfeifer
--- htdocs/gcc-12/changes.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/gcc-12/changes.html b/htdocs/gcc-12/changes.html index 8a0347e3..0cfa12eb 100644 --- a/htdocs/gcc-12/changes.html +++ b/htdocs/gcc-12/changes.html @@ -903,7 +903,7 @@ function Multiply (S1,

Re: [PATCH v1] RISC-V: Cleanup some temporally files [NFC]

2024-05-17 Thread Jeff Law
On 5/16/24 6:12 PM, Li, Pan2 wrote: Committed, thanks Juzhe. Thanks for cleaning up my little mess! Sorry about that. jeff

Re: [PATCH 4/13] rs6000, extend the current vec_{un,}signed{e,o} built-ins

2024-05-17 Thread Carl Love
Kewen: I am working thru the patches. I made the changes as requested for this patch but have a question about one of your comments. On 5/14/24 00:53, Kewen.Lin wrote: > Hi, > > on 2024/4/20 05:17, Carl Love wrote: >> rs6000, extend the current vec_{un,}signed{e,o} built-ins >> >> The

[x86 SSE] Improve handling of ternlog instructions in i386/sse.md (v2)

2024-05-17 Thread Roger Sayle
Hi Hongtao, Many thanks for the review, bug fixes and suggestions for improvements. This revised version of the patch, implements all of your corrections. In theory the "ternlog idx" should guarantee that some operands are non-null, but I agree that it's better defensive programming to check

[PATCH] selftest: invoke "diff" when ASSERT_STREQ fails

2024-05-17 Thread David Malcolm
Currently when ASSERT_STREQ or ASSERT_STREQ_AT fail we print both strings to stderr. However it can be hard to figure out the problem (e.g. for 1-character differences in long strings). Extend the output by writing out the strings to tempfiles and invoking "diff -up" on them when we have such a

Re: [PATCH v6] RISC-V: Implement IFN SAT_ADD for both the scalar and vector

2024-05-17 Thread Robin Dapp
Hi Pan, all in all LGTM. Just insignificant nits. > +void > +expand_vec_usadd (rtx op_0, rtx op_1, rtx op_2, machine_mode vec_mode) > +{ > + emit_vec_saddu (op_0, op_1, op_2, BINARY_OP, vec_mode); > +} > + Do we really need this function? Or do you want it to be a dispatcher for later? If

[pushed] diagnostics, analyzer: add CFG edge visualization to path-printing

2024-05-17 Thread David Malcolm
This patch adds some ability for links between labelled ranges when quoting the user's source code, and uses this to add links between events when printing diagnostic_paths, chopping them up further into event ranges that can be printed together. It adds links to the various "from..." - "...to"

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

2024-05-17 Thread Richard Sandiford
Ajit Agarwal writes: > Hello Alex/Richard: > > All review comments are addressed. > > Common infrastructure of load store pair fusion is divided into target > independent and target dependent changed code. > > Target independent code is the Generic code with pure virtual function > to interface

[PATCH v2] libstdc++: Fix std::ranges::iota not included in numeric [PR108760]

2024-05-17 Thread Michael Levine (BLOOMBERG/ 731 LEX)
This is the revised version of my patch incorporating the provided feedback from Patrick Palka and Jonathan Wakely. This patch fixes GCC Bug 108760: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108760 I moved out_value_result to , moved std::ranges:iota into , removed my new test, and moved

Re: [PATCH] c++: folding non-dep enumerator from current inst [PR115139]

2024-05-17 Thread Marek Polacek
On Fri, May 17, 2024 at 12:05:15PM -0400, Patrick Palka wrote: > Bootstrapped and regtested on x86_64-pc-linux-gnu, does this look OK for > trunk/14? This patch looks good to me, thanks. > -- >8 -- > > After the tsubst_copy removal r14-4796-g3e3d73ed5e85e7 GCC 14 ICEs during >

[PATCH] c++: folding non-dep enumerator from current inst [PR115139]

2024-05-17 Thread Patrick Palka
Bootstrapped and regtested on x86_64-pc-linux-gnu, does this look OK for trunk/14? -- >8 -- After the tsubst_copy removal r14-4796-g3e3d73ed5e85e7 GCC 14 ICEs during fold_non_dependent_expr for 'e1 | e2' ultimately because we no longer exit early when substituting the CONST_DECLs for e1 and e2

Re: [PATCH 00/12] aarch64: Extend aarch64_feature_flags to 128 bits

2024-05-17 Thread Richard Sandiford
Andrew Carlotti writes: > The end goal of the series is to change the definition of > aarch64_feature_flags > from a uint64_t typedef to a class with 128 bits of storage. This class uses > operator overloading to mimic the existing integer interface as much as > possible, but with added

[PATCH] RISC-V: Remove dead perm series code and document.

2024-05-17 Thread Robin Dapp
Hi, with the introduction of shuffle_series_patterns the explicit handler code for a perm series is dead. This patch removes it and also adds a function-level comment to shuffle_series_patterns. Regtested on rv64gcv_zvfh_zvbb. Regards Robin gcc/ChangeLog: * config/riscv/riscv-v.cc

[PATCH] RISC-V: Add vector popcount, clz, ctz.

2024-05-17 Thread Robin Dapp
Hi, this patch adds the zvbb vcpop, vclz and vctz to the autovec machinery as well as tests for them. It also changes several non-VLS iterators to V_VLS iterators for consistency. Regtested on rv64gcv_zvfh_zvbb. Regards Robin gcc/ChangeLog: * config/riscv/autovec.md (ctz2): New

[PATCH] RISC-V: Add vandn combine helper.

2024-05-17 Thread Robin Dapp
Hi, this patch adds a combine pattern for vandn as well as tests for it. Regtested on rv64gcv_zvfh_zvbb. Regards Robin gcc/ChangeLog: * config/riscv/autovec-opt.md (*vandn_): New pattern. * config/riscv/vector.md: Add vandn to mode_idx. gcc/testsuite/ChangeLog: *

[PATCH] RISC-V: Use widening shift for scatter/gather if applicable.

2024-05-17 Thread Robin Dapp
Hi, with the zvbb extension we can emit a widening shift for scatter/gather index preparation in case we need to multiply by 2 and zero extend. The patch also adds vwsll to the mode_idx attribute and removes the mode from shift-count operand of the insn pattern. Regtested on rv64gcv_zvfh_zvbb.

[PATCH] RISC-V: Add vwsll combine helpers.

2024-05-17 Thread Robin Dapp
Hi, this patch enables the usage of vwsll in autovec context by adding the necessary combine patterns and tests. Regtested on rv64gcv_zvfh_zvbb. Regards Robin gcc/ChangeLog: * config/riscv/autovec-opt.md (*vwsll_zext1_): New pattern. (*vwsll_zext2_): Ditto.

[PATCH] RISC-V: Split vwadd.wx and vwsub.wx and add helpers.

2024-05-17 Thread Robin Dapp
Hi, vwadd.wx and vwsub.wx have the same problem vfwadd.wf had. This patch splits the insn pattern in the same way vfwadd.wf was split. It also adds two patterns to recognize extended scalars. In practice those do not provide a lot of improvement over what we already have but in some instances

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

2024-05-17 Thread Victor Do Nascimento
Dear Richard and Tamar, Thanks to the both of you for the various bits of feedback. I've implemented all the more straightforward bits of feedback given, leaving "only" the merging of the two- and four-way dot product optabs into one, together with the necessary changes to the various backends

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

2024-05-17 Thread Tamar Christina
Hi Pan, > > 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. It

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

2024-05-17 Thread Jonathan Wakely
On Sun, 24 Mar 2024 at 21:34, Björn Schäpers wrote: > > 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 > ops-common.h, since then we

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

2024-05-17 Thread Ajit Agarwal
Hello Alex: On 17/05/24 6:22 pm, Alex Coplan wrote: > Hi Ajit, > > On 17/05/2024 18:05, Ajit Agarwal wrote: >> Hello Alex: >> >> On 16/05/24 10:21 pm, Alex Coplan wrote: >>> Hi Ajit, >>> >>> Thanks a lot for working through the review feedback. >>> >> >> Thanks a lot for reviewing the code and

Re: [PATCH] Use DW_TAG_module for Ada

2024-05-17 Thread Jakub Jelinek
On Fri, May 03, 2024 at 11:08:04AM -0600, Tom Tromey wrote: > DWARF is not especially clear on the distinction between > DW_TAG_namespace and DW_TAG_module, but I think that DW_TAG_module is > more appropriate for Ada. This patch changes the compiler to do this. > Note that the Ada compiler does

[COMMITTED] [prange] Drop range to VARYING if the bitmask intersection made it so [PR115131]

2024-05-17 Thread Aldy Hernandez
If the intersection of the bitmasks made the range span the entire domain, normalize the range to VARYING. gcc/ChangeLog: PR middle-end/115131 * value-range.cc (prange::intersect): Set VARYING if intersection of bitmasks made the range span the entire domain.

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

2024-05-17 Thread Segher Boessenkool
On Fri, May 17, 2024 at 10:38:54AM +0800, HAO CHEN GUI wrote: > This expand calls gen_xststdcp which is a P9 vector instruction and > relies on "TARGET_P9_VECTOR". So I set the condition. Why? It needs P9, sure, and MSR[VSX] set, but the operands being VSX registers takes care of that, heh. But

[PATCH] libstdc++: Implement std::formatter without [PR115099]

2024-05-17 Thread Jonathan Wakely
Does anybody see any issue with the drive-by fixes to constraint std::formatter to only work for pointers and integers (since we don't know how to format pthread_t if it's an arbitrary struct, for example), and to cast pointers to const void* for output (because if pthread_t is char* then writing

Re: [PATCH] Use DW_TAG_module for Ada

2024-05-17 Thread Tom Tromey
> "Tom" == Tom Tromey writes: Tom> DWARF is not especially clear on the distinction between Tom> DW_TAG_namespace and DW_TAG_module, but I think that DW_TAG_module is Tom> more appropriate for Ada. This patch changes the compiler to do this. Tom> Note that the Ada compiler does not yet

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

2024-05-17 Thread Alex Coplan
Hi Ajit, On 17/05/2024 18:05, Ajit Agarwal wrote: > Hello Alex: > > On 16/05/24 10:21 pm, Alex Coplan wrote: > > Hi Ajit, > > > > Thanks a lot for working through the review feedback. > > > > Thanks a lot for reviewing the code and approving the patch. To be clear, I didn't approve the patch

[committed] libstdc++: Fix typo in _Grapheme_cluster_view::_Iterator [PR115119]

2024-05-17 Thread Jonathan Wakely
Tested x86_64-linux. Pushed to trunk, gcc-14 backport to follow. -- >8 -- libstdc++-v3/ChangeLog: PR libstdc++/115119 * include/bits/unicode.h (_Iterator::operator++(int)): Fix typo in increment expression. * testsuite/ext/unicode/grapheme_view.cc: Check

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

2024-05-17 Thread Ajit Agarwal
Hello Alex: On 16/05/24 10:21 pm, Alex Coplan wrote: > Hi Ajit, > > Thanks a lot for working through the review feedback. > Thanks a lot for reviewing the code and approving the patch. > The patch LGTM with the two minor suggested changes below. I can't > approve the patch, though, so you'll

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

2024-05-17 Thread Nathaniel Shead
On Fri, May 17, 2024 at 04:14:31PM +1000, Nathaniel Shead wrote: > 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

Re: [PATCH] MATCH: Maybe expand (T)(A + C1) * C2 and (T)(A + C1) * C2 + C3 [PR109393]

2024-05-17 Thread Richard Biener
On Fri, 17 May 2024, Manolis Tsamis wrote: > On Fri, May 17, 2024 at 12:22 PM Richard Biener wrote: > > > > On Fri, 17 May 2024, Manolis Tsamis wrote: > > > > > Hi Richard, > > > > > > While I was re-testing the latest version of this patch I noticed that > > > it FAILs an AArch64 test,

Re: [PATCH] MATCH: Maybe expand (T)(A + C1) * C2 and (T)(A + C1) * C2 + C3 [PR109393]

2024-05-17 Thread Manolis Tsamis
On Fri, May 17, 2024 at 12:22 PM Richard Biener wrote: > > On Fri, 17 May 2024, Manolis Tsamis wrote: > > > Hi Richard, > > > > While I was re-testing the latest version of this patch I noticed that > > it FAILs an AArch64 test, gcc.target/aarch64/subsp.c. With the patch > > we generate one

[COMMITTED] [prange] Avoid looking at type() for undefined ranges

2024-05-17 Thread Aldy Hernandez
Undefined ranges have no type. This patch fixes the thinko. gcc/ChangeLog: PR middle-end/115128 * ipa-cp.cc (ipa_value_range_from_jfunc): Check for undefined_p before looking at type. (propagate_vr_across_jump_function): Same. gcc/testsuite/ChangeLog: *

[PATCH v6] RISC-V: Implement IFN SAT_ADD for both the scalar and vector

2024-05-17 Thread pan2 . li
From: Pan Li Update in v6: * Rebase upstream for conflict. Log for v5: The patch implement the SAT_ADD in the riscv backend as the sample for both the scalar and vector. Given below vector as example: void vec_sat_add_u64 (uint64_t *out, uint64_t *x, uint64_t *y, unsigned n) { unsigned i;

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

2024-05-17 Thread Jonathan Wakely
On Thu, 16 May 2024 at 19:52, Björn Schäpers wrote: > > 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. This

Re: [PATCH] internal-fn: Do not force vcond operand to reg.

2024-05-17 Thread Robin Dapp
> OK if that pre-commit CI works out. The CI didn't pick it up, guess it needs to be a bit more explicit. In the meanwhile, however, I managed to catch a short window with > 10G free on gcc185 => Bootstrap and regtest successful on aarch64. Going to push the patch later today. Regards Robin

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

2024-05-17 Thread Richard Biener
On Fri, May 17, 2024 at 11:56 AM Tamar Christina wrote: > > > -Original Message- > > From: Richard Biener > > Sent: Friday, May 17, 2024 10:46 AM > > To: Tamar Christina > > Cc: Victor Do Nascimento ; gcc- > > patc...@gcc.gnu.org; Richard Sandiford ; Richard > > Earnshaw ; Victor Do

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

2024-05-17 Thread Tamar Christina
> -Original Message- > From: Richard Biener > Sent: Friday, May 17, 2024 10:46 AM > To: Tamar Christina > Cc: Victor Do Nascimento ; gcc- > patc...@gcc.gnu.org; Richard Sandiford ; Richard > Earnshaw ; Victor Do Nascimento > > Subject: Re: [PATCH] middle-end: Expand {u|s}dot product

[c-family] Small fix to implementation of -fdump-ada-spec

2024-05-17 Thread Eric Botcazou
This avoids declaring anonymous array types as having an aliased component when the layout is packed, as is already done for named array types. Tested on x86-64/Linux, applied on the mainline. 2024-05-17 Eric Botcazou * c-ada-spec.cc (bitfield_used): Move around.

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

2024-05-17 Thread Richard Biener
On Fri, May 17, 2024 at 11:05 AM Tamar Christina wrote: > > > -Original Message- > > From: Richard Biener > > Sent: Friday, May 17, 2024 6:51 AM > > To: Victor Do Nascimento > > Cc: gcc-patches@gcc.gnu.org; Richard Sandiford ; > > Richard Earnshaw ; Victor Do Nascimento > > > >

Re: [PATCH] MATCH: Maybe expand (T)(A + C1) * C2 and (T)(A + C1) * C2 + C3 [PR109393]

2024-05-17 Thread Richard Biener
On Fri, 17 May 2024, Manolis Tsamis wrote: > Hi Richard, > > While I was re-testing the latest version of this patch I noticed that > it FAILs an AArch64 test, gcc.target/aarch64/subsp.c. With the patch > we generate one instruction more: > > sbfiz x1, x1, 4, 32 > stp x29,

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

2024-05-17 Thread Tamar Christina
> -Original Message- > From: Hongtao Liu > Sent: Friday, May 17, 2024 3:14 AM > To: Victor Do Nascimento > Cc: gcc-patches@gcc.gnu.org; Richard Sandiford ; > Richard Earnshaw ; Victor Do Nascimento > > Subject: Re: [PATCH] middle-end: Expand {u|s}dot product support in > autovectorizer

[PATCH] middle-end/115110 - Fix view_converted_memref_p

2024-05-17 Thread Richard Biener
view_converted_memref_p was checking the reference type against the pointer type of the offset operand rather than its pointed-to type which leads to all refs being subject to view-convert treatment in get_alias_set causing numerous testsuite fails but with its new uses from

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

2024-05-17 Thread Tamar Christina
> -Original Message- > From: Richard Biener > Sent: Friday, May 17, 2024 6:51 AM > To: Victor Do Nascimento > Cc: gcc-patches@gcc.gnu.org; Richard Sandiford ; > Richard Earnshaw ; Victor Do Nascimento > > Subject: Re: [PATCH] middle-end: Expand {u|s}dot product support in >

[COMMITTED 32/35] ada: Improve test for unprocessed preprocessor directives

2024-05-17 Thread Marc Poulhiès
From: Steve Baird Preprocessor directives are case insensitive and may have spaces or tabs between the '#' and the keyword. When checking for the error case of unprocessed preprocessor directives, take these rules into account. gcc/ada/ * scng.adb (scan): When checking for an

[COMMITTED 24/35] ada: Do not query the modification time of a special file.

2024-05-17 Thread Marc Poulhiès
From: Steve Baird In Ada.Directories, the function Modification_Time raises Name_Error if it is called for a special file. So don't do that in Start_Search_Internal. gcc/ada/ * libgnat/a-direct.adb (Start_Search_Internal): Do not call Modification_Time for a special file;

[COMMITTED 33/35] ada: Start the initialization of the tasking runtime earlier

2024-05-17 Thread Marc Poulhiès
From: Eric Botcazou This installs the tasking versions of the RTS_Lock manipulation routines very early, before the elaboration of all the Ada units of the program, including those of the runtime, because this elaboration may require the initialization of RTS_Lock objects. gcc/ada/ *

[COMMITTED 26/35] ada: Factor out duplicated code in bodies of System.Task_Primitives.Operations

2024-05-17 Thread Marc Poulhiès
From: Eric Botcazou The duplication is present in some POSIX-like implementations (POSIX and RTEMS) while it has already been eliminated in others (Linux, QNX). The latter implementations are also slightly modified for consistency's sake. No functional changes. gcc/ada/ *

[COMMITTED 31/35] ada: Restore dependency on System.OS_Interface in System.Task_Primitives

2024-05-17 Thread Marc Poulhiès
From: Eric Botcazou The dependency is relied upon by the binder to drag the tasking runtime. gcc/ada/ * libgnarl/s-taspri__mingw.ads: Add clause for System.OS_Interface. (Private_Data): Change type of Thread component. Tested on x86_64-pc-linux-gnu, committed on master. ---

[COMMITTED 30/35] ada: Further adjustments coming from aliasing considerations

2024-05-17 Thread Marc Poulhiès
From: Eric Botcazou They are needed on 32-bit platforms because of different calling conventions and again in the units implementing AltiVec and Streams support. gcc/ada/ * libgnat/g-alvevi.ads: Add pragma Universal_Aliasing for all the view types. *

[COMMITTED 21/35] ada: Fix others error message location

2024-05-17 Thread Marc Poulhiès
From: Ronan Desplanques Before this patch, the compiler pointed at the wrong component association when reporting an illegal occurrence of "others" in an aggregate. This patch fixes this by keeping track of which choice contains the occurrence of "others" when resolving array aggregates.

[COMMITTED 35/35] ada: Improve deriving initial sizes for container aggregates

2024-05-17 Thread Marc Poulhiès
From: Viljar Indus Deriving the initial size of container aggregates is necessary for deriving the correct capacity for bounded containers. Add support for deriving the correct initial size when the container aggregate is iterating over an array object. gcc/ada/ * exp_aggr.adb

[COMMITTED 25/35] ada: Fix for validity checking and conditional evaluation of 'Old

2024-05-17 Thread Marc Poulhiès
From: Piotr Trojanek Detection of expression that are "known on entry" (as defined in Ada 2022 RM 6.1.1(20/5)) was confused by validity checks when used from within expansion of attribute 'Old. gcc/ada/ * sem_util.adb (Is_Known_On_Entry): Handle constants introduced by validity

[COMMITTED 22/35] ada: Clarify code for aggregate warnings

2024-05-17 Thread Marc Poulhiès
From: Ronan Desplanques This patch improves comments in code that emits warnings about particular situations involving aggregates. It also removes a conjunct in a condition that's useless because always true in the context of the test. gcc/ada/ * sem_aggr.adb (Resolve_Array_Aggregate):

[COMMITTED 23/35] ada: Disable Equivalent_Array_Aggregate optimization if predicates involved

2024-05-17 Thread Marc Poulhiès
From: Steve Baird In most paths, the function Build_Equivalent_Record_Aggregate was already testing Has_Predicates for a given component type and conditionally returning an Empty result. This is also needed in the case of a scalar component type. Without it, we can build corrupt trees that fail

[COMMITTED 20/35] ada: Expose utility routine for processing of Depends contracts in SPARK

2024-05-17 Thread Marc Poulhiès
From: Piotr Trojanek Routine Is_Unconstrained_Or_Tagged_Item is now used both in the GNAT frontend (for checking legality of Depends clauses) and in the GNATprove backend (for representing implicit inputs in flow graphs). gcc/ada/ * sem_prag.adb (Is_Unconstrained_Or_Tagged_Item): Move

[COMMITTED 14/35] ada: gnatbind-related cleanups

2024-05-17 Thread Marc Poulhiès
From: Bob Duff This patch cleans up some things noticed while working on gnatbind. No change in behavior yet. gcc/ada/ * ali-util.adb (Read_Withed_ALIs): Minor reformatting. * bindo-units.adb (Corresponding_Body): Add assert. (Corresponding_Spec): Likewise. *

[COMMITTED 18/35] ada: gnatbind: subprogram spec no longer exists

2024-05-17 Thread Marc Poulhiès
From: Bob Duff If a subprogram spec S is present while compiling something that says "with S;", but the spec is absent while compiling the body of S, then gnatbind fails to detect the mismatch. The spec and body of S might have different parameter and result types. This patch fixes gnatbind to

[COMMITTED 12/35] ada: Fix crash caused by missing New_Copy_tree

2024-05-17 Thread Marc Poulhiès
Since a recent refactor ("Factor common processing in expansion of aggregates") where Initialize_Array_Component and Initialize_Record_Component are merged, the behavior has slightly changed. In the case of the expansion of an aggregate initialization where the number of 'others' components is <=

[COMMITTED 15/35] ada: correction to gnatbind-related cleanups

2024-05-17 Thread Marc Poulhiès
From: Bob Duff Correction to previous change; Asserts had been moved to before Buf was initialized. gcc/ada/ * uname.adb (Get_Unit_Name_String): Move Asserts after Buf is initialized. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/uname.adb | 5 ++--- 1 file

[COMMITTED 29/35] ada: Replace spinlocks with fully-fledged locks in finalization collections

2024-05-17 Thread Marc Poulhiès
From: Eric Botcazou This replaces spinlocks with fully-fledged locks in finalization collections because the former are deemed problematic with tasks that can be preempted. Because of the requirement to avoid dragging the tasking runtime when it is not necessary, the implementation goes through

[COMMITTED 17/35] ada: Update docs for Resolve_Null_Array_Aggregate

2024-05-17 Thread Marc Poulhiès
From: Ronan Desplanques The documentation comments for Sem_Aggr.Resolve_Null_Array_Aggregate suggested that this subprogram created a subtype, which it didn't. This patch replaces those comments with ones that better match the behavior. gcc/ada/ * sem_aggr.adb

[COMMITTED 13/35] ada: Make raise-gcc.c compatible with Clang

2024-05-17 Thread Marc Poulhiès
From: Sebastian Poeplau The Morello variant of Clang doesn't have __builtin_code_address_from_pointer; work around it where necessary. gcc/ada/ * raise-gcc.c: Work around __builtin_code_address_from_pointer if it is unavailable. Tested on x86_64-pc-linux-gnu, committed on

[COMMITTED 09/35] ada: Simplify code for private types with unknown discriminants

2024-05-17 Thread Marc Poulhiès
From: Piotr Trojanek Private type entities have Is_Constrained set when they have no discriminants and no unknown discriminants; it is now set slightly later, but simpler (this change could only affect Process_Discriminants, but this flag should not be needed there). Also, we now reuse this

[COMMITTED 34/35] ada: Remove outdated workaround in aggregate expansion

2024-05-17 Thread Marc Poulhiès
From: Ronan Desplanques Before this patch, the compiler refrained from rewriting aggregates into purely positional form in some cases of one-component aggregates. As explained in comments, this was because the back end could not handle positional aggregates in those situations. As the back end

[COMMITTED 19/35] ada: Couple of adjustments coming from aliasing considerations

2024-05-17 Thread Marc Poulhiès
From: Eric Botcazou The first adjustment is to the expansion of implementation types for array types with peculiar index types, for which the aliased property set on the component of the original type must be copied; the implicit base type also needs to be properly marked if the implementation

[COMMITTED 10/35] ada: Only record types with discriminants can be unconstrained

2024-05-17 Thread Marc Poulhiès
From: Piotr Trojanek Remove redundant condition for detecting unconstrained record types. Code cleanup; behavior is unaffected. gcc/ada/ * sem_prag.adb (Is_Unconstrained_Or_Tagged_Item): Remove call to Has_Discriminants; combine ELSIF branches. Tested on x86_64-pc-linux-gnu,

[COMMITTED 16/35] ada: Fix containers' Reference_Preserving_Key functions' memory leaks

2024-05-17 Thread Marc Poulhiès
From: Steve Baird Fix memory leaks in containers' Reference_Preserving_Key functions Make the same change in each of 3 Ada.Containers child units: Ordered_Sets, Indefinite_Ordered_Sets, and Bounded_Ordered_Sets. The function Reference_Preserving_Key evaluates an allocator of type Key_Access

[COMMITTED 02/35] ada: Small cleanup in aggregate expansion code

2024-05-17 Thread Marc Poulhiès
From: Ronan Desplanques This patch moves a statement outside of a loop because it didn't need to be inside that loop. The behavior of the program is not affected. gcc/ada/ * exp_aggr.adb (Flatten): Small cleanup. Tested on x86_64-pc-linux-gnu, committed on master. ---

[COMMITTED 28/35] ada: Document secondary usage of Materialize_Entity flag

2024-05-17 Thread Marc Poulhiès
From: Eric Botcazou The flag is also used by the semantic analyzer. gcc/ada/ * einfo.ads (Materialize_Entity): Document secondary usage. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/einfo.ads | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git

[COMMITTED 08/35] ada: Allow private items with unknown discriminants as Depends inputs

2024-05-17 Thread Marc Poulhiès
From: Piotr Trojanek Objects of private types with unknown discriminants are now allowed as inputs in the Depends contracts. gcc/ada/ * sem_prag.adb (Is_Unconstrained_Or_Tagged_Item): Allow objects of private types with unknown discriminants. Tested on x86_64-pc-linux-gnu,

[COMMITTED 11/35] ada: Fix Constraint_Error on mutable assignment

2024-05-17 Thread Marc Poulhiès
From: Bob Duff For an assignment statement "X := Y;", where X is a formal parameter of a "late overriding" subprogram (i.e. it has no spec, and the body is overriding), and the subtype of X is an unconstrained record with defaulted discriminants, if the actual parameter passed to X is

[COMMITTED 03/35] ada: Remove superfluous Relocate_Node calls

2024-05-17 Thread Marc Poulhiès
From: Ronan Desplanques This patch removes two calls to Relocate_Node that were not needed. This does not affect the behavior of the compiler. gcc/ada/ * exp_ch4.adb (Expand_N_Case_Expression): Remove call to Relocate_Node. * sem_attr.adb (Analyze_Attribute): Likewise.

[COMMITTED 06/35] ada: Fix probable copy/paste error

2024-05-17 Thread Marc Poulhiès
gcc/ada/ * doc/gnat_rm/implementation_defined_attributes.rst: Fix copy/paste. * gnat_rm.texi: Regenerate. * gnat_ugn.texi: Regenerate. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/doc/gnat_rm/implementation_defined_attributes.rst | 7 +++

[COMMITTED 27/35] ada: Bug in computing local restrictions inherited from enclosing scopes.

2024-05-17 Thread Marc Poulhiès
From: Steve Baird In the function Local_Restrict.Active_Restriction, we traverse enclosing scopes looking for a relevant Local_Restrictions aspect specification. Fix a bug in this traversal. gcc/ada/ * local_restrict.adb (Active_Restriction): When traversing scopes, do not skip

[COMMITTED 07/35] ada: Tune detection of unconstrained and tagged items in Depends contract

2024-05-17 Thread Marc Poulhiès
From: Piotr Trojanek The Tagged/Array/Record/Private types are mutually exclusive, so they can be examined like with a case statement (except for records with private extensions, but their handling is not affected by this change). gcc/ada/ * sem_prag.adb

[COMMITTED 05/35] ada: Check subtype to avoid a precondition failure

2024-05-17 Thread Marc Poulhiès
From: Viljar Indus gcc/ada/ * sem_ch3.adb (Analyze_Component_Declaration): Apply range checks only for Scalar_Types to ensure that they have the Scalar_Range attribute. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/sem_ch3.adb | 5 +++-- 1 file

  1   2   >