Re: [PATCH] i386: Add -mveclibabi=aocl [PR56504]

2024-11-12 Thread Richard Biener
On Mon, 11 Nov 2024, Jan Hubicka wrote: > > We currently support generating vectorized math calls to the AMD core > > math library (ACML) (-mveclibabi=acml). That library is end-of-life and > > its successor is the math library from AMD Optimizing CPU Libraries > > (AOCL). > > > > This patch add

Re: [PATCH 2/2] Add X86_TUNE_AVX512_TWO_EPILOGUES, enable for Zen4 and Zen5

2024-11-12 Thread Richard Biener
On Tue, 12 Nov 2024, Hongtao Liu wrote: > On Mon, Nov 11, 2024 at 8:20 PM Richard Biener wrote: > > > > The following adds X86_TUNE_AVX512_TWO_EPILOGUES tuning and directs the > > vectorizer to produce both a vector AVX2 and SSE epilogue for AVX512 > > vectorized loops when set. The tuning is en

RE: [PATCH][v2] tree-optimization/117502 - VMAT_STRIDED_SLP vs VMAT_ELEMENTWISE when considering gather

2024-11-12 Thread Tamar Christina
> -Original Message- > From: Richard Biener > Sent: Tuesday, November 12, 2024 8:31 AM > To: Tamar Christina > Cc: gcc-patches@gcc.gnu.org; RISC-V CI > Subject: RE: [PATCH][v2] tree-optimization/117502 - VMAT_STRIDED_SLP vs > VMAT_ELEMENTWISE when considering gather > > On Tue, 12 Nov 2

RE: [PATCH][v2] tree-optimization/117502 - VMAT_STRIDED_SLP vs VMAT_ELEMENTWISE when considering gather

2024-11-12 Thread Richard Biener
On Tue, 12 Nov 2024, Tamar Christina wrote: > > -Original Message- > > From: Richard Biener > > Sent: Monday, November 11, 2024 10:13 AM > > To: gcc-patches@gcc.gnu.org > > Cc: RISC-V CI ; Tamar Christina > > > > Subject: [PATCH][v2] tree-optimization/117502 - VMAT_STRIDED_SLP vs > > VMA

Re: [PATCHv2 0/3] ada: Add GNU/Hurd x86_64 support

2024-11-12 Thread Marc Poulhiès
Samuel Thibault writes: > Hello, > > Marc Poulhiès, le lun. 04 nov. 2024 16:28:43 +0100, a ecrit: >> Samuel Thibault writes: >> >> > I reworked the patch to factorize the bsd signal definitions. >> > I have split off the system definitions because the priority range of >> > GNU/Mach has diverged

Re: [gcc r15-5081] modula2: Reimplement parameter declaration and checking.

2024-11-12 Thread Andreas Schwab
libtool: compile: /home/abuild/rpmbuild/BUILD/gcc-15.0.0+git5115/obj-x86_64-suse-linux/./gcc/gm2 -B/home/abuild/rpmbuild/BUILD/gcc-15.0.0+git5115/obj-x86_64-suse-linux/./gcc/ -c -O2 -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -g -O2 -funwind-tables

Re: [PATCH 2/2] Add X86_TUNE_AVX512_TWO_EPILOGUES, enable for Zen4 and Zen5

2024-11-12 Thread Richard Biener
On Mon, 11 Nov 2024, Richard Biener wrote: > The following adds X86_TUNE_AVX512_TWO_EPILOGUES tuning and directs the > vectorizer to produce both a vector AVX2 and SSE epilogue for AVX512 > vectorized loops when set. The tuning is enabled by default for Zen4 > and Zen5 where I benchmarked it to b

Ping^4 [PATCH 0/2] Prime path coverage to gcc/gcov

2024-11-12 Thread Jørgen Kvalsvik
Ping. On 10/30/24 13:55, Jørgen Kvalsvik wrote: Ping. On 10/21/24 15:21, Jørgen Kvalsvik wrote: Ping. On 10/10/24 10:08, Jørgen Kvalsvik wrote: Ping. On 10/3/24 12:46, Jørgen Kvalsvik wrote: This is both a ping and a minor update. A few of the patches from the previous set have been merged

Re: [PATCH] s390: Add expander for uaddc/usubc optabs

2024-11-12 Thread Stefan Schulze Frielinghaus
On Mon, Nov 11, 2024 at 11:29:16AM +0100, Andreas Krebbel wrote: > Hi Stefan, > > thanks for the patch and sorry for the slow review. No worries. Thanks for the detailed review. Much appreciated! > > > On 9/18/24 19:25, Stefan Schulze Frielinghaus wrote: > > Bootstrapped and regtested on s390

[PATCH 10/10] aarch64: Try to avoid passing new flags to assembler

2024-11-12 Thread Andrew Carlotti
These new flags (+fcma, +jscvt, +rcpc2, +jscvt, +frintts, +wfxt and +xs) were only recently added to the assembler. To improve compatibility with older assemblers, we try to avoid passing these new flags to the assembler if we can express the targetted architecture without them. We do so by using

Re: [PATCH] Fix incorrect subreg mode check [PR117476]

2024-11-12 Thread Jeff Law
On 11/12/24 4:46 AM, Alex Coplan wrote: Hi Alexey, On 12/11/2024 08:18, Alexey Merzlyakov wrote: gcc/ChangeLog: * simplify-rtx.cc (simplify_context::simplify_unary_operation_1): Fix subreg mode check during zero_extend(not) -> xor optimization. gcc/testsuite/ChangeLog:

[PATCH][v2] Set --param vect-force-slp=1

2024-11-12 Thread Richard Biener
The following pulls the trigger, defaulting --param vect-force-slp to 1. I know of no features missing but eventually minor testsuite and optimization quality fallout. Re-do CI with improvements from today. * params.opt (vect-force-slp): Default to 1. --- gcc/params.opt | 2 +- 1 file ch

Re: [PATCH] Fix incorrect subreg mode check [PR117476]

2024-11-12 Thread Alexey Merzlyakov
Hi, Alex, On Tue, Nov 12, 2024 at 11:46:54AM +, Alex Coplan wrote: > I think it might be better to put the test in gcc.c-torture/execute, > then it will automatically get run with the various torture options > and you should be able to drop both the dejagnu directives. > > Thanks, > Alex Yep.

Re: [PATCH v2] RISC-V:Auto vect for vector-bfloat16

2024-11-12 Thread Edwin Lu
I took a look at the CI errors today since I remember Jeff checking the CI output. I don't remember if the errors were the main things blocking the patch or if there just wasn't any follow up. I'll look into having the CI output some additional test log information to make understanding failur

[PATCH v2 ] i386: Add ix86_expand_integer_cst_argument

2024-11-12 Thread H.J. Lu
On Wed, Nov 13, 2024 at 5:57 AM H.J. Lu wrote: > > On Tue, Nov 12, 2024 at 9:30 PM Richard Biener > wrote: > > > > On Tue, Nov 12, 2024 at 1:49 PM H.J. Lu wrote: > > > > > > When passing 0xff as an unsigned char function argument, the C frontend > > > promotion will promote it to int: > > > > >

Re: [PATCH] Fix incorrect subreg mode check [PR117476]

2024-11-12 Thread Jeff Law
On 11/12/24 11:31 AM, Alexey Merzlyakov wrote: Hi, Jeff, Oops... It looks like I've made a reply to Alex at the same time when you sent an e-mail update. So, moving the testcase to the gcc.dg/torture directory. On Tue, Nov 12, 2024 at 10:56:13AM -0700, Jeff Law wrote: I think it might be b

Re: [PATCH v2] RISC-V: Bugfix for max_sew_overlap_and_next_ratio_valid_for_prev_sew_p[pr117483]

2024-11-12 Thread 钟居哲
LGTM juzhe.zh...@rivai.ai From: Li Xu Date: 2024-11-13 10:36 To: gcc-patches CC: kito.cheng; palmer; juzhe.zhong; pan2.li; xuli Subject: [PATCH v2] RISC-V: Bugfix for max_sew_overlap_and_next_ratio_valid_for_prev_sew_p[pr117483] From: xuli This patch fixs https://gcc.gnu.org/bugzilla/show_

Re: [PATCH v2 ] i386: Add ix86_expand_integer_cst_argument

2024-11-12 Thread H.J. Lu
On Wed, Nov 13, 2024 at 10:23 AM Hongtao Liu wrote: > > On Wed, Nov 13, 2024 at 8:29 AM H.J. Lu wrote: > > > > On Wed, Nov 13, 2024 at 5:57 AM H.J. Lu wrote: > > > > > > On Tue, Nov 12, 2024 at 9:30 PM Richard Biener > > > wrote: > > > > > > > > On Tue, Nov 12, 2024 at 1:49 PM H.J. Lu wrote: >

Re: [PATCH v2] AArch64: Block combine_and_move from creating FP literal loads

2024-11-12 Thread Richard Sandiford
Wilco Dijkstra writes: > Hi Richard, > >> The idea was that, if we did the split during expand, the movsf/df >> define_insns would then only accept the immediates that their >> constraints can handle. > > Right, always disallowing these immediates works fine too (it seems > reload doesn't require

Re: [Committed] RISC-V: testsuite: Remove deprecated compatibility headers

2024-11-12 Thread Edwin Lu
Committed! Edwin On 11/11/2024 11:02 AM, Jeff Law wrote: On 11/11/24 11:16 AM, Edwin Lu wrote: Since r15-4981-g5c34f02ba7e these tests have been failing on vector targets with excess errors due to the new deprecation warning message. Remove the header. gcc/testsuite/ChangeLog: * g++.t

Re: [PATCH v5] c: add Wzero-as-null-pointer-constant [PR117059]

2024-11-12 Thread Joseph Myers
On Tue, 12 Nov 2024, Martin Uecker wrote: > Added tests with some non-NPC pointers converted to bool. This version is OK. -- Joseph S. Myers josmy...@redhat.com

Re: [PATCH] i386: Add ix86_expand_integer_cst_argument

2024-11-12 Thread H.J. Lu
On Tue, Nov 12, 2024 at 9:30 PM Richard Biener wrote: > > On Tue, Nov 12, 2024 at 1:49 PM H.J. Lu wrote: > > > > When passing 0xff as an unsigned char function argument, the C frontend > > promotion will promote it to int: > > > > constant > > 255> > > > > and expand_normal always returns the r

Re: [PATCH v2 ] i386: Add ix86_expand_integer_cst_argument

2024-11-12 Thread Hongtao Liu
On Wed, Nov 13, 2024 at 8:29 AM H.J. Lu wrote: > > On Wed, Nov 13, 2024 at 5:57 AM H.J. Lu wrote: > > > > On Tue, Nov 12, 2024 at 9:30 PM Richard Biener > > wrote: > > > > > > On Tue, Nov 12, 2024 at 1:49 PM H.J. Lu wrote: > > > > > > > > When passing 0xff as an unsigned char function argument,

[PATCH] i386: Fix cstorebf4 fp comparison operand [PR117495]

2024-11-12 Thread Hongyu Wang
Hi, For cstorebf4 it uses comparison_operator for BFmode compare, which is incorrect when directly uses ix86_expand_setcc as it does not canonicalize the input comparison to correct the compare code by swapping operands. Since the original code without AVX10.2 calls emit_store_flag_force, who actu

[PATCH v2] RISC-V: Bugfix for max_sew_overlap_and_next_ratio_valid_for_prev_sew_p[pr117483]

2024-11-12 Thread Li Xu
From: xuli This patch fixs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117483 If prev and next satisfy the following rules, we should forbid the case (next.get_sew() < prev.get_sew() && (!next.get_ta() || !next.get_ma())) in the compatible function max_sew_overlap_and_next_ratio_valid_for_prev_

[committed] hppa: Fix decrement_and_branch_until_zero constraint

2024-11-12 Thread John David Anglin
Noticed reload1.cc was miscompiled with LRA. Tested on hppa-unknown-linux-gnu and hppa64-hp-hpux11.11. Committed to active branches. Dave --- hppa: Fix decrement_and_branch_until_zero constraint The third alternative for argument 4 needs to be an early clobber constraint. Noticed testing LRA.

[PATCHv3 2/3] ada: Fix GNU/Hurd priority range

2024-11-12 Thread Samuel Thibault
GNU/Mach currently uses a 0..63 range. gcc/ada/ChangeLog: * libgnat/system-gnu.ads: New file. * Makefile.rtl (x86-gnuhurd): Use libgnat/system-gnu.ads instead of libgnat/system-freebsd.ads. Signed-off-by: Samuel Thibault --- gcc/ada/Makefile.rtl | 2 +- gcc/

[PATCHv3 1/3] ada: Factorize bsd signal definitions

2024-11-12 Thread Samuel Thibault
They are all the same on all BSD-like systems (including GNU/Hurd). gcc/ada/ChangeLog: * libgnarl/a-intnam__freebsd.ads: Rename to... * libgnarl/a-intnam__bsd.ads: ... new file. * libgnarl/a-intnam__dragonfly.ads: Remove file. * Makefile.rtl (x86-kfreebsd, x86-gnuh

[PATCHv3 0/3] ada: Add GNU/Hurd x86_64 support

2024-11-12 Thread Samuel Thibault
Difference with v2: dropped the ChangeLog changes Samuel Thibault (3): ada: Factorize bsd signal definitions ada: Fix GNU/Hurd priority range ada: Add GNU/Hurd x86_64 support gcc/ada/Makefile.rtl | 48 +- ...-intnam__freebsd.ads => a-intnam__bsd.ads} | 2 +-

[PATCHv3 3/3] ada: Add GNU/Hurd x86_64 support

2024-11-12 Thread Samuel Thibault
This is essentially the same as the i386-pc-gnu section, the differences are the same as between freebsd i386 and freebsd x86_64. gcc/ada/ChangeLog: * Makefile.rtl: Add x86_64-pc-gnu section. Signed-off-by: Samuel Thibault --- gcc/ada/Makefile.rtl | 32

Re: [PATCHv2 0/3] ada: Add GNU/Hurd x86_64 support

2024-11-12 Thread Samuel Thibault
Hello, Marc Poulhiès, le mar. 12 nov. 2024 10:08:49 +0100, a ecrit: > I can take care of merging your changes when this is done, Thanks, I have sent v3. > I've checked and you're not listed in the FSF copyright assignment for > GCC. Maybe you are contributing this through your employer? If not,

[PATCH] Don't skip CodeView data for partially cold functions

2024-11-12 Thread Mark Harmstone
If a function is contained in two sections, for instance if it is partially cold, it gets a DW_AT_ranges attribute in its DIE rather than the normal DW_AT_low_pc and DW_AT_high_pc. There's no way to express this in CodeView, so rather than skipping the function entirely, use the labels in the firs

[PATCH] RISC-V: Bugfix for max_sew_overlap_and_next_ratio_valid_for_prev_sew_p[pr117483]

2024-11-12 Thread Li Xu
From: xuli This patch fixs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117483 If prev and next satisfy the following rules, we should forbid the case (next.get_sew() < prev.get_sew() && !next.get_ta()) in the compatible function max_sew_overlap_and_next_ratio_valid_for_prev_sew_p. Otherwise, th

Re: [Patch, fortran] PR105054 - [12/13/14/15 Regression] Using one kind of pointer functions causes the compiler to hang since r11-3029-g2b0df0a6ac79b34f

2024-11-12 Thread Jerry D
On 11/12/24 5:23 AM, Paul Richard Thomas wrote: Hi All, The ChangeLog and comment make it clear what this patch does and why. OK for mainline and backporting after a week or so? Regards Paul In the test case: A comment s/resul/result/ Also the test conditional if (trim (array_strings2(i

Re: [PATCH] Fix incorrect subreg mode check [PR117476]

2024-11-12 Thread Andrew Pinski
On Tue, Nov 12, 2024 at 4:43 PM Jeff Law wrote: > > > > On 11/12/24 11:31 AM, Alexey Merzlyakov wrote: > > Hi, Jeff, > > > > Oops... It looks like I've made a reply to Alex at the same time when > > you sent an e-mail update. > > > > So, moving the testcase to the gcc.dg/torture directory. > > > >

Re: [PATCH] RISC-V: Bugfix for max_sew_overlap_and_next_ratio_valid_for_prev_sew_p[pr117483]

2024-11-12 Thread 钟居哲
Do we need to check next.get_ma ? juzhe.zh...@rivai.ai From: Li Xu Date: 2024-11-13 08:57 To: gcc-patches CC: kito.cheng; palmer; juzhe.zhong; pan2.li; xuli Subject: [PATCH] RISC-V: Bugfix for max_sew_overlap_and_next_ratio_valid_for_prev_sew_p[pr117483] From: xuli This patch fixs https://

Re: [PATCH] Fix incorrect subreg mode check [PR117476]

2024-11-12 Thread Jeff Law
On 11/12/24 11:31 AM, Alexey Merzlyakov wrote: Hi, Jeff, Oops... It looks like I've made a reply to Alex at the same time when you sent an e-mail update. It happens. But as Zdenek's test showed, we've got one more issue to resolve :-) Hopefully my email gave you a solid pointer on what nee

Re: Re: [PATCH v2] RISC-V:Auto vect for vector-bfloat16

2024-11-12 Thread wangf...@eswincomputing.com
On 2024-11-13 07:30  Edwin Lu wrote: > >I took a look at the CI errors today since I remember Jeff checking the >CI output. I don't remember if the errors were the main things blocking >the patch or if there just wasn't any follow up. Juzhe suggested me to addd some run test case for this patch,

Re: [PATCH v2] aarch64: Optimise calls to ldexp with SVE FSCALE instruction [PR111733]

2024-11-12 Thread Soumya AR
> On 12 Nov 2024, at 4:27 PM, Richard Sandiford > wrote: > > External email: Use caution opening links or attachments > > > Soumya AR writes: >> diff --git a/gcc/config/aarch64/aarch64-sve.md >> b/gcc/config/aarch64/aarch64-sve.md >> index 06bd3e4bb2c..119a0e53853 100644 >> --- a/gcc/confi

Re: [PATCH] RISC-V: Fix target-attr-norelax.c testcase

2024-11-12 Thread Jeff Law
On 11/12/24 11:56 AM, Yangyu Chen wrote: The target-attr-norelax.c testcase was failing due to the redundant "\t" check in the assembly output, and forgot to skip the check for lto build in the testcase. Signed-off-by: Yangyu Chen gcc/testsuite/ChangeLog: * gcc.target/riscv/target-

Re: [PATCH] Add new hardreg PRE pass

2024-11-12 Thread Richard Sandiford
Sorry for the slow review. I think Jeff's much better placed to comment on this than I am, but here's a stab. Mostly it looks really good to me FWIW. Andrew Carlotti writes: > This pass is used to optimise assignments to the FPMR register in > aarch64. I chose to implement this as a middle-end

RE: [PATCH v1 1/2] Revert "Match: Simplify branch form 3 of unsigned SAT_ADD into branchless"

2024-11-12 Thread Li, Pan2
> Just the first patch - I didn't have time to look at the second one yet. I see, thanks a lot. Pan -Original Message- From: Richard Biener Sent: Tuesday, November 12, 2024 10:39 PM To: Li, Pan2 Cc: gcc-patches@gcc.gnu.org; tamar.christ...@arm.com; juzhe.zh...@rivai.ai; kito.ch...@gm

Re: [PATCH v3 0/8] SMALL code model fixes, optimization fixes, LTO and minimal C++ enablement

2024-11-12 Thread Richard Sandiford
Evgeny Karpov writes: > Hello, > > Thank you for reviewing v2! > v3 addresses all comments on v2. > > Changes in v3: > - Refactor implementation for the offset limit extension in > "symbol + offset" from 1MB to 16MB. > - Apply HOST_WIDE_INT_PRINT_UNSIGNED in ASM_OUTPUT_LOCAL. > - Exclude the "Di

[PATCH 9/10] docs: Add new AArch64 flags

2024-11-12 Thread Andrew Carlotti
gcc/ChangeLog: * doc/invoke.texi: Add new AArch64 flags. diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index 7146163d66d068522f5aa19f59badc1b05d05114..56186e98ca6a4d28d1c315746ade89cdc835219e 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -21439,11 +21439,11 @@

Re: [PATCH v4 4/7] OpenMP: C++ front-end support for dispatch + adjust_args

2024-11-12 Thread Paul-Antoine Arras
On 04/11/2024 14:57, Tobias Burnus wrote: Hi PA, Regarding the update middle end patch, included in this patch, i.e. v4.3-0002-OpenMP-middle-end-support-for-dispatch-adjust_arg.patch: @@ -4071,23 +4073,136 @@ gimplify_call_expr (tree *expr_p, gimple_seq *pre_p, bool want_value) [...] +

Re: [PATCH 1/2] Add suggested_epilogue_mode to vector costs

2024-11-12 Thread Jeff Law
On 11/11/24 5:16 AM, Richard Biener wrote: The following enables targets to suggest the vector mode to be used preferably for the epilogue of a vectorized loop. The patch also enables more than one vectorized epilogue in case the target suggests a vector mode for the epilogue of a vector epil

Re: [PATCH v2] AArch64: Block combine_and_move from creating FP literal loads

2024-11-12 Thread Wilco Dijkstra
Hi Richard, > The idea was that, if we did the split during expand, the movsf/df > define_insns would then only accept the immediates that their > constraints can handle. Right, always disallowing these immediates works fine too (it seems reload doesn't require all immediates to be valid), and th

Re: [PATCH] AArch64: Switch off early scheduling

2024-11-12 Thread Richard Sandiford
Wilco Dijkstra writes: > Hi, > What do you think about disabling late scheduling as well? >>> >>> I think this would definitely need separate consideration and evaluation >>> given the above. >>> >>> Another thing to consider is the macro fusion machinery. IIRC it works >>> during schedulin

Re: [PATCH v3 5/8] aarch64: Multiple adjustments to support the SMALL code model correctly

2024-11-12 Thread Richard Sandiford
Evgeny Karpov writes: > LOCAL_LABEL_PREFIX has been changed to help the assembly > compiler recognize local labels. Emitting locals has been > replaced with the .lcomm directive to declare uninitialized > data without defining an exact section. Functions and objects > were missing declarations. Bi

[PATCH] RISC-V: Fix target-attr-norelax.c testcase

2024-11-12 Thread Yangyu Chen
The target-attr-norelax.c testcase was failing due to the redundant "\t" check in the assembly output, and forgot to skip the check for lto build in the testcase. Signed-off-by: Yangyu Chen gcc/testsuite/ChangeLog: * gcc.target/riscv/target-attr-norelax.c: Fix testcase. --- gcc/testsui

[PATCH] Fix test failures for enum-alias-{1,2,3} on arm-eabi [PR117419]

2024-11-12 Thread Martin Uecker
I added a max element as suggested by Richard to force the type to an int. Regression tested on x86_64 but needs testing on arm-eabi. Thiago, could you test this? https://linaro.atlassian.net/browse/GNU-1224 Fix test failures for enum-alias-{1,2,3} on arm-eabi [PR117419] The tes

Re: [PATCH v3 6/8] aarch64: Extend the offset limit in "symbol + offset" from 1MB to 16MB

2024-11-12 Thread Richard Sandiford
Evgeny Karpov writes: > This patch allows using an offset of up to 16MB in "symbol + offset", > instead of 1MB limit that was used previously. > > gcc/ChangeLog: > > * config/aarch64/aarch64.cc (aarch64_load_symref_appropriately): > Update. > --- > gcc/config/aarch64/aarch64.cc | 19 +

[to-be-committed][RISC-V] Fix costing of LO_SUM expressions

2024-11-12 Thread Jeff Law
This is a rewrite of a patch originally from Xianmiao Qu. Xianmiao noticed that the costs we compute for LO_SUM expressions was incorrect. Essentially we costed based solely on the first input to the LO_SUM. In a LO_SUM, the first input is almost always going to be a REG and thus isn't intere

Re: [PATCH] AArch64: Switch off early scheduling

2024-11-12 Thread Wilco Dijkstra
Hi, >>> What do you think about disabling late scheduling as well? >> >> I think this would definitely need separate consideration and evaluation >> given the above. >> >> Another thing to consider is the macro fusion machinery. IIRC it works >> during scheduling so if we don’t run any schedulin

[PATCH] Add support for nonnull_if_nonzero attribute [PR117023]

2024-11-12 Thread Jakub Jelinek
Hi! As mentioned in an earlier thread, C2Y voted in a change which made various library APIs callable with NULL arguments in certain cases, e.g. memcpy (NULL, NULL, 0); is now valid, although memcpy (NULL, NULL, 1); remains invalid. This affects various APIs, including several of GCC builtins; pl

Re: [PATCH] Fix incorrect subreg mode check [PR117476]

2024-11-12 Thread Alexey Merzlyakov
Hi, Jeff, Oops... It looks like I've made a reply to Alex at the same time when you sent an e-mail update. So, moving the testcase to the gcc.dg/torture directory. On Tue, Nov 12, 2024 at 10:56:13AM -0700, Jeff Law wrote: > > I think it might be better to put the test in gcc.c-torture/execute, >

Re: [PATCH 0/10] aarch64: Add new flags for existing features

2024-11-12 Thread Andrew Carlotti
On Fri, Oct 04, 2024 at 06:50:36PM +0100, Andrew Carlotti wrote: > This patch series adds 7 new flags for features that were previously available > in GCC only as part of an architecture version. It also fixes one other > instance where an architecture version was used in a check instead of a > f

[Patch][v2] OpenMP: 'interop' construct - add C parser support, improve Fortran pasing

2024-11-12 Thread Tobias Burnus
Minor update: Main change is to use 'char' more consistently (e.g. for omp_get_fr_id_from_name and GOMP_INTEROP_IFR_UNKNOWN etc.) in the hope that it will fix the build bot issues for ARM. Additionally, I fixed some indentation "issues" in one testcase and in for C++, the __GOMP_UINTPTR_T_ENUM ma

Re: [PATCH] RISC-V: Fix target-attr-norelax.c testcase

2024-11-12 Thread Yangyu Chen
Sorry for the wrong address CC to Yulong. And this should add fixes: Fixes: 4bee5252c1de ("RISC-V: Add norelax function attribute")

[pushed: r15-5179] selftests: clear GCC_COLORS [PR117503]

2024-11-12 Thread David Malcolm
Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu. Pushed to trunk as r15-5179-g169897bb402c46. gcc/ChangeLog: PR bootstrap/117503 * Makefile.in (GCC_FOR_SELFTESTS): Set GCC_COLORS=. Signed-off-by: David Malcolm --- gcc/Makefile.in | 2 +- 1 file changed, 1 insertion

[PATCH v3 ] i386: Add ix86_expand_integer_cst_argument

2024-11-12 Thread H.J. Lu
On Wed, Nov 13, 2024 at 11:25 AM H.J. Lu wrote: > > On Wed, Nov 13, 2024 at 10:23 AM Hongtao Liu wrote: > > > > On Wed, Nov 13, 2024 at 8:29 AM H.J. Lu wrote: > > > > > > On Wed, Nov 13, 2024 at 5:57 AM H.J. Lu wrote: > > > > > > > > On Tue, Nov 12, 2024 at 9:30 PM Richard Biener > > > > wrote

Re: [PATCH v2] aarch64: Optimise calls to ldexp with SVE FSCALE instruction [PR111733]

2024-11-12 Thread Richard Sandiford
Soumya AR writes: > diff --git a/gcc/config/aarch64/aarch64-sve.md > b/gcc/config/aarch64/aarch64-sve.md > index 06bd3e4bb2c..119a0e53853 100644 > --- a/gcc/config/aarch64/aarch64-sve.md > +++ b/gcc/config/aarch64/aarch64-sve.md > @@ -5088,6 +5088,21 @@ > ;; - FTSSEL > ;; --

Re: [PATCH] testsuite: Adjust jump threading test expectation

2024-11-12 Thread Andrew Carlotti
On Wed, Nov 06, 2024 at 02:28:39PM -0800, Andrew Pinski wrote: > On Tue, Nov 5, 2024 at 4:53 AM Andrew Carlotti > wrote: > > > > This test started failing on aarch64 after 0cfc9c95 in 2023 ("Phi > > analyzer - Initialize with range instead of a tree."). > > > > The only change visible in the pass

Re: [PATCH] c++, dyninit, v3: Optimize C++ dynamic initialization by constants into DECL_INITIAL adjustment [PR102876]

2024-11-12 Thread Jason Merrill
On 11/11/24 3:43 AM, Jakub Jelinek wrote: Hi! I'd like to ping the https://gcc.gnu.org/pipermail/gcc-patches/2022-January/588539.html patch. Previous mails on this topic https://gcc.gnu.org/pipermail/gcc-patches/2021-November/thread.html#583289 https://gcc.gnu.org/pipermail/gcc-patches/2021-Dece

Re: Implement removal of malloc/free pairs with NULL check

2024-11-12 Thread Jan Hubicka
> Hi, > this is updated patch which adds -fmalloc-dce flag to control malloc/free > removal. I ended up copying what -fallocation-dse does so -fmalloc-dce=1 > enables malloc/free removal provided return value is unused otherwise and > -fmalloc-dce=2 allows additional NULL pointer checks which it f

Re: [PATCH] c++, dyninit, v3: Optimize C++ dynamic initialization by constants into DECL_INITIAL adjustment [PR102876]

2024-11-12 Thread Jakub Jelinek
On Tue, Nov 12, 2024 at 10:18:49AM -0500, Jason Merrill wrote: > Why the v3 tag in the subject line? I don't see any libstdc++ changes. 3rd version of the patch. That has nothing to do with libstdc++. > > + if (optimize && !optimize_debug && !guard_if_stmt && !sanitize) > > Why suppress th

[PATCH v3 1/8] Support weak references

2024-11-12 Thread Evgeny Karpov
The patch adds support for weak references. The original MinGW implementation targets ix86, which handles weak symbols differently compared to AArch64. In AArch64, the weak symbols are replaced by other symbols which reference the original weak symbols, and the compiler does not track the original

[PATCH v3 0/8] SMALL code model fixes, optimization fixes, LTO and minimal C++ enablement

2024-11-12 Thread Evgeny Karpov
Hello, Thank you for reviewing v2! v3 addresses all comments on v2. Changes in v3: - Refactor implementation for the offset limit extension in "symbol + offset" from 1MB to 16MB. - Apply HOST_WIDE_INT_PRINT_UNSIGNED in ASM_OUTPUT_LOCAL. - Exclude the "Disable the anchors" patch as it is not nee

[PATCH v3 2/8] aarch64: Add debugging information

2024-11-12 Thread Evgeny Karpov
This patch enables DWARF and allows compilation with debugging information by using "gcc -g". The unwind info is disabled for the moment and will be revisited after SEH implementation for the target. gcc/ChangeLog: * config/aarch64/aarch64.cc (TARGET_ASM_UNALIGNED_HI_OP): Enable D

[PATCH v3 3/8] aarch64: Add minimal C++ support

2024-11-12 Thread Evgeny Karpov
The patch resolves compilation issues for the C++ language. Previous patch series contributed to C++ as well, however, C++ could not be tested until we got a C++ compiler and could build at least a "Hello World" C++ program, and in reality, more than that. Another issue has been fixed in the libst

[PATCH v3 4/8] aarch64: Exclude symbols using GOT from code models

2024-11-12 Thread Evgeny Karpov
Symbols using GOT are not supported by the aarch64-w64-mingw32 target and should be excluded from the code models. gcc/ChangeLog: * config/aarch64/aarch64.cc (aarch64_classify_symbol): Disable GOT for PECOFF target. --- gcc/config/aarch64/aarch64.cc | 6 -- 1 file changed, 4

[COMMITTED 21/30] ada: Remove obsolete ??? comment about Assignment_OK flag

2024-11-12 Thread Marc Poulhiès
From: Eric Botcazou The flagged use has apparently disappeared for long. gcc/ada/ChangeLog: * sinfo.ads (Assignment_OK): Remove obsolete ??? comment. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/sinfo.ads | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-)

[COMMITTED 28/30] ada: Accept SPARK.Big_Integers.Big_Integer where Big_Integer is accepted

2024-11-12 Thread Marc Poulhiès
From: Piotr Trojanek For certification of a light SPARK runtime libraries we now accept expressions of type SPARK.Big_Integers.Big_Integer in subprogram and loop variants. gcc/ada/ChangeLog: * exp_util.adb (Make_Variant_Comparison): Accept new types in expansion. * rtsfi

[COMMITTED 15/30] ada: Spurious error on abstract primitive with access formals

2024-11-12 Thread Marc Poulhiès
From: squirek This patch fixes an issue in the compiler whereby using anonymous access types as abstract overridden subprogram formals for a derived abtract type may lead to compile-time errors. gcc/ada/ChangeLog: * accessibility.adb (Type_Access_Level): Add handling for subprog

[COMMITTED 27/30] ada: Make Interrupt and Attach Handlers Obsolescent in VXWorks

2024-11-12 Thread Marc Poulhiès
From: Viljar Indus In order to trigger an obsolescent feature warning in VXWorks if either the pragma or aspect of Interrupt_Handler or Attach_Handler is used, the spec of the Register_Interrupt_Handler method needs to be marked as obsolescent in a VXWorks specific version of the file. gcc/ada/C

[COMMITTED 19/30] ada: Improve message for misused implicitly-defined preprocessor symbol.

2024-11-12 Thread Marc Poulhiès
From: Steve Baird If the -u option is specified, then otherwise-undefined preprocessor symbols are implicitly defined to be False. If such an implicitly-defined symbol is then incorrectly used in a context that requires an integer value, the resulting error message should not incorrectly state th

[COMMITTED 02/10] ada: Fix assertion failure on illegal use of aspect Type_Invariant

2024-11-12 Thread Marc Poulhiès
From: Eric Botcazou The illegal use is on a type derived from a formal private type, e.g.: generic type T is private; package G is type D is new T with Type_Invariant => True; end G; gcc/ada/ChangeLog: PR ada/113037 * sem_prag.adb (Analyze_Pragma) : Reject types

[COMMITTED 06/30] ada: Add Ada coverage instrumentation support

2024-11-12 Thread Marc Poulhiès
From: Ronan Desplanques gcc/ada/ChangeLog: * gnat2.gpr: New file. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/gnat2.gpr | 54 +++ 1 file changed, 54 insertions(+) create mode 100644 gcc/ada/gnat2.gpr diff --git a/gcc/ad

[COMMITTED 12/30] ada: Fix internal error on nested iterated component associations

2024-11-12 Thread Marc Poulhiès
From: Eric Botcazou The problem is that Insert_Actions gets confused as to where it should insert actions coming from within an N_Iterated_Component_Association, because some actions may be generated during semantic analysis and some others during expansion. Instead of another ad-hoc fix, this c

[COMMITTED 26/30] ada: Fix bogus error for delta aggregate as expression function

2024-11-12 Thread Marc Poulhiès
From: Eric Botcazou The compiler correctly accepts the other forms of aggregates. gcc/ada/ChangeLog: PR ada/113868 * par-ch6.adb (P_Subprogram) : Add delta aggregate alongside the other forms of aggregates. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/a

[COMMITTED 14/30] ada: Missing runtime tag check on mutably tagged objects

2024-11-12 Thread Marc Poulhiès
From: squirek This patch fixes an issue in the compiler whereby assigning to a non-existant mutably tagged object component failed to result in the expected run-time exception. gcc/ada/ChangeLog: * exp_ch4.adb (Expand_N_Type_Conversion): Add special runtime check generation for

[COMMITTED 09/10] ada: Compile time crash on limited object in extended return

2024-11-12 Thread Marc Poulhiès
From: squirek This patch fixes an error in the compiler whereby using an extended return on an object of limited tagged type which extends a tagged protected type may lead to a compile-time crash. gcc/ada/ChangeLog: * exp_ch3.adb (Build_Assignment): Add condition to fetch corresponding

[COMMITTED 17/30] ada: Set correct minimum stack size for aarch64-linux

2024-11-12 Thread Marc Poulhiès
From: Johannes Kliemann The minimum stack size defined by PTHREAD_STACK_MIN defined on AArch64 Linux is 131072 bytes. Add a separate version for this target to reflect that value. Previously the x86-64 value of 16384 bytes was used. gcc/ada/ChangeLog: * Makefile.rtl: Use libgnat/s-param

[COMMITTED 29/30] ada: Fix premature finalization of anonymous access result from library function

2024-11-12 Thread Marc Poulhiès
From: Eric Botcazou In GNAT's implementation, the finalization of controlled objects created through anonymous access types occurs when the enclosing library unit goes out of scope if this is safe, and never occurs otherwise. The case of a function that is a library unit with an anonymous access

[COMMITTED 25/30] ada: Remove couple of irregular calls to Resolve_Aggr_Expr

2024-11-12 Thread Marc Poulhiès
From: Eric Botcazou The function is supposed to be passed an expression, but it is passed the enclosing N_Component_Association node in a couple of cases, only to give an error that can as well be given in the caller, at the cost of bypasses to disable most of its processing. gcc/ada/ChangeLog:

[COMMITTED 23/30] ada: Fix markup typos

2024-11-12 Thread Marc Poulhiès
From: Richard Kenner gcc/ada/ChangeLog: * doc/gnat_ugn/building_executable_programs_with_gnat.rst: Fix minor markup errors. * doc/gnat_ugn/gnat_utility_programs.rst: Likewise. * gnat_ugn.texi: Regenerate. Tested on x86_64-pc-linux-gnu, committed on master. ---

[COMMITTED 20/30] ada: Get rid of Kill_Range_Checks flag on entities

2024-11-12 Thread Marc Poulhiès
From: Eric Botcazou This flag is set in a single context, namely semantic analysis of record type definitions, to avoid generating spurious range checks from it, and a large testing campaign showed that, in practice, it makes a difference in a single case, namely an access-to-constrained-array co

[COMMITTED 03/10] ada: Fix internal error on invalid prefix with assertions enabled

2024-11-12 Thread Marc Poulhiès
From: Eric Botcazou This happens for example with: package Q3 is type Types is (One, Two); end Q3; with Q3; package P3 is Kind : Q3.Types := Q3.Types.One; end P3; and prevents the error from being given. gcc/ada/ChangeLog: PR ada/112979 * sem_ch8.adb (Find_Selected_Compo

[COMMITTED 24/30] ada: Allow file mapping for System's spec

2024-11-12 Thread Marc Poulhiès
From: Ronan Desplanques Before this patch, it was never allowed to use pragma Source_File_Name for the spec of System, allegedly because Targparm.Get_Target_Parameters is called before configuration pragmas are processed. Using a mapping file was allowed but did not work correctly. This patch ma

[COMMITTED 04/10] ada: Get rid of N_Unchecked_Expression node

2024-11-12 Thread Marc Poulhiès
From: Eric Botcazou This node is used in a single place in the front-end: it wraps the newly built N_Indexed_Component nodes on the left-hand side of assignments generated to elaborate array aggregates, and its effect is to disable range checks for the expressions of these nodes. Most of the cod

[COMMITTED 08/10] ada: Fix spurious error on iterated component association with large index type

2024-11-12 Thread Marc Poulhiès
From: Eric Botcazou This is only for the Ada 2022 form of the iterated component association. gcc/ada/ChangeLog: * exp_aggr.adb (Two_Pass_Aggregate_Expansion): Use a type sized from the index type to compute the length. Simplify and remove useless calls to New_Copy_Tree

[COMMITTED 10/10] ada: Typo fix in comment

2024-11-12 Thread Marc Poulhiès
gcc/ada/ChangeLog: * gcc-interface/Makefile.in: Remove extra 'with'. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/gcc-interface/Makefile.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/ada/gcc-interface/Makefile.in b/gcc/ada/gcc-interface/M

Re: [PATCH] Add fancy pointer support in std::map/set

2024-11-12 Thread Jonathan Wakely
On Mon, 4 Nov 2024 at 21:34, François Dumont wrote: > > > On 04/11/2024 19:45, Jonathan Wakely wrote: > > On Mon, 4 Nov 2024 at 18:30, François Dumont wrote: > >> > >> On 21/10/2024 06:56, François Dumont wrote: > >> > >> > >> On 17/10/2024 23:11, Jonathan Wakely wrote: > >> > >> > >> > >> On Thu

Add testcase that we optimize away empty std::vector

2024-11-12 Thread Jan Hubicka
Hi, with __builtin_operator_new we now can optimize away unused std::vectors. This adds testcases mentioned in the PR. Regtested x86_64-linux and comitted. PR tree-optimization/96945 gcc/testsuite/ChangeLog: * g++.dg/tree-ssa/pr96945.C: New test. diff --git a/gcc/testsuite/g++.

Re: Add testcase that we optimize away empty std::vector

2024-11-12 Thread Jakub Jelinek
On Tue, Nov 12, 2024 at 04:00:03PM +0100, Jan Hubicka wrote: > Hi, > with __builtin_operator_new we now can optimize away unused std::vectors. > This adds testcases mentioned in the PR. > > Regtested x86_64-linux and comitted. > > PR tree-optimization/96945 > > gcc/testsuite/ChangeLog: >

Clarify libgomp nvptx 'omp_low_lat_mem_space' documentation (was: [PATCH v2 1/3] libgomp, nvptx: low-latency memory allocator)

2024-11-12 Thread Thomas Schwinge
Hi! On 2023-09-08T11:04:24+0200, Tobias Burnus wrote: > On 02.08.23 19:00, Andrew Stubbs wrote: >> The use of the PTX dynamic_smem_size feature means that low-latency allocator >> will not work with the PTX 3.1 multilib. Right: PTX '%dynamic_smem_size' was "Introduced in PTX ISA version 4.1", an

[PATCH v3 5/8] aarch64: Multiple adjustments to support the SMALL code model correctly

2024-11-12 Thread Evgeny Karpov
LOCAL_LABEL_PREFIX has been changed to help the assembly compiler recognize local labels. Emitting locals has been replaced with the .lcomm directive to declare uninitialized data without defining an exact section. Functions and objects were missing declarations. Binutils was not able to distinguis

[PATCH v3 7/8] Add LTO support

2024-11-12 Thread Evgeny Karpov
The patch reuses the configuration for LTO from ix86 and adds the aarch64 architecture to the list of supported COFF headers. gcc/ChangeLog: * config/aarch64/cygming.h (TARGET_ASM_LTO_START): New. (TARGET_ASM_LTO_END): Likewise. * config/i386/cygming.h (TARGET_ASM_LTO_STAR

Re: [pushed] c++: reduce unnecessary tree_common

2024-11-12 Thread Jason Merrill
On 11/12/24 2:55 AM, Richard Biener wrote: On Mon, Nov 11, 2024 at 5:33 PM Jason Merrill wrote: Don't you need to adjust cp_common_init_ts () as well for this? Oddly enough PTRMEM_CST is already TS_TYPED there and others are not adjusted at all. Right, this patch fixed the type definitions t

[PATCH v3 6/8] aarch64: Extend the offset limit in "symbol + offset" from 1MB to 16MB

2024-11-12 Thread Evgeny Karpov
This patch allows using an offset of up to 16MB in "symbol + offset", instead of 1MB limit that was used previously. gcc/ChangeLog: * config/aarch64/aarch64.cc (aarch64_load_symref_appropriately): Update. --- gcc/config/aarch64/aarch64.cc | 19 +++ 1 file changed,

  1   2   >