[patch,avr,applied] Tweak comparisons with constant

2024-08-01 Thread Georg-Johann Lay
Applied this tweak to the 16-bit and 32-bit comparisons. Johann -- gcc/ * config/avr/constraints.md (YMM): New constraint. * config/avr/avr.md (cmp3, *cmp3) (cbranch4_insn): Allow YMM where M is allowed. (cbranch4_insn): Split to a test of the high part

Re: [Patch] libgomp: Device load_image - minor num-funcs/vars check improvement

2024-08-01 Thread Tobias Burnus
I have sent the following page in February (Stage 4) and didn't want to commit it back then. But for Stage 1, it should be fine ... I like to commit it tomorrow, unless there are comments suggesting other. Attached is the unchanged patch and I also added a "diff -w -U1" patch as

Re: [PATCH] Fix mismatch between constraint and predicate for ashl3_doubleword.

2024-08-01 Thread Uros Bizjak
perand:DWI 0 "register_operand" "=,") > (ashift:DWI (match_operand:DWI 1 "reg_or_pm1_operand" "0n,r") > (match_operand:QI 2 "nonmemory_operand" "c,c"))) > > The patch fixes the mismatch between con

[PATCH 1/1] Initial support for AVX10.2

2024-08-01 Thread Haochen Jiang
gcc/ChangeLog: * common/config/i386/cpuinfo.h (get_available_features): Handle avx10.2. * common/config/i386/i386-common.cc (OPTION_MASK_ISA2_AVX10_2_256_SET): New. (OPTION_MASK_ISA2_AVX10_2_512_SET): Ditto. (OPTION_MASK_ISA2_AVX10_1_256_UNSET):

[PATCH 0/1] Initial support for AVX10.2

2024-08-01 Thread Haochen Jiang
weeks, we plan to upstream ymm rounding part first, following by new instructions. After all of them upstreamed, we will also upstream several patches optimizing codegen with new AVX10.2 instructions. The patch coming next is the initial support for AVX10.2. This patch will be the foundation of all

Re: [PATCH] middle-end/114563 - improve release_pages

2024-08-01 Thread Richard Biener
on x86_64-unknown-linux-gnu. > > > > I've CCed people messing with release_pages; This doesn't really > > address PR114563 but I thought I post this patch anyway - the > > actual issue we run into for the PR is the linear search of > > G.free_pages when that list bec

Re: [PATCH v2] match: Fix wrong code due to `(a ? e : f) !=/== (b ? e : f)` patterns [PR116120]

2024-08-01 Thread Richard Biener
also need to make sure `a`, `b` and the resulting types > are all > the same for the same reason as the previous patch. > > I updated (well added) to the testcases to make sure there are the right > amount of > comparisons left. > > Changes since v1: > * v2: Fixed the t

Re: [PATCH] testsuite: Adjust fam-in-union-alone-in-struct-2.c to support BE [PR116148]

2024-08-01 Thread Richard Biener
t; > > > As Andrew pointed out in PR116148, fam-in-union-alone-in-struct-2.c > > was designed for little-endian, the recent commit r15-2403 made it > > be tested with running on BE and PR116148 got exposed. > > > > This patch is to adjust the expected data for members

Re: [Patch, libgfortran] PR105361 Followup fix to test case

2024-08-01 Thread Andre Vehreschild
Hi Jerry, looks fine to me. The change is so small that I see no harm, ok to merge. Thanks for the patch. - Andre On Wed, 31 Jul 2024 09:08:54 -0700 Jerry D wrote: > I plan to push this soon to hopefully fix some test breakage on some > architetures. It is simple and obvious. I did n

Re: [PATCH] Fix mismatch between constraint and predicate for ashl3_doubleword.

2024-08-01 Thread Hongtao Liu
rand:DWI 1 "reg_or_pm1_operand" "0n,r") > (match_operand:QI 2 "nonmemory_operand" "c,c"))) > > The patch fixes the mismatch between constraint and predicate. > > Bootstrapped and regtested on x86_64-pc-linux-gnu{-m32,}. > Ok for

Re: [PATCH] i386: Fix memory constraint for APX NF

2024-07-31 Thread Hongtao Liu
On Thu, Aug 1, 2024 at 10:03 AM Kong, Lingling wrote: > > > > > -Original Message- > > From: Liu, Hongtao > > Sent: Thursday, August 1, 2024 9:35 AM > > To: Kong, Lingling ; gcc-patches@gcc.gnu.org > > Cc: Wang, Hongyu > > Subject: RE: [

Re: [PATCH] MATCH: add abs support for half float

2024-07-31 Thread Kugan Vivekanandarajah
; > goto ; [41.00%] > > > > else > > > > goto ; [59.00%] > > > >[local count: 440234144]:\ > > > > _4 = -x_3(D); > > > >[local count: 1073741824]: > > > > # _2 = PHI <_4(3), x_3(D)(2)> > >

Re: [PATCH] rs6000, document built-ins vec_test_lsbb_all_ones and, vec_test_lsbb_all_zeros

2024-07-31 Thread Kewen.Lin
t;>> vec_test_lsbb_all_zeros built-ins are not documented in the GCC >>> documentation file. >>> >>> The following patch adds missing documentation for the >>> vec_test_lsbb_all_ones and, vec_test_ls

[COMMITTED] Re: Re: [PATCH] RISC-V: NFC: Do not use zicond for pr105314 testcases

2024-07-31 Thread Xiao Zeng
t;    * gcc.target/riscv/pr105314-rtl.c: Skip zicond. >>>>    * gcc.target/riscv/pr105314-rtl32.c: Dotto. >>>>    * gcc.target/riscv/pr105314.c: Dotto. >>> Why do you want to skip zicond for this test? >> Yes, I should provide as detaile

RE: [PATCH] i386: Fix memory constraint for APX NF

2024-07-31 Thread Kong, Lingling
> -Original Message- > From: Liu, Hongtao > Sent: Thursday, August 1, 2024 9:35 AM > To: Kong, Lingling ; gcc-patches@gcc.gnu.org > Cc: Wang, Hongyu > Subject: RE: [PATCH] i386: Fix memory constraint for APX NF > > > > > -Original Message- &

Re: [PATCH] RISC-V: NFC: Do not use zicond for pr105314 testcases

2024-07-31 Thread Jeff Law
.c: Dotto. Why do you want to skip zicond for this test? Yes, I should provide as detailed a description as possible for each submitted patch. Jeff riscv64-unknown-linux-gnu-gcc  -O2 -march=rv64gc_zicond -mabi=lp64d ../gcc/testsuite/gcc.target/riscv/pr105314.c -fdump-rtl-ce1 -S -o pr105314.c.S

RE: [PATCH] i386: Fix memory constraint for APX NF

2024-07-31 Thread Liu, Hongtao
> -Original Message- > From: Kong, Lingling > Sent: Thursday, August 1, 2024 9:30 AM > To: gcc-patches@gcc.gnu.org > Cc: Liu, Hongtao ; Wang, Hongyu > > Subject: [PATCH] i386: Fix memory constraint for APX NF > > The je constraint should be used for APX N

[PATCH] i386: Fix memory constraint for APX NF

2024-07-31 Thread Kong, Lingling
The je constraint should be used for APX NDD ADD with register source operand. The jM is for APX NDD patterns with immediate operand. Bootstrapped and regtested on x86_64-pc-linux-gnu{-m32,}. Ok for trunk? gcc/ChangeLog: * config/i386/i386.md (nf_mem_constraint): Fixed the constraint

Re: [PATCH] LoongArch: Rework bswap{hi,si,di}2 definition

2024-07-31 Thread Lulu Cheng
r revh.{2w,d} instructions. This optimization is really ingenious and I have no problem. I also haven't figured out how to generate revb.4h or revh. {2w,d}. I think we can merge this patch first. Pushed r15-2433. Ok. Thanks! FWIW I tried a naive pattern for revh.2w: (set (match_

[PATCH] testsuite: add print-stack.exp

2024-07-31 Thread David Malcolm
I wrote this support file to help me debug Tcl issues in the testsuite. Adding a call to: print_stack_backtrace somewhere in a .exp file (along with "load_lib print-stack.exp") leads to the interpreter printing a backtrace in a form that e.g. Emacs can consume, with filename:linenum: lines,

RE: [PATCH] aarch64: Improve Advanced SIMD popcount expansion by using SVE [PR113860]

2024-07-31 Thread Pengxuan Zheng (QUIC)
> Sorry for the slow review. > > Pengxuan Zheng writes: > > This patch improves the Advanced SIMD popcount expansion by using SVE > > if available. > > > > For example, GCC currently generates the following code sequence for V2DI: > > cnt v31.16b

[PATCH v2] aarch64: Improve Advanced SIMD popcount expansion by using SVE [PR113860]

2024-07-31 Thread Pengxuan Zheng
This patch improves the Advanced SIMD popcount expansion by using SVE if available. For example, GCC currently generates the following code sequence for V2DI: cnt v31.16b, v31.16b uaddlp v31.8h, v31.16b uaddlp v31.4s, v31.8h uaddlp v31.2d, v31.4s However, by using SVE, we can

[PATCH v2] aarch64: Improve Advanced SIMD popcount expansion by using SVE [PR113860]

2024-07-31 Thread Pengxuan Zheng
This patch improves the Advanced SIMD popcount expansion by using SVE if available. For example, GCC currently generates the following code sequence for V2DI: cnt v31.16b, v31.16b uaddlp v31.8h, v31.16b uaddlp v31.4s, v31.8h uaddlp v31.2d, v31.4s However, by using SVE, we can

[PATCH v2] aarch64: Improve Advanced SIMD popcount expansion by using SVE [PR113860]

2024-07-31 Thread Pengxuan Zheng
This has been approved and will be committed if there's no other comments in a day.

[PATCH v2] match: Fix wrong code due to `(a ? e : f) !=/== (b ? e : f)` patterns [PR116120]

2024-07-31 Thread Andrew Pinski
ere too. This still produces better code than the original case and in many cases (x != y) will still reduce to either false or true. With this change we also need to make sure `a`, `b` and the resulting types are all the same for the same reason as the previous patch. I updated (well added) to the te

Re: Ping^6: [PATCH 0/2] Fix two test failures with --enable-default-pie [PR70150]

2024-07-31 Thread Joseph Myers
On Mon, 22 Jul 2024, Xi Ruoyao wrote: > On Mon, 2024-05-06 at 12:45 +0800, Xi Ruoyao wrote: > > In GCC 14.1-rc1, there are two new (comparing to GCC 13) failures if > > the build is configured --enable-default-pie.  Let's fix them. > > > > Tested on x86_64-linux-gnu.  Ok for trunk and

Re: [PATCH] libstdc++: Fix future.wait_until when given a negative time_point

2024-07-31 Thread Jonathan Wakely
0 and nanosecond < 1. Thanks for the patch, it looks correct. The futex syscall returns EINVAL in this case, which we don't handle, so the caller loops and keeps calling the syscall again, which fails again the same way. I think it would be good to mention EINVAL, e.g. "will raise an EINVAL error

Re: [PATCH v2] c++/coroutines: only defer expanding co_{await,return,yield} if dependent [PR112341]

2024-07-31 Thread Jason Merrill
On 7/31/24 3:56 PM, Arsen Arsenović wrote: Okay, I've reworked it, and it built and passed coroutine tests. Regstrapping overnight. Is the following OK with you? OK. -- >8 -- By doing so, we can get diagnostics in template decls when we know we can. For instance, in the

Re: [PATCH ver 2] rs6000, Add new overloaded vector shift builtin int128, varients

2024-07-31 Thread Carl Love
Kewen: On 7/29/24 3:21 AM, Kewen.Lin wrote: +@smallexample +@exdent vector signed __int128 vec_sld (vector signed __int128, +vector signed __int128, const unsigned int); +@exdent vector unsigned __int128 vec_sld (vector unsigned __int128, +vector unsigned __int128, const unsigned int);

Re: [PATCH v2] c: Add support for byte arrays in C2Y

2024-07-31 Thread Joseph Myers
On Sat, 13 Jul 2024, Martin Uecker wrote: > This marks structures which include a byte array > as typeless storage for all C language modes. > > > Bootstrapped and regression tested on x86_64. > > > > > c: Add support for byte arrays in C2Y > > To get correct aliasing behavior

Re: [RFC/RFA] [PATCH v2 09/12] Add symbolic execution support.

2024-07-31 Thread Andrew Pinski
On Wed, Jul 31, 2024 at 3:42 AM Mariam Arutunian wrote: > > Gives an opportunity to execute the code on bit level, >assigning symbolic values to the variables which don't have initial values. >Supports only CRC specific operations. > >Example: > >uint8_t crc; >uint8_t pol

[PATCH 1/8] fortran: Add tests covering inline MINLOC/MAXLOC without DIM [PR90608]

2024-07-31 Thread Mikael Morin
From: Mikael Morin Tested on x86_64-pc-linux-gnu. OK for master? -- >8 -- Add the tests covering the various cases for which we are about to implement inline expansion of MINLOC and MAXLOC. Those are cases where the DIM argument is not present. PR fortran/90608

[PATCH 6/8] fortran: Inline integral MINLOC/MAXLOC with no DIM and scalar MASK [PR90608]

2024-07-31 Thread Mikael Morin
From: Mikael Morin Regression-tested on x86_64-pc-linux-gnu. OK for master? -- >8 -- Enable the generation of inline code for MINLOC/MAXLOC when argument ARRAY is of integral type, DIM is not present, and MASK is present and is scalar (only absent MASK or rank 1 ARRAY were inlined before).

[PATCH 8/8] fortran: Continue MINLOC/MAXLOC second loop where the first stopped [PR90608]

2024-07-31 Thread Mikael Morin
From: Mikael Morin Regression-tested on x86_64-pc-linux-gnu. OK for master? -- >8 -- Continue the second set of loops where the first one stopped in the generated inline MINLOC/MAXLOC code in the cases where the generated code contains two sets of loops. This fixes a regression that was

[PATCH 4/8] fortran: Outline array bound check generation code

2024-07-31 Thread Mikael Morin
From: Mikael Morin The next patch will need reindenting of the array bound check generation code. This outlines it to its own function beforehand, reducing the churn in the next patch. Regression-tested on x86_64-pc-linux-gnu. OK for master? -- >8 -- gcc/fortran/ChangeLog: * tr

[PATCH 0/8] fortran: Inline MINLOC/MAXLOC without DIM argument [PR90608]

2024-07-31 Thread Mikael Morin
predicate which evolves with the patches. They have been generated on top of the patch: https://gcc.gnu.org/pipermail/gcc-patches/2024-July/657959.html Mikael Morin (8): fortran: Add tests covering inline MINLOC/MAXLOC without DIM [PR90608] fortran: Disable frontend passes for inlinable MINLOC

[PATCH 3/8] fortran: Inline MINLOC/MAXLOC with no DIM and ARRAY of rank 1 [PR90608]

2024-07-31 Thread Mikael Morin
From: Mikael Morin Regression-tested on x86_64-pc-linux-gnu. OK for master? -- >8 -- Enable inline code generation for the MINLOC and MAXLOC intrinsic, if the DIM argument is not present and ARRAY has rank 1. This case is similar to the case where the result is scalar (DIM present and rank 1

[PATCH 5/8] fortran: Inline integral MINLOC/MAXLOC with no DIM and no MASK [PR90608]

2024-07-31 Thread Mikael Morin
From: Mikael Morin Regression-tested on x86_64-pc-linux-gnu. OK for master? -- >8 -- Enable generation of inline code for the MINLOC and MAXLOC intrinsic, if the ARRAY argument is of integral type and of any rank (only the rank 1 case was previously inlined), and neither DIM nor MASK arguments

[PATCH 7/8] fortran: Inline non-character MINLOC/MAXLOC with no DIM [PR90608]

2024-07-31 Thread Mikael Morin
From: Mikael Morin Regression-tested on x86_64-pc-linux-gnu. OK for master? -- >8 -- Enable generation of inline MINLOC/MAXLOC code in the case where DIM is not present, and either ARRAY is of floating point type or MASK is an array. Those cases are the remaining bits to fully support

[PATCH 2/8] fortran: Disable frontend passes for inlinable MINLOC/MAXLOC [PR90608]

2024-07-31 Thread Mikael Morin
From: Mikael Morin Regression-tested on x86_64-pc-linux-gnu. OK for master? -- >8 -- Disable rewriting of MINLOC/MAXLOC expressions for which inline code generation is supported. Update the gfc_inline_intrinsic_function_p predicate (already existing) for that, with the current state of

[PATCH v2] c++/coroutines: only defer expanding co_{await,return,yield} if dependent [PR112341]

2024-07-31 Thread Arsen Arsenović
Okay, I've reworked it, and it built and passed coroutine tests. Regstrapping overnight. Is the following OK with you? -- >8 -- By doing so, we can get diagnostics in template decls when we know we can. For instance, in the following: awaitable g(); template task f() {

Re: [PATCH 2/2] match: Fix wrong code due to `(a ? e : f) !=/== (b ? e : f)` patterns [PR116120]

2024-07-31 Thread Andrew Pinski
ue. > > > > With this change we also need to make sure `a`, `b` and the resulting types > > are all > > the same for the same reason as the previous patch. > > > > I updated (well added) to the testcases to make sure there are the right > > amount of > >

Re: [PATCH] aarch64: Fuse CMP+CSEL and CMP+CSET for -mcpu=neoverse-v2

2024-07-31 Thread Richard Sandiford
Jennifer Schmitz writes: > Thanks for the feedback! I updated the patch based on your comments, more > detailed comments inline below. The updated version was bootstrapped and > tested again, no regression. > Best, > Jennifer > > From 89936b7bc2de7a1e4bc55c3a1e8d5e6ac0de579

Re: [PATCH 8/8]AArch64: take gather/scatter decode overhead into account

2024-07-31 Thread Kyrylo Tkachov
/ChangeLog: > >* config/aarch64/aarch64-protos.h (struct sve_vec_cost): Add >gather_load_x32_init_cost and gather_load_x64_init_cost. >* config/aarch64/aarch64.cc (aarch64_vector_costs): Add >m_sve_gather_scatter_init_cost. >(aarch64_vector_c

Re: [PATCH] c++/coroutines: only defer expanding co_{await,return,yield} if dependent [PR112341]

2024-07-31 Thread Arsen Arsenović
Jason Merrill writes: > On 7/31/24 6:54 AM, Arsen Arsenović wrote: >> Tested on x86_64-pc-linux-gnu. OK for trunk? >> TIA, have a lovely day. >> -- >8 -- >> By doing so, we can get diagnostics in template decls when we know we >> can. For instance, in the following: >>

Re: [PATCH] testsuite: Adjust fam-in-union-alone-in-struct-2.c to support BE [PR116148]

2024-07-31 Thread Qing Zhao
the recent commit r15-2403 made it > be tested with running on BE and PR116148 got exposed. > > This patch is to adjust the expected data for members in with_fam_2_v > and with_fam_3_v by considering endianness, also update with_fam_3_v.b[1] > from 0x5f6f7f7f to 0x5f6f7f8

Re: [PATCH 8/8]AArch64: take gather/scatter decode overhead into account

2024-07-31 Thread Richard Sandiford
Tamar Christina writes: > @@ -289,6 +293,12 @@ struct sve_vec_cost : simd_vec_cost >const int gather_load_x32_cost; >const int gather_load_x64_cost; > > + /* Additional loop initialization cost of using a gather load instruction. > The x32 Sorry for the trivia, but: long line. > +

Re: [PATCH] c++/coroutines: only defer expanding co_{await,return,yield} if dependent [PR112341]

2024-07-31 Thread Jason Merrill
On 7/31/24 6:54 AM, Arsen Arsenović wrote: Tested on x86_64-pc-linux-gnu. OK for trunk? TIA, have a lovely day. -- >8 -- By doing so, we can get diagnostics in template decls when we know we can. For instance, in the following: awaitable g(); template task f() {

Re: [PATCH] dir-locals: apply our C settings in C++ also

2024-07-31 Thread Richard Sandiford
Arsen Arsenović writes: > We haven't been applying our settings to our C++. This patch fixes > that. > > Sadly, it seems that the only documented way to apply settings to > multiple modes is to repeat them. I thought that we can provide a list > of modes to app

Re: [PATCH] rs6000, document built-ins vec_test_lsbb_all_ones and, vec_test_lsbb_all_zeros

2024-07-31 Thread Carl Love
Kewen: On 7/31/24 2:12 AM, Kewen.Lin wrote: Hi Carl, on 2024/7/27 06:56, Carl Love wrote: GCC maintainers: Per a report from a user, the existing vec_test_lsbb_all_ones and, vec_test_lsbb_all_zeros built-ins are not documented in the GCC documentation file. The following patch adds

Re: [PATCH] RISC-V: Correct mode_idx attribute for viwalu wx variants [PR116149].

2024-07-31 Thread Jeff Law
has the correct non-widened mode. For the scalar variants, however, the same operand has a scalar mode which obviously only has one unit. This makes us choose VL = 1 leaving three elements undisturbed (so potentially -1). Those end up in the reduction causing the wrong result. This patch adjusts

RE: [PATCH 8/8]AArch64: take gather/scatter decode overhead into account

2024-07-31 Thread Tamar Christina
eric.h: Update. * config/aarch64/tuning_models/generic_armv8_a.h: Update. * config/aarch64/tuning_models/generic_armv9_a.h: Update. * config/aarch64/tuning_models/neoverse512tvb.h: Update. * config/aarch64/tuning_models/neoversen2.h: Update. * config/aarch64/tunin

[PATCH] Make may_trap_p_1 return false for constant pool references [PR116145]

2024-07-31 Thread Richard Sandiford
The testcase contains the constant: arr2 = svreinterpret_u8(svdup_u32(0x0a0d5c3f)); which was initially hoisted by hand, but which gimple optimisers later propagated to each use (as expected). The constant was then expanded as a load-and-duplicate from the constant pool. Normally that load

Re: [PATCH] libstdc++: drop bogus 'dg_do run' directive

2024-07-31 Thread Sam James
Jonathan Wakely writes: > On Wed, 31 Jul 2024 at 16:45, Sam James wrote: >> >> We already have a valid 'dg-do run' (- vs _) directive, so drop the bogus >> one. >> >> libstdc++-v3/ChangeLog: >> * testsuite/28_regex/traits/char/translate.cc: Drop bogus 'dg_do >> run'. >> --- >> OK? No

[Patch, libgfortran] PR105361 Followup fix to test case

2024-07-31 Thread Jerry D
I plan to push this soon to hopefully fix some test breakage on some architetures. It is simple and obvious. I did not get any feedback on this and I do not have access to the machines in question. Regression tested on linux-x86-64. Regards, Jerry commit

Re: [PATCH] libstdc++: drop bogus 'dg_do run' directive

2024-07-31 Thread Jonathan Wakely
On Wed, 31 Jul 2024 at 16:45, Sam James wrote: > > We already have a valid 'dg-do run' (- vs _) directive, so drop the bogus > one. > > libstdc++-v3/ChangeLog: > * testsuite/28_regex/traits/char/translate.cc: Drop bogus 'dg_do run'. > --- > OK? No regressions in the logs but it's a bit

Re: [PATCH 2/3][x86][v2] implement TARGET_MODE_CAN_TRANSFER_BITS

2024-07-31 Thread Uros Bizjak
gt; where we'd like to e.g. value number some SF/DF/XF etc. mode loads > > > > > and some > > > > > subsequent loads from the same address with different mode but same > > > > > size > > > > > the same and replace say int or

[PATCH] RISC-V: Correct mode_idx attribute for viwalu wx variants [PR116149].

2024-07-31 Thread Robin Dapp
. For the scalar variants, however, the same operand has a scalar mode which obviously only has one unit. This makes us choose VL = 1 leaving three elements undisturbed (so potentially -1). Those end up in the reduction causing the wrong result. This patch adjusts the mode_idx just for the scalar variants

Re: [PATCH 2/3] [x86] implement TARGET_MODE_CAN_TRANSFER_BITS

2024-07-31 Thread Uros Bizjak
On Wed, Jul 31, 2024 at 3:40 PM Richard Biener wrote: > > The following implements the hook, excluding x87 modes for scalar > and complex float modes. > > Bootstrapped and tested on x86_64-unknown-linux-gnu. > > OK this way? > > Thanks, > Richard. > > * i386.cc

[PATCH] libstdc++: drop bogus 'dg_do run' directive

2024-07-31 Thread Sam James
We already have a valid 'dg-do run' (- vs _) directive, so drop the bogus one. libstdc++-v3/ChangeLog: * testsuite/28_regex/traits/char/translate.cc: Drop bogus 'dg_do run'. --- OK? No regressions in the logs but it's a bit weird that it's got a proper directive with a target specifier so

Re: [RFH PATCH] c++: Implement C++26 P2963R3 - Ordering of constraints involving fold expressions [PR115746]

2024-07-31 Thread Patrick Palka
> > > >static constexpr bool foo () { return true; } > > > > > > > }; > > > > > > > > > > > > > > static_assert (S::foo ()); > > > > > > > > > > > > > > somehow the template parameter mappi

Re: [PATCH] middle-end/114563 - improve release_pages

2024-07-31 Thread Andi Kleen
eally > address PR114563 but I thought I post this patch anyway - the > actual issue we run into for the PR is the linear search of > G.free_pages when that list becomes large but a requested allocation > cannot be served from it. > > PR middle-end/114563 >

[PATCH] dir-locals: apply our C settings in C++ also

2024-07-31 Thread Arsen Arsenović
We haven't been applying our settings to our C++. This patch fixes that. Sadly, it seems that the only documented way to apply settings to multiple modes is to repeat them. I thought that we can provide a list of modes to apply, but that seems to not be the case (even thought it happened

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

2024-07-31 Thread Jonathan Wakely
On Wed, 31 Jul 2024 at 15:42, Björn Schäpers wrote: > > Am 30.07.2024 um 11:13 schrieb 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

[COMMITTED PATCH 5/5] testsuite: fix dg-require-* order vs dg-additional-sources

2024-07-31 Thread Sam James
Per gccint, 'dg-require-*' must come before any 'dg-additional-sources' directives. Fix a handful of deviant cases. * gcc.dg/tree-prof/crossmodule-indir-call-topn-1.c: Fix dg-require-profiling directive order. * gcc.dg/tree-prof/crossmodule-indir-call-topn-2.c: Likewise.

[COMMITTED PATCH 4/5] testsuite: fix dg-require-effective-target order vs dg-additional-sources

2024-07-31 Thread Sam James
Per gccint, 'dg-require-effective-target' must come before any 'dg-additional-sources' directives. Fix a handful of deviant cases. gcc/testsuite/ChangeLog: * gcc.target/aarch64/aapcs64/func-ret-3.c: Fix dg-require-effective-target directive order. *

[COMMITTED PATCH 3/5] testsuite: fix 'dg-do-preprocess' typo

2024-07-31 Thread Sam James
We want 'dg-do preprocess', not 'dg-do-preprocess'. Fix that. PR target/106828 * g++.target/loongarch/pr106828.C: Fix 'dg-do compile' typo. --- Committed as obvious. gcc/testsuite/g++.target/loongarch/pr106828.C | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[COMMITTED PATCH 2/5] testsuite: fix 'dg-do-compile' typos

2024-07-31 Thread Sam James
We want 'dg-do compile', not 'dg-do-compile'. Fix that. PR target/69194 PR c++/92024 PR c++/110057 * c-c++-common/Wshadow-1.c: Fix 'dg-do compile' typo. * g++.dg/tree-ssa/devirt-array-destructor-1.C: Likewise. *

[COMMITTED PATCH 1/5] testsuite: libgomp: fix dg-do run typo

2024-07-31 Thread Sam James
'dg-run' is not a valid dejagnu directive, 'dg-do run' is needed here for the test to be executed. That said, it actually seems to be executed for me anyway, presumably a default in the directory, but let's fix it to be consistent with other uses in the tree and in that test directory even.

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

2024-07-31 Thread Björn Schäpers
Am 30.07.2024 um 11:13 schrieb 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

Re: [PATCH 01/15] arm: [MVE intrinsics] improve comment for orrq shape

2024-07-31 Thread Christophe Lyon
ping for the series? On Thu, 11 Jul 2024 at 23:43, Christophe Lyon wrote: > > Add a comment about the lack of "n" forms for floating-point nor 8-bit > integers, to make it clearer why we use build_16_32 for MODE_n. > > 2024-07-11 Christophe Lyon > > gcc/ > *

[PATCH] middle-end/114563 - improve release_pages

2024-07-31 Thread Richard Biener
do not keep the memory allocated, so I left them untouched. Re-bootstrap and regtest running on x86_64-unknown-linux-gnu. I've CCed people messing with release_pages; This doesn't really address PR114563 but I thought I post this patch anyway - the actual issue we run into for the PR

Re: [PATCH] libstdc++: Only append "@euro" to locale names for Glibc testing

2024-07-31 Thread Rainer Orth
Hi Jonathan, >> agreed: while Solaris 11.4 does have a few *.ISO8859-15@euro locales >> >> da_DK.ISO8859-15@euro >> en_GB.ISO8859-15@euro >> en_US.ISO8859-15@euro >> sv_SE.ISO8859-15@euro >> >> the majority (17) are not. > > Ah interesting, I only saw en_US.ISO8859-15@euro on cfarm216, which is >

Re: [PATCH] tree-optimization/115825 - improve unroll estimates for volatile accesses

2024-07-31 Thread Richard Biener
On Wed, 10 Jul 2024, Richard Biener wrote: > The loop unrolling code assumes that one third of all volatile accesses > can be possibly optimized away which is of course not true. This leads > to excessive unrolling in some cases. The following tracks the number > of stmts with side-effects as

Re: [PATCH v4 0/3] aarch64: Add initial support for +fp8 arch extensions

2024-07-31 Thread Richard Sandiford
eading and writing the new system register FPMR (Floating > Point Mode > Register) which configures the new FP8 features > > Tested against aarch64-unknown-linux-gnu. > > V1 of this patch series had "aarch64: Add march flags for +fp8 arch > extensions" a

[PATCH 3/3][v3] tree-optimization/114659 - VN and FP to int punning

2024-07-31 Thread Richard Biener
The following addresses another case where x87 FP loads mangle the bit representation and thus are not suitable for a representative in other types. VN was value-numbering a later integer load of 'x' as the same as a former float load of 'x'. We can use the new TARGET_MODE_CAN_TRANSFER_BITS hook

[PATCH 2/3] [x86] implement TARGET_MODE_CAN_TRANSFER_BITS

2024-07-31 Thread Richard Biener
The following implements the hook, excluding x87 modes for scalar and complex float modes. Bootstrapped and tested on x86_64-unknown-linux-gnu. OK this way? Thanks, Richard. * i386.cc (TARGET_MODE_CAN_TRANSFER_BITS): Define. (ix86_mode_can_transfer_bits): New function. ---

[PATCH 1/3][v3] Add TARGET_MODE_CAN_TRANSFER_BITS

2024-07-31 Thread Richard Biener
The following adds a target hook to specify whether regs of MODE can be used to transfer bits. The hook is supposed to be used for value-numbering to decide whether a value loaded in such mode can be punned to another mode instead of re-loading the value in the other mode and for SRA to decide

Re: [PATCH 2/3][x86][v2] implement TARGET_MODE_CAN_TRANSFER_BITS

2024-07-31 Thread Richard Biener
x86_64-linux. > > And does it e.g. pass compat.exp / structure-layout-1.exp testing > against gcc without that patch (ALT_CC_UNDER_TEST=gcc ALT_CXX_UNDER_TEST=g++)? It doesn't. I would expect differences at least for packed structs since TYPE_SIZE changes with MODE_SIZE. Richard.

[PATCH] libstdc++: Handle strerror returning null

2024-07-31 Thread Jonathan Wakely
As discussed a couple of weeks ago, I'm going to push this. Tested x86_64-linux (where this #else isn't even used, but I checked it does at least compile when the #if isn't true). -- >8 -- The linux man page for strerror says that some systems return NULL for an unknown error number. That

Re: [PATCH] libstdc++: Only append "@euro" to locale names for Glibc testing

2024-07-31 Thread Jonathan Wakely
need to address. > > > > Oh, I've just realised that the UNSUPPORTED -> PASS I observed on > > Solaris was a build using my patch for PR 57585, which is not pushed > > yet. I think without that all uses of dg-require-namedlocale might > > fail on Solaris, so this change won't

Re: [PATCH 2/3][x86][v2] implement TARGET_MODE_CAN_TRANSFER_BITS

2024-07-31 Thread Jakub Jelinek
96_format); > FLOAT_MODE (TF, 16, ieee_quad_format); > FLOAT_MODE (HF, 2, ieee_half_format); > FLOAT_MODE (BF, 2, 0); > > bootstraps and tests (-m64/-m32) OK on x86_64-linux. And does it e.g. pass compat.exp / structure-layout-1.exp testing against gcc without that patch (ALT_CC_UNDER_TEST=gcc ALT_CXX_UNDER_TEST=g++)? Jakub

Re: [PATCH 2/3][x86][v2] implement TARGET_MODE_CAN_TRANSFER_BITS

2024-07-31 Thread Richard Biener
g. value number some SF/DF/XF etc. mode loads > > > > > > and some > > > > > > subsequent loads from the same address with different mode but same > > > > > > size > > > > > > the same and replace say int or long long later load with >

Re: [PATCH] libstdc++: Only append "@euro" to locale names for Glibc testing

2024-07-31 Thread Rainer Orth
PASS, e.g. >> 21_strings/basic_string/numeric_conversions/char/to_string_float.cc >> It will probably also cause some to flip from UNSUPPORTED to FAIL, which >> we'll need to address. > > Oh, I've just realised that the UNSUPPORTED -> PASS I observed on > Solaris wa

Re: [PATCH] libstdc++: Only append "@euro" to locale names for Glibc testing

2024-07-31 Thread Jonathan Wakely
tring/numeric_conversions/char/to_string_float.cc > It will probably also cause some to flip from UNSUPPORTED to FAIL, which > we'll need to address. Oh, I've just realised that the UNSUPPORTED -> PASS I observed on Solaris was a build using my patch for PR 57585, which is not pushed yet. I

[PATCH] libstdc++: Only append "@euro" to locale names for Glibc testing

2024-07-31 Thread Jonathan Wakely
I doubt we want the @euro suffix anywhere except Glibc-based targets. We certainly don't want to append "@euro" on Solaris, where this change flips some tests from UNSUPPORTED to PASS, e.g. 21_strings/basic_string/numeric_conversions/char/to_string_float.cc It will probably also cause some to flip

Re: [Patch,v3] omp-offload.cc: Fix value-expr handling of 'declare target link' vars [PR115637] (was: [Patch] gimplify.cc: Handle VALUE_EXPR of MEM_REF's ADDR_EXPR argument [PR115637])

2024-07-31 Thread Richard Biener
+ *tp = unshare_expr (DECL_VALUE_EXPR (t)); >*walk_subtrees = 0; >return t; > } > > which then makes the stmt obviously not gimple? > > ... except that 'return t' prevents updating other value-expr in the same > stmt, but that can be fixed. > > Updated pat

Re: [PATCH] aarch64: Fuse CMP+CSEL and CMP+CSET for -mcpu=neoverse-v2

2024-07-31 Thread Jennifer Schmitz
Thanks for the feedback! I updated the patch based on your comments, more detailed comments inline below. The updated version was bootstrapped and tested again, no regression. Best, Jennifer 0001-AArch64-Fuse-CMP-CSEL-and-CMP-CSET-for-mcpu-neoverse.patch Description: Binary data > On 25

Re: [PATCH 2/2] match: Fix wrong code due to `(a ? e : f) !=/== (b ? e : f)` patterns [PR116120]

2024-07-31 Thread Sam James
oduces better code than the original case and in many cases (x > != y) will > still reduce to either false or true. > > With this change we also need to make sure `a`, `b` and the resulting types > are all > the same for the same reason as the previous patch. > > I upd

Re: [PATCH 2/2] match: Fix wrong code due to `(a ? e : f) !=/== (b ? e : f)` patterns [PR116120]

2024-07-31 Thread Richard Biener
FALSE */ > > This still produces better code than the original case and in many cases (x > != y) will > still reduce to either false or true. > > With this change we also need to make sure `a`, `b` and the resulting types > are all > the same for the same reason as th

Re: [PATCH 1/2] match: Fix types matching for `(?:) !=/== (?:)` [PR116134]

2024-07-31 Thread Richard Biener
On Tue, Jul 30, 2024 at 5:25 PM Andrew Pinski wrote: > > The problem here is that in generic types of comparisons don't need > to be boolean types (or vector boolean types). And fixes that by making > sure the types of the conditions match before doing the optimization. > > Bootstrapped and

Re: [PATCH v2] testsuite: Adjust switch-exp-transform-3.c for 32bit

2024-07-31 Thread Filip Kastl
On Wed 2024-07-31 13:34:28, Jakub Jelinek wrote: > On Wed, Jul 31, 2024 at 01:32:06PM +0200, Filip Kastl wrote: > > Thanks for the feedback! Here is a second version of the patch. I've > > tested > > this version with > > > > make check RUNTESTFLAGS=&qu

Re: [PATCH v2] testsuite: Adjust switch-exp-transform-3.c for 32bit

2024-07-31 Thread Jakub Jelinek
On Wed, Jul 31, 2024 at 01:32:06PM +0200, Filip Kastl wrote: > Thanks for the feedback! Here is a second version of the patch. I've tested > this version with > > make check RUNTESTFLAGS="i386.exp=gcc.target/i386/switch-exp-transform-3.c > --target_board='unix{-m32}'"

[PATCH v2] testsuite: Adjust switch-exp-transform-3.c for 32bit

2024-07-31 Thread Filip Kastl
dump-times "Applying exponential index transform" 6 > "switchconv" { target { ! ia32 } } } } */ > or so? > > Jakub > Thanks for the feedback! Here is a second version of the patch. I've tested this version with make check RUNTESTFLAGS="i386.exp=gcc.tar

[Patch, v3] omp-offload.cc: Fix value-expr handling of 'declare target link' vars [PR115637] (was: [Patch] gimplify.cc: Handle VALUE_EXPR of MEM_REF's ADDR_EXPR argument [PR115637])

2024-07-31 Thread Tobias Burnus
y not gimple? ... except that 'return t' prevents updating other value-expr in the same stmt, but that can be fixed. Updated patch attached. Thanks for the suggestion! Tobias omp-offload.cc: Fix value-expr handling of 'declare target link' vars As the PR and included testcase shows, rep

[PATCH] c++/coroutines: only defer expanding co_{await, return, yield} if dependent [PR112341]

2024-07-31 Thread Arsen Arsenović
Tested on x86_64-pc-linux-gnu. OK for trunk? TIA, have a lovely day. -- >8 -- By doing so, we can get diagnostics in template decls when we know we can. For instance, in the following: awaitable g(); template task f() { co_await g(); co_yield 1; co_return

Re: [PATCH] testsuite: Adjust fam-in-union-alone-in-struct-2.c to support BE [PR116148]

2024-07-31 Thread Sam James
"Kewen.Lin" writes: > Hi, > > As Andrew pointed out in PR116148, fam-in-union-alone-in-struct-2.c > was designed for little-endian, the recent commit r15-2403 made it > be tested with running on BE and PR116148 got exposed. > > This patch is to adjus

[RFC/RFA] [PATCH v2 09/12] Add symbolic execution support.

2024-07-31 Thread Mariam Arutunian
Gives an opportunity to execute the code on bit level, assigning symbolic values to the variables which don't have initial values. Supports only CRC specific operations. Example: uint8_t crc; uint8_t pol = 1; crc = crc ^ pol; during symbolic execution crc's value will

Re: [PATCH 2/3][x86][v2] implement TARGET_MODE_CAN_TRANSFER_BITS

2024-07-31 Thread Uros Bizjak
as that the hook would be used only for > > > > > cases > > > > > where we'd like to e.g. value number some SF/DF/XF etc. mode loads > > > > > and some > > > > > subsequent loads from the same address with different mode but same &g

Re: [PATCH] LoongArch: Rework bswap{hi,si,di}2 definition

2024-07-31 Thread Xi Ruoyao
ly I cannot figure out a way to make the compiler generate > > revb.4h or revh.{2w,d} instructions. > > This optimization is really ingenious and I have no problem. > > I also haven't figured out how to generate revb.4h or revh. {2w,d}. > I think we can merge this

<    1   2   3   4   5   6   7   8   9   10   >