Re: [PATCH] PR target/117669 - RISC-V:The 'VEEWTRUNC4' iterator 'RVVMF2BF' type condition error

2024-11-19 Thread 钟居哲
LGTM juzhe.zh...@rivai.ai From: Feng Wang Date: 2024-11-20 15:37 To: gcc-patches CC: kito.cheng; jeffreyalaw; juzhe.zhong; Feng Wang Subject: [PATCH] PR target/117669 - RISC-V:The 'VEEWTRUNC4' iterator 'RVVMF2BF' type condition error This patch fix the wrong condition for RVVMF2BF. It should

[PATCH] PR target/117669 - RISC-V:The 'VEEWTRUNC4' iterator 'RVVMF2BF' type condition error

2024-11-19 Thread Feng Wang
This patch fix the wrong condition for RVVMF2BF. It should be TARGET_VECTOR_ELEN_BF_16. gcc/ChangeLog: PR target/117669 * config/riscv/vector-iterators.md: Signed-off-by: Feng Wang --- gcc/config/riscv/vector-iterators.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) di

回复: Re: [PATCH] RISC-V:Fix wrong condition for vector-bfloat16

2024-11-19 Thread wangf...@eswincomputing.com
On 2024-11-20 14:54  钟居哲 wrote: > >Are you trying to fix this PR ? Yes. >117669 – RISC-V:The 'VEEWTRUNC4' iterator 'RVVMF2BF' type condition error > >I think you should add PR target/117669 in the changelog > OK. > > > >juzhe.zh...@rivai.ai > >From: Feng Wang >Date: 2024-11-20 14:50 >To: gcc-pat

Re: [PATCH] RISC-V:Fix wrong condition for vector-bfloat16

2024-11-19 Thread 钟居哲
Are you trying to fix this PR ? 117669 �C RISC-V:The 'VEEWTRUNC4' iterator 'RVVMF2BF' type condition error I think you should add PR target/117669 in the changelog juzhe.zh...@rivai.ai From: Feng Wang Date: 2024-11-20 14:50 To: gcc-patches CC: kito.cheng; jeffreyalaw; juzhe.zhong; Feng Wang

[PATCH] RISC-V:Fix wrong condition for vector-bfloat16

2024-11-19 Thread Feng Wang
This patch fix the wrong condition for RVVMF2BF. It should be TARGET_VECTOR_ELEN_BF_16. gcc/ChangeLog: * config/riscv/vector-iterators.md: Modify condition. Signed-off-by: Feng Wang --- gcc/config/riscv/vector-iterators.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --gi

RE: [PATCH] [x86_64] Add microarchtecture tunable for pass_align_tight_loops

2024-11-19 Thread Liu, Hongtao
> -Original Message- > From: Mayshao-oc > Sent: Wednesday, November 20, 2024 2:43 PM > To: Hongtao Liu > Cc: Liu, Hongtao ; Xi Ruoyao ; > gcc-patches@gcc.gnu.org; hubi...@ucw.cz; ubiz...@gmail.com; > richard.guent...@gmail.com; Tim Hu(WH-RD) ; Silvia > Zhao(BJ-RD) ; Louis Qi(BJ-RD) > ;

Re: [PATCH v2] testsuite: arm: Only check for literal pools in no-literal-pool-m0.c

2024-11-19 Thread Torbjorn SVENSSON
On 2024-11-19 14:42, Richard Earnshaw (lists) wrote: On 18/11/2024 11:13, Torbjörn SVENSSON wrote: Changes since v1: - Replaced fragile checks on constants with check for literal pool using "ldr r[0-9]+, \.L[0-9]+". Ok for trunk? -- With the changes in r15-1579-g792f97b44ff, the consta

[committed] libstdc++: Use const_iterator in std::set::find return type

2024-11-19 Thread Jonathan Wakely
François noticed that the "wrong" type is used in the return type for a std::set member function template. The iterator for our std::set is the same type as const_iterator, so this doesn't actually matter. But it's clearer if the return type matches the type used in the function body. libstdc++-v

[committed] libstdc++: Fix std::unordered_set::emplace optimization [PR117686]

2024-11-19 Thread Jonathan Wakely
The __is_key_type specialization that matches a pair argument is intended for std::unordered_map, not for std::unordered_set>. This uses a pair as the template argument for __is_key_type, so that it won't match a set's key_type. libstdc++-v3/ChangeLog: PR libstdc++/117686 * inclu

Re: [PATCH] [x86_64] Add microarchtecture tunable for pass_align_tight_loops

2024-11-19 Thread Mayshao-oc
> On Fri, Nov 8, 2024 at 10:21 AM Mayshao-oc wrote: > > > > > > -Original Message- > > > > From: Xi Ruoyao > > > > Sent: Thursday, November 7, 2024 1:12 PM > > > > To: Liu, Hongtao ; Mayshao-oc > > > o...@zhaoxin.com>; Hongtao Liu > > > > Cc: gcc-patches@gcc.gnu.org; hubi...@ucw.cz; ubi

Re: [PATCH 07/17] testsuite: arm: Use effective-target for {gcc, g++}.target/arm/ tests

2024-11-19 Thread Richard Earnshaw (lists)
On 19/11/2024 10:23, Torbjörn SVENSSON wrote: > Update test cases to use -mcpu=unset/-march=unset feature introduced in > r15-3606-g7d6c6a0d15c. > > gcc/testsuite/ChangeLog: > > * g++.target/arm/pr103676.C: Use effective-target > arm_cpu_cortex_m7. > * gcc.target/arm/no-volatile

[patch,avr] Use more bool

2024-11-19 Thread Georg-Johann Lay
Now that the C default is C23, we can use bool in avr.h (which is still used in libgcc via tm.h). bool is a keyword in C23, so no stdbool.h is required in libgcc. No regressions. Ok for trunk? Johan -- AVR: Use more bool. Now that the C default is C23, we can use bool in avr.h (which is still

Re: [PATCH V1] RISC-V: Add the mini support for SiFive extensions.

2024-11-19 Thread Kito Cheng
Thanks, committed to trunk :) On Wed, Nov 20, 2024 at 2:09 AM Jeff Law wrote: > > > > On 11/17/24 2:55 AM, shiyul...@iscas.ac.cn wrote: > > From: yulong > > > > This patch add the mini support for xsfvqmaccqoq, xsfvqmaccdod and > > xsfvfnrclipxfqf extensions. > > > > gcc/ChangeLog: > > > >

[PATCH] aarch64: Fix aarch64 after moving to C23

2024-11-19 Thread Andrew Pinski
This fixes a few aarch64 specific testcases after the move to default to GNU C23. For the SME testcases, I decided to add a new one for the GNU C23 case as `()` changing to mean `(void)` instead of a non-prototype declaration and add `-std=gnu17` to the old one. For pic-*.c `-Wno-old-style-defin

Re: [PATCH v2] Fix MV clones can not redirect to specific target on some targets

2024-11-19 Thread Jeff Law
On 11/19/24 10:29 AM, Andrew Carlotti wrote: On Sun, Oct 27, 2024 at 04:00:43PM +, Yangyu Chen wrote: Following the implementation of commit b8ce8129a5 ("Redirect call within specific target attribute among MV clones (PR ipa/82625)"), we can now optimize calls by invoking a versioned func

[patch,avr] PR54378 Reconsider the default shift costs.

2024-11-19 Thread Georg-Johann Lay
This patch calculates more accurate shift costs, but makes the costs for larger offsets no more expensive than the costs for an unrolled shift. Ok for trunk? Johann -- AVR: target/54378 - Reconsider the default shift costs. This patch calculates more accurate shift costs, but makes the costs

Re: [PATCH] sibcall: Adjust BLKmode argument size for alignment padding

2024-11-19 Thread Richard Sandiford
"H.J. Lu" writes: > Adjust BLKmode argument size for parameter alignment for sibcall check. > > gcc/ > > PR middle-end/117098 > * calls.cc (store_one_arg): Adjust BLKmode argument size for > alignment padding for sibcall check. > > gcc/testsuite/ > > PR middle-end/117098 > * gcc.dg/sibcall-12.c: N

[patch,testsuite,applied] Skip 2 tests that are not int16 clean

2024-11-19 Thread Georg-Johann Lay
Skipping these test cases that are not int16 clean (execution fail, UB due to shift offset, etc). Johann -- testsuite/52641 - Skip test cases that are not 16-bit clean. gcc/testsuite/ PR testsuite/52641 PR testsuite/116488 PR testsuite/116915 * gcc.dg/torture/pr

[committed] c: Fix ICE for integer constexpr initializers of wrong type [PR115515]

2024-11-19 Thread Joseph Myers
Bug 115515 (plus its duplicate 117139) reports an ICE with constexpr initializer for an integer type variable that is not of integer type. Fix this by not calling int_fits_type_p unless the previous check for an integer constant expression passes. Bootstrapped with no regressions for x86_64-pc-lin

RE: [PATCH v1 1/2] RISC-V: Fix incorrect optimization options passing to strided ld/st test

2024-11-19 Thread Li, Pan2
> Had the discussion above been included in the patch I probably would > have just acked it then :-) Now that I understand what you're doing, > it's fine. I see, thank you ;). Pan -Original Message- From: Jeff Law Sent: Tuesday, November 19, 2024 10:57 PM To: Li, Pan2 ; gcc-patches@

Re: [PATCH 01/17] testsuite: arm: Use effective-target for bti* and pac* tests

2024-11-19 Thread Richard Earnshaw (lists)
On 19/11/2024 10:23, Torbjörn SVENSSON wrote: > Update test cases to use -mcpu=unset/-march=unset feature introduced in > r15-3606-g7d6c6a0d15c. > > gcc/testsuite/ChangeLog: > > * gcc.target/arm/pac-1.c: Use effective-target > arm_arch_v8_1m_main_pacbti. > * gcc.target/arm/pac-1

Re: [PATCH] sibcall: Adjust BLKmode argument size for alignment padding

2024-11-19 Thread H.J. Lu
On Wed, Nov 20, 2024 at 2:12 AM Richard Sandiford wrote: > > "H.J. Lu" writes: > > Adjust BLKmode argument size for parameter alignment for sibcall check. > > > > gcc/ > > > > PR middle-end/117098 > > * calls.cc (store_one_arg): Adjust BLKmode argument size for > > alignment padding for sibcall c

Re: [PATCH] libgccjit: Add vector permutation and vector access operations

2024-11-19 Thread David Malcolm
On Thu, 2023-11-30 at 17:16 -0500, Antoni Boucher wrote: > All of these are fixed in this new patch. > Thanks for the review. Thanks for the updated patch. I had said "OK with those fixed" on the older version and it looks like you have indeed fixed the issues I noticed, so this updated patch is

Re: [PATCH] libgccjit: Fix float playback for cross-compilation

2024-11-19 Thread David Malcolm
On Thu, 2024-01-25 at 16:04 -0500, Antoni Boucher wrote: > Thanks for the review! > On Wed, 2024-01-24 at 13:10 -0500, David Malcolm wrote: > > On Thu, 2024-01-11 at 18:42 -0500, Antoni Boucher wrote: > > > Hi. > > > This patch fixes the bug 113343. > > > I'm wondering if there's a better solution

Re: Should -fsanitize=bounds support counted-by attribute for pointers inside a structure?

2024-11-19 Thread Martin Uecker
Am Dienstag, dem 19.11.2024 um 10:47 -0500 schrieb Marek Polacek: > On Mon, Nov 18, 2024 at 07:10:35PM +0100, Martin Uecker wrote: > > Am Montag, dem 18.11.2024 um 17:55 + schrieb Qing Zhao: > > > Hi, > > > > > > I am working on extending “counted_by” attribute to pointers inside a > > > stru

Re: [PATCH] libgccjit: Add type checks in gcc_jit_block_add_assignment_op

2024-11-19 Thread David Malcolm
On Thu, 2023-12-21 at 08:36 -0500, Antoni Boucher wrote: > Hi. > Here's the updated patch. > Thanks. Sorry for the delay in responding. The updated patch is good for trunk - thanks! Dave > > On Thu, 2023-12-07 at 20:15 -0500, David Malcolm wrote: > > On Thu, 2023-12-07 at 17:34 -0500, Antoni B

Re: [PATCH] Use nonnull_if_nonzero attribute rather than nonnull on various builtins [PR117023]

2024-11-19 Thread Joseph Myers
On Thu, 14 Nov 2024, Jakub Jelinek wrote: > The patch adjusts builtins (when we have them) corresponding to the APIs > mentioned in the C2Y N3322 paper: > 1) strndup and memset get one nonnull_if_nonzero attribute instead of >nonnull > 2) memcpy, memmove, strncpy, memcmp, strncmp get two nonnu

Re: [PATCH] v2: Add support for nonnull_if_nonzero attribute [PR117023]

2024-11-19 Thread Joseph Myers
On Wed, 13 Nov 2024, Jakub Jelinek wrote: > On Tue, Nov 12, 2024 at 06:34:39PM +0100, Jakub Jelinek wrote: > > What do you think about this? So far lightly tested. > > Unfortunately bootstrap/regtest revealed some issues in the patch, > the tree-ssa-ccp.cc changes break bootstrap because fntype

Re: [PATCH] libgccjit: Add support for machine-dependent builtins

2024-11-19 Thread Mark Wielaard
Hi, Random request... On Tue, Nov 19, 2024 at 11:14:38AM -0500, David Malcolm wrote: > > Here's the updated patch and answers below. > > > > (GitHub link if you find it easier for review: > > https://github.com/antoyo/libgccjit/pull/5) > > > > Thanks. > > Thanks; I looked over the patch via t

Re: [PATCH] expr, c, gimplify, v3: Don't clear whole unions [PR116416]

2024-11-19 Thread Joseph Myers
On Tue, 15 Oct 2024, Jakub Jelinek wrote: > --- gcc/testsuite/gcc.dg/gnu11-empty-init-1.c.jj 2024-10-15 > 16:14:23.411063701 +0200 > +++ gcc/testsuite/gcc.dg/gnu11-empty-init-1.c 2024-10-15 16:31:02.302984714 > +0200 > @@ -0,0 +1,199 @@ > +/* Test GNU C11 support for empty initializers. */

Re: [PATCH 04/17] testsuite: arm: Use effective-target for pure-code/* tests

2024-11-19 Thread Richard Earnshaw (lists)
On 19/11/2024 10:23, Torbjörn SVENSSON wrote: > Update test cases to use -mcpu=unset/-march=unset feature introduced in > r15-3606-g7d6c6a0d15c. > > gcc/testsuite/ChangeLog: > > * gcc.target/arm/pure-code/no-literal-pool-m0.c: Use > effective-target arm_cpu_cortex-m0. > * gcc.ta

Re: Should -fsanitize=bounds support counted-by attribute for pointers inside a structure?

2024-11-19 Thread Martin Uecker
Am Montag, dem 18.11.2024 um 21:31 + schrieb Qing Zhao: > > > On Nov 18, 2024, at 13:10, Martin Uecker wrote: > ... > So, I guess that the more accurate question is, for the following: > > struct annotated { > int b; > int *c __attribute__ ((counted_by (b))); > } *p_array_annotated; >

[committed] c: Do not register nullptr_t built-in type [PR114869]

2024-11-19 Thread Joseph Myers
As reported in bug 114869, the C front end wrongly creates nullptr_t as a built-in typedef; it should only be defined in . While the type node needs a name for debug info generation, it doesn't need to be a valid identifier; use typeof (nullptr) instead, similar to how the C++ front end uses declt

Re: [to-be-committed][RISC-V][PR target/117649] Fix branch on masked values splitter

2024-11-19 Thread Jeff Law
On 11/19/24 12:01 PM, Jeff Law wrote: Andreas reported GCC mis-compiled GAS for risc-v  Thankfully he also reduced it to a nice little testcase. So the whole point of the pattern in question is to "reduce" the constants by right shifting away common unnecessary bits in RTL expressions like

Re: [PATCH] RISC-V: testsuite: restrict big endian test to non vector

2024-11-19 Thread Jeff Law
On 11/19/24 2:08 PM, Edwin Lu wrote: RISC-V vector currently does not support big endian so the postcommit was getting the sorry, not implemented error on vector targets. Restrict the testcase to non-vector targets gcc/testsuite/ChangeLog: * gcc.target/riscv/pr117595.c: Restrict to n

[PATCH] RISC-V: testsuite: restrict big endian test to non vector

2024-11-19 Thread Edwin Lu
RISC-V vector currently does not support big endian so the postcommit was getting the sorry, not implemented error on vector targets. Restrict the testcase to non-vector targets gcc/testsuite/ChangeLog: * gcc.target/riscv/pr117595.c: Restrict to non vector targets. Signed-off-by: Edwin L

Re: [PATCH 17/17] testsuite: arm: Use effective-target for pr96939 test

2024-11-19 Thread Richard Earnshaw (lists)
On 19/11/2024 10:24, Torbjörn SVENSSON wrote: > Update test case to use -mcpu=unset/-march=unset feature introduced in > r15-3606-g7d6c6a0d15c. > > gcc/testsuite/ChangeLog: > > * gcc.target/arm/lto/pr96939_0.c: Use effective-target > arm_arch_v8a. > * gcc.target/arm/lto/pr96939_

Re: [PATCH 1/2] asan: Support dynamic shadow offset

2024-11-19 Thread Jeff Law
On 11/14/24 9:14 PM, Kito Cheng wrote: AddressSanitizer has supported dynamic shadow offsets since 2016[1], but GCC hasn't implemented this yet because targets using dynamic shadow offsets, such as Fuchsia and iOS, are mostly unsupported in GCC. However, RISC-V 64 switched to dynamic shadow o

Re: [RFC PATCH 1/5] vect: Force alignment peeling to vectorize more early break loops

2024-11-19 Thread Richard Sandiford
Alex Coplan writes: > On 19/11/2024 17:02, Richard Sandiford wrote: >> Sorry for the slow review. Finally catching up on backlog. >> >> Richard Biener writes: >> > On Mon, 28 Oct 2024, Alex Coplan wrote: >> > >> >> This allows us to vectorize more loops with early exits by forcing >> >> peeling

Re: [PATCH] c: Fix up __builtin_stdc_rotate_{left,right} lowering [PR117456]

2024-11-19 Thread Joseph Myers
On Tue, 19 Nov 2024, Jakub Jelinek wrote: > Hi! > > Apparently the middle-end/expansion can only handle {L,R}ROTATE_EXPR > on types with mode precision, or large/huge BITINT_TYPE. > So, the following patch uses the rotate exprs only in those cases > where it can be handled, and emits code with sh

Re: [PATCH 02/15] testsuite: Expand coverage for `__builtin_memcpy'

2024-11-19 Thread Jeff Law
On 11/17/24 7:59 PM, Maciej W. Rozycki wrote: Expand coverage for `__builtin_memcpy', primarily for "cpymemM" block copy pattern, although with smaller sizes open-coded sequences may be produced instead. This verifies block sizes in bytes from 1 to 64, across byte alignments of 1, 2, 4, 8 and

Re: [patch,avr] PR54378 Reconsider the default shift costs.

2024-11-19 Thread Denis Chertykov
вт, 19 нояб. 2024 г. в 21:22, Georg-Johann Lay : > > This patch calculates more accurate shift costs, but makes > the costs for larger offsets no more expensive than the costs > for an unrolled shift. > > Ok for trunk? Ok. Please apply. Denis.

Re: [PATCH 1/4] RISC-V: Add Zicfiss ISA extension.

2024-11-19 Thread Jeff Law
On 11/15/24 3:53 AM, Monk Chiang wrote: This patch is implemented according to the RISC-V CFI specification. It supports the generation of shadow stack instructions in the prologue, epilogue, non-local gotos, and unwinding. RISC-V CFI SPEC: https://github.com/riscv/riscv-cfi gcc/ChangeLog:

[PATCH] c-family: Fix ICE with __sync_*_and_* on _BitInt [PR117641]

2024-11-19 Thread Jakub Jelinek
Hi! Only __atomic_* builtins are meant to work on arbitrary _BitInt types (if not supported in hw we emit a CAS loop which uses __atomic_load_* in that case), the compatibility __sync_* builtins work only if there is a corresponding normal integral type (for _BitInt on 32-bit ARM we'll need to lim

Re: [PATCH] c-family: Fix ICE with __sync_*_and_* on _BitInt [PR117641]

2024-11-19 Thread Marek Polacek
On Tue, Nov 19, 2024 at 08:51:32AM +0100, Jakub Jelinek wrote: > Hi! > > Only __atomic_* builtins are meant to work on arbitrary _BitInt types > (if not supported in hw we emit a CAS loop which uses __atomic_load_* > in that case), the compatibility __sync_* builtins work only if there > is a corr

[to-be-committed][RISC-V][PR target/117649] Fix branch on masked values splitter

2024-11-19 Thread Jeff Law
Andreas reported GCC mis-compiled GAS for risc-v Thankfully he also reduced it to a nice little testcase. So the whole point of the pattern in question is to "reduce" the constants by right shifting away common unnecessary bits in RTL expressions like this: [(set (pc) (if_then_el

Re: [PATCH 13/17] testsuite: arm: Use -march=unset for cortex-m55* tests

2024-11-19 Thread Richard Earnshaw (lists)
On 19/11/2024 10:24, Torbjörn SVENSSON wrote: > Update test cases to use -mcpu=unset/-march=unset feature introduced in > r15-3606-g7d6c6a0d15c. > > gcc/testsuite/ChangeLog: > > * gcc.target/arm/cortex-m55-nodsp-flag-hard.c: Added option > "-march=unset". > * gcc.target/arm/cort

Re: Should -fsanitize=bounds support counted-by attribute for pointers inside a structure?

2024-11-19 Thread Martin Uecker
Am Dienstag, dem 19.11.2024 um 09:18 -0800 schrieb Kees Cook: > On Tue, Nov 19, 2024 at 05:41:13PM +0100, Martin Uecker wrote: > > Am Dienstag, dem 19.11.2024 um 10:47 -0500 schrieb Marek Polacek: > > > On Mon, Nov 18, 2024 at 07:10:35PM +0100, Martin Uecker wrote: > > > > Am Montag, dem 18.11.2024

Re: [PATCH] RISC-V:Support N32(32-bit ABI on 64-bit ISA) in riscv

2024-11-19 Thread Jeff Law
On 11/15/24 8:21 PM, Liao Shihua wrote: RISC-V N32 ABI means using 32-bit ABI on 64-bit ISA, the discussion in https://github.com/riscv-non-isa/riscv-elf-psabi-doc/pull/381 . At this moment, N32 is supported batemental toolchain. Three OpenSource RTOS using this feature and have been merged i

Re: [PATCH V1] RISC-V: Add the mini support for SiFive extensions.

2024-11-19 Thread Jeff Law
On 11/17/24 2:55 AM, shiyul...@iscas.ac.cn wrote: From: yulong This patch add the mini support for xsfvqmaccqoq, xsfvqmaccdod and xsfvfnrclipxfqf extensions. gcc/ChangeLog: * common/config/riscv/riscv-common.cc: New. * config/riscv/riscv.opt: New. gcc/testsuite/ChangeL

Re: [PATCH 00/15] Fix data races with sub-longword accesses on Alpha

2024-11-19 Thread Maciej W. Rozycki
On Mon, 18 Nov 2024, Arnd Bergmann wrote: > >> a) storing an '_Atomic' variable smaller than 8 bytes on non-bwx > >>targets should use ll/sc, but uses a plain rmw cycle. > > > > I think there should be no problem with aligned 4-byte (longword) data > > quantities, given that there are both pl

Re: [PATCH 16/17] testsuite: arm: Use effective-target for its.c test [PR94531]

2024-11-19 Thread Richard Earnshaw (lists)
On 19/11/2024 10:24, Torbjörn SVENSSON wrote: > The test case gcc.target/arm/its.c was created together with restriction > of IT blocks for Cortex-M7. As the test case fails on all tunes that > does not match Cortex-M7, explicitly test it for Cortex-M7. To have some > additional faith that GCC does

[Ada] Enable symbolic backtraces on more Linux and BSD ports

2024-11-19 Thread Eric Botcazou
This enables symbolic backtraces on the ports listed in the Changelog. Applied on the mainline. 2024-11-19 Eric Botcazou PR ada/117538 * Makefile.rtl (GNU Hurd): Add $(TRASYM_DWARF_UNIX_OBJS). (x86-64 kfreebsd): Likewise. (aarch64 FreeBSD): Likewise. (

Re: [PATCH 15/17] testsuite: arm: Use -mcpu=unset when overriding -march

2024-11-19 Thread Richard Earnshaw (lists)
On 19/11/2024 10:24, Torbjörn SVENSSON wrote: > Update test cases to use -mcpu=unset/-march=unset feature introduced in > r15-3606-g7d6c6a0d15c. > > gcc/testsuite/ChangeLog: > * gcc.dg/pr41574.c: Added option "-mcpu=unset". > * gcc.dg/pr59418.c: Likewise. > * lib/target-supports.

Re: [PATCH 12/17] testsuite: arm: Use -march=unset for bfloat16_scalar* tests

2024-11-19 Thread Richard Earnshaw (lists)
On 19/11/2024 10:24, Torbjörn SVENSSON wrote: > Update test cases to use -mcpu=unset/-march=unset feature introduced in > r15-3606-g7d6c6a0d15c. > > gcc/testsuite/ChangeLog: > > * gcc.target/arm/bfloat16_scalar_1_2.c: Added option > "-march=unset". > * gcc.target/arm/bfloat16_sc

Re: [PATCH] aarch64: Mark __builtin_aarch64_im_lane_boundsi as leaf and nothrow [PR117665]

2024-11-19 Thread Andrew Pinski
On Tue, Nov 19, 2024 at 9:21 AM Andrew Pinski wrote: > > __builtin_aarch64_im_lane_boundsi is known not to throw or call back into > another > function since it will either folded into an NOP or will produce a compiler > error. > > This fixes the ICE by fixing the missed optimization. It does no

[PATCH] aarch64: Mark __builtin_aarch64_im_lane_boundsi as leaf and nothrow [PR117665]

2024-11-19 Thread Andrew Pinski
__builtin_aarch64_im_lane_boundsi is known not to throw or call back into another function since it will either folded into an NOP or will produce a compiler error. This fixes the ICE by fixing the missed optimization. It does not fix the underlying issue with fold_marked_statements; which I fi

Re: [RFC PATCH 1/5] vect: Force alignment peeling to vectorize more early break loops

2024-11-19 Thread Alex Coplan
On 19/11/2024 17:02, Richard Sandiford wrote: > Sorry for the slow review. Finally catching up on backlog. > > Richard Biener writes: > > On Mon, 28 Oct 2024, Alex Coplan wrote: > > > >> This allows us to vectorize more loops with early exits by forcing > >> peeling for alignment to make sure th

RE: [RFC] PR81358: Enable automatic linking of libatomic

2024-11-19 Thread Prathamesh Kulkarni
> -Original Message- > From: Xi Ruoyao > Sent: 16 November 2024 09:23 > To: Prathamesh Kulkarni ; josmy...@redhat.com; > Matthew Malcomson ; gcc-patches@gcc.gnu.org > Subject: Re: [RFC] PR81358: Enable automatic linking of libatomic > > External email: Use caution opening links or attac

Re: [PATCH 11/17] testsuite: arm: Use effective-target for pr56184.C and pr59985.C

2024-11-19 Thread Richard Earnshaw (lists)
On 19/11/2024 10:24, Torbjörn SVENSSON wrote: > Update test cases to use -mcpu=unset/-march=unset feature introduced in > r15-3606-g7d6c6a0d15c. > > gcc/testsuite/ChangeLog: > > * g++.dg/other/pr56184.C: Use effective-target > arm_arch_v7a_neon and arm_arch_v7a_thumb. > * g++.dg

Re: [PATCH v2 1/4] aarch64: return scalar fp8 values in fp registers

2024-11-19 Thread Andrew Pinski
On Fri, Nov 8, 2024 at 8:11 AM Claudio Bantaloukas wrote: > > > According to the aapcs64: If the argument is an 8-bit (...) precision > Floating-point or short vector type and the NSRN is less than 8, then the > argument is allocated to the least significant bits of register v[NSRN]. > > gcc/ >

Re: [PATCH 10/17] testsuite: arm: Use effective target for pr57735.C test

2024-11-19 Thread Richard Earnshaw (lists)
On 19/11/2024 10:24, Torbjörn SVENSSON wrote: > Update test cases to use -mcpu=unset/-march=unset feature introduced in > r15-3606-g7d6c6a0d15c. > > gcc/testsuite/ChangeLog: > > * g++.dg/ext/pr57735.C: Use effective-target arm_cpu_xscale_arm. > > Signed-off-by: Torbjörn SVENSSON > --- >

Re: [PATCH 09/17] testsuite: arm: Use effective-target for nomve_fp_1.c test

2024-11-19 Thread Richard Earnshaw (lists)
On 19/11/2024 10:23, Torbjörn SVENSSON wrote: > Update test cases to use -mcpu=unset/-march=unset feature introduced in > r15-3606-g7d6c6a0d15c. > > gcc/testsuite/ChangeLog: > > * g++.target/arm/mve/general-c++/nomve_fp_1.c: Added option > "-mcpu=unset". > > Signed-off-by: Torbjörn S

Re: [PATCH v2 04/14] tree-phinodes: Use 4 instead of 2 as the minimum number of phi args

2024-11-19 Thread Lewis Hyatt
On Tue, Nov 19, 2024 at 9:59 AM Richard Biener wrote: > > On Sun, Nov 17, 2024 at 4:28 AM Lewis Hyatt wrote: > > > > Currently, when we allocate a gphi object, we round up the capacity for the > > trailing arguments array such that it will make full use of the page size > > that ggc will allocate

Re: [patch,avr] Overhaul shift insns

2024-11-19 Thread Denis Chertykov
вт, 19 нояб. 2024 г. в 15:32, Georg-Johann Lay : > > This patch adds 3-operand alternatives to the shift insns for > offsets that are one less than the bit-size of the mode. > For example, ashrhi3 can support "r,r,C15" without overhead. > Apart from that, the asm out functions for the shifts now us

Re: [patch,avr] Use more bool

2024-11-19 Thread Denis Chertykov
вт, 19 нояб. 2024 г. в 17:21, Georg-Johann Lay : > > Now that the C default is C23, we can use bool in avr.h > (which is still used in libgcc via tm.h). > bool is a keyword in C23, so no stdbool.h is required in libgcc. > > No regressions. Ok for trunk? Ok. Please apply. Denis.

Re: [PATCH v2 10/14] Support for 64-bit location_t: gimple parts

2024-11-19 Thread Richard Biener
On Sun, Nov 17, 2024 at 4:30 AM Lewis Hyatt wrote: > > The size of struct gimple increases by 8 bytes with the change in size of > location_t from 32- to 64-bit; adjust the WORD markings in the comments > accordingly. It seems that most of the WORD markings were off by one already, > probably not

Re: [PATCH] libgccjit: Add support for machine-dependent builtins

2024-11-19 Thread David Malcolm
On Thu, 2024-11-14 at 15:27 -0500, Antoni Boucher wrote: > It seems we don't need to do the cleanup in i386-builtins.cc anymore, > so > I removed it. > David: Is it possible that your recent fixes for the GC within > libgccjit > also fixed the issue here? > > Here's the updated patch and answers

Re: [PATCH 06/17] testsuite: arm: Use effective-target for thumb2-slow-flash-data* tests

2024-11-19 Thread Richard Earnshaw (lists)
On 19/11/2024 10:23, Torbjörn SVENSSON wrote: > Update test cases to use -mcpu=unset/-march=unset feature introduced in > r15-3606-g7d6c6a0d15c. > > gcc/testsuite/ChangeLog: > > * gcc.target/arm/thumb2-slow-flash-data-2.c: Use > effective-target arm_arch_v7em and added option "-march=

Re: [PATCH] Avoid repeated calls to temporarily_undo_changes [PR117297]

2024-11-19 Thread Richard Biener
On Mon, Nov 18, 2024 at 9:13 PM Richard Sandiford wrote: > > In an attempt to reduce compile time, rtl-ssa computes the cost > of existing instructions lazily rather than eagerly. However, > this means that it might need to calculate the cost of an existing > instruction while a change group is a

Re: [PATCH 05/17] testsuite: arm: Use effective-target for small-multiply-m* tests

2024-11-19 Thread Richard Earnshaw (lists)
On 19/11/2024 10:23, Torbjörn SVENSSON wrote: > Update test cases to use -mcpu=unset/-march=unset feature introduced in > r15-3606-g7d6c6a0d15c. > > gcc/testsuite/ChangeLog: > > * gcc.target/arm/small-multiply-m0-1.c: Use effective-target > arm_arch_v6m and added option "-march=unset"

Re: [PATCH v2 10/14] Support for 64-bit location_t: gimple parts

2024-11-19 Thread Lewis Hyatt
On Tue, Nov 19, 2024 at 10:06 AM Richard Biener wrote: > > On Sun, Nov 17, 2024 at 4:30 AM Lewis Hyatt wrote: > > > > The size of struct gimple increases by 8 bytes with the change in size of > > location_t from 32- to 64-bit; adjust the WORD markings in the comments > > accordingly. It seems tha

Re: [PATCH v2] Fix MV clones can not redirect to specific target on some targets

2024-11-19 Thread Yangyu Chen
Ping again. On 11/5/24 11:37, Yangyu Chen wrote: Ping and also CC Jeff and Kito. This is also useful for RISC-V since RISC-V uses target_version, which defines TARGET_HAS_FMV_TARGET_ATTRIBUTE to zero. On 10/28/24 00:00, Yangyu Chen wrote: Following the implementation of commit b8ce8129a5 ("R

Re: [PATCH v2 05/14] gimple: Handle tail padding when computing gimple_ops_offset

2024-11-19 Thread Lewis Hyatt
On Tue, Nov 19, 2024 at 9:55 AM Richard Biener wrote: > > On Sun, Nov 17, 2024 at 4:25 AM Lewis Hyatt wrote: > > > > The array gimple_ops_offset_[], which is used to find the trailing op[] > > array for a given gimple struct, is computed assuming that op[] will be > > found at sizeof(tree) bytes

Re: [PATCH 03/17] testsuite: arm: Use effective-target for crc_hf_1.c test

2024-11-19 Thread Richard Earnshaw (lists)
On 19/11/2024 10:23, Torbjörn SVENSSON wrote: > Update test cases to use -mcpu=unset/-march=unset feature introduced in > r15-3606-g7d6c6a0d15c. > > gcc/testsuite/ChangeLog: > > * gcc.target/arm/acle/crc_hf_1.c: Use effective-target > arm_arch_v8a_hard and added option "-mcpu=unset".

Re: [PATCH 02/17] testsuite: arm: Use effective-target for pacbti-m-predef* tests

2024-11-19 Thread Richard Earnshaw (lists)
On 19/11/2024 10:23, Torbjörn SVENSSON wrote: > Update test cases to use -mcpu=unset/-march=unset feature introduced in > r15-3606-g7d6c6a0d15c. > > gcc/testsuite/ChangeLog: > > * gcc.target/arm/acle/pacbti-m-predef-1.c: Use effective-target > arm_arch_v8_1m_main. > * gcc.target

Re: [PATCH v2 04/14] tree-phinodes: Use 4 instead of 2 as the minimum number of phi args

2024-11-19 Thread Richard Biener
On Sun, Nov 17, 2024 at 4:28 AM Lewis Hyatt wrote: > > Currently, when we allocate a gphi object, we round up the capacity for the > trailing arguments array such that it will make full use of the page size > that ggc will allocate. While there is also an explicit minimum of 2 > arguments, in prac

Re: [PATCH v1 1/2] RISC-V: Fix incorrect optimization options passing to strided ld/st test

2024-11-19 Thread Jeff Law
On 11/19/24 7:19 AM, Li, Pan2 wrote: Thanks Jeff for comments. So if this change is the right one to make for the strided subdirectory, then shouldn't it also be correct to make for the gather-scatter subdirectory as well? And similarly for various other instances where we call dg-runtest

C++ stage1 patch ping

2024-11-19 Thread Jakub Jelinek
Hi! I'd like to ping 17 C++ patches: https://gcc.gnu.org/pipermail/gcc-patches/2024-July/658137.html libcpp, c++: Optimize initializers using #embed in C++ https://gcc.gnu.org/pipermail/gcc-patches/2024-August/659333.html c++: Speed up compilation of large char array initializers when not us

Re: [PATCH v2 05/14] gimple: Handle tail padding when computing gimple_ops_offset

2024-11-19 Thread Richard Biener
On Sun, Nov 17, 2024 at 4:25 AM Lewis Hyatt wrote: > > The array gimple_ops_offset_[], which is used to find the trailing op[] > array for a given gimple struct, is computed assuming that op[] will be > found at sizeof(tree) bytes away from the end of the struct. This is only > correct if the alig

[patch,avr,applied] ad PR84211: Fix build fallout from PR84211 on some hosts

2024-11-19 Thread Georg-Johann Lay
Am 19.11.24 um 14:48 schrieb Georg-Johann Lay: Am 19.11.24 um 13:31 schrieb Andreas Schwab: ../../gcc/config/avr/avr-passes.cc: In member function ‘void {anonymous}::memento_t::apply_insn1(rtx_insn*, bool)’: ../../gcc/config/avr/avr-passes.cc:2119:9: error: no match for ‘operator&=’ (operand ty

[pushed] c++: reduce redundant deprecated warnings

2024-11-19 Thread Jason Merrill
Tested x86_64-pc-linux-gnu, applying to trunk. -- 8< -- If a template uses a deprecated function, we should warn there and not also whenever the template is instantiated. I implement this by suppressing the warning at the location; then to make this also work with modules, I need to make sure to

RE: [PATCH v1 1/2] RISC-V: Fix incorrect optimization options passing to strided ld/st test

2024-11-19 Thread Li, Pan2
Thanks Jeff for comments. > So if this change is the right one to make for the strided subdirectory, > then shouldn't it also be correct to make for the gather-scatter > subdirectory as well? > And similarly for various other instances where we call dg-runtest in > that file. Yes, all "" "$op

Re: [PATCH v1 1/2] RISC-V: Fix incorrect optimization options passing to strided ld/st test

2024-11-19 Thread Jeff Law
On 11/19/24 1:30 AM, pan2...@intel.com wrote: From: Pan Li The testcases of vector strided load/store are designed to pick up different sorts of optimization options but actually these option are ignored according to the Execution log of gcc.log. This patch would like to make it correct, an

Re: [PATCH] testsuite: arm: Require 16-bit float support

2024-11-19 Thread Richard Earnshaw (lists)
On 18/11/2024 12:00, Christophe Lyon wrote: > Hi Torbjörn, > > > On 11/18/24 10:37, Torbjorn SVENSSON wrote: >> >> >> On 2024-11-08 20:37, Torbjorn SVENSSON wrote: >>> >>> >>> On 2024-11-08 12:24, Richard Earnshaw (lists) wrote: On 05/11/2024 20:06, Torbjörn SVENSSON wrote: > Based on ho

Re: [PATCH v2 2/4] vect: disable multiple calls of poly simdclones

2024-11-19 Thread Victor Do Nascimento
Richard Biener writes: > On Mon, 18 Nov 2024, Victor Do Nascimento wrote: > >> On 11/5/24 07:39, Richard Biener wrote: >> > On Tue, 5 Nov 2024, Victor Do Nascimento wrote: >> > >> >> The current codegen code to support VF's that are multiples of a simdclone >> >> simdlen rely on BIT_FIELD_REF to

[PATCH] v2: Add -f{,no-}assume-sane-operators-new-delete options [PR110137]

2024-11-19 Thread Jakub Jelinek
On Tue, Nov 19, 2024 at 11:23:31AM +0100, Jakub Jelinek wrote: > On Tue, Nov 19, 2024 at 10:25:16AM +0100, Richard Biener wrote: > > I think it's pretty clear and easy to describe to users what "m " and > > what "mC" do. But with "pure" this is an odd intermediate state. For both > > "m " and "m

Re: [PATCH v2] RISC-V: Tie MUL and DIV masks to the M extension

2024-11-19 Thread Jeff Law
On 11/15/24 8:31 AM, Dimitar Dimitrov wrote: When configuring GCC for RV32EC with: ./configure \ --target=riscv32-none-elf \ --with-multilib-generator="rv32ec-ilp32e--" \ --with-abi=ilp32e \

Re: [patch,avr] PR84211: Add a new post reload optimization pass

2024-11-19 Thread Georg-Johann Lay
Am 19.11.24 um 13:31 schrieb Andreas Schwab: ../../gcc/config/avr/avr-passes.cc: In member function ‘void {anonymous}::memento_t::apply_insn1(rtx_insn*, bool)’: ../../gcc/config/avr/avr-passes.cc:2119:9: error: no match for ‘operator&=’ (operand types are ‘{anonymous}::gprmask_t’ {aka ‘unsigned

Re: [PATCH v2] testsuite: arm: Only check for literal pools in no-literal-pool-m0.c

2024-11-19 Thread Richard Earnshaw (lists)
On 18/11/2024 11:13, Torbjörn SVENSSON wrote: > Changes since v1: > > - Replaced fragile checks on constants with check for literal pool > using "ldr r[0-9]+, \.L[0-9]+". > > Ok for trunk? > > -- > > With the changes in r15-1579-g792f97b44ff, the constants have been > updated. > This patch dr

Re: [PATCH v5] forwprop: Try to blend two isomorphic VEC_PERM sequences

2024-11-19 Thread Richard Biener
On Sat, Nov 16, 2024 at 12:00 AM Christoph Müllner wrote: > > This extends forwprop by yet another VEC_PERM optimization: > It attempts to blend two isomorphic vector sequences by using the > redundancy in the lane utilization in these sequences. > This redundancy in lane utilization comes from th

Re: *PING* [PATCH 0/7] fortran: Inline MINLOC/MAXLOC with DIM [PR90608]

2024-11-19 Thread Mikael Morin
Le 18/11/2024 à 20:18, Steve Kargl a écrit : Mikael, I've read through each of the patch and nothing jumped out as an issue. I think you can go ahead and commit them. I'll leave it up to you whether to commit a patch and wait a short time before committing the next in the series. The short t

[COMMITTED 2/3] ada: Small fix in expansion of array aggregates handled by the back end

2024-11-19 Thread Marc Poulhiès
From: Eric Botcazou The (minimal) expansion is now done by Build_Array_Aggr_Code in all cases, which means that it must prevent the aggregate from being re-analyzed as the RHS of the assignment, which may trigger a bogus warning and lead to another useless rewriting. The change also inlines Buil

[COMMITTED 3/3] ada: Rename Within_Case_Or_If_Expression predicate

2024-11-19 Thread Marc Poulhiès
From: Eric Botcazou The case and if expressions are exactly the conditional expressions. gcc/ada/ChangeLog: * exp_util.ads (Within_Case_Or_If_Expression): Rename into... (Within_Conditional_Expression): ...this. * exp_util.adb (Within_Case_Or_If_Expression): Rename into.

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

2024-11-19 Thread Richard Biener
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 those are not eliminatable later and only assumes one

Re: [PATCH 3/3] AArch64: Add SVE vector cost to baseline tuning

2024-11-19 Thread Richard Sandiford
Kyrylo Tkachov writes: >> On 15 Nov 2024, at 12:33, Wilco Dijkstra wrote: >> >> Hi Kyrill, >> >>> This would make USE_NEW_VECTOR_COSTS effectively the default. >>> Jennifer has been trying to do that as well and then to remove it (as it >>> would be always true) but there are some codegen regr

Re: [PATCH] v2: Add -f{, no-}assume-sane-operators-new-delete options [PR110137]

2024-11-19 Thread Richard Biener
On Tue, 19 Nov 2024, Jakub Jelinek wrote: > On Tue, Nov 19, 2024 at 11:23:31AM +0100, Jakub Jelinek wrote: > > On Tue, Nov 19, 2024 at 10:25:16AM +0100, Richard Biener wrote: > > > I think it's pretty clear and easy to describe to users what "m " and > > > what "mC" do. But with "pure" this is a

Re: [PATCH] [PR106329] SVE intrinsics: Fold calls with pfalse predicate.

2024-11-19 Thread Richard Sandiford
Jennifer Schmitz writes: > If an SVE intrinsic has predicate pfalse, we can fold the call to > a simplified assignment statement: For _m predication, the LHS can be assigned > the operand for inactive values and for _z, we can assign a zero vector. > For _x, the returned values can be arbitrary an

[PATCH 16/17] testsuite: arm: Use effective-target for its.c test [PR94531]

2024-11-19 Thread Torbjörn SVENSSON
The test case gcc.target/arm/its.c was created together with restriction of IT blocks for Cortex-M7. As the test case fails on all tunes that does not match Cortex-M7, explicitly test it for Cortex-M7. To have some additional faith that GCC does the correct thing, I also added another variant of th

[PATCH COMMITTED] Remove Debian from SECURITY.txt

2024-11-19 Thread Florian Weimer
As requested by the Debian security team. * SECURITY.txt: Remove Debian. --- SECURITY.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/SECURITY.txt b/SECURITY.txt index 126603d4c22..b38425ea223 100644 --- a/SECURITY.txt +++ b/SECURITY.txt @@ -180,7 +180,6 @@ Reporting private secur

  1   2   >