[to-be-committed] RISC-V: Primary vector pipeline model for sifive 7 series

2025-06-29 Thread Kito Cheng
This commit introduces a primary vector pipeline model for the SiFive 7 series, that pipeline model is kind of simplified version, it only defined vector command queue, arithmetic unit, and vector load store unit. The latency of real hardware is LMUL-aware, but I realize that will complicate the m

[to-be-committed] RISC-V: Adding B ext, fp16 and missing scalar instruction type for sifive-7 pipeline model [PR120659]

2025-06-29 Thread Kito Cheng
gcc/ChangeLog: PR target/120659 * config/riscv/sifive-7.md: Add B extension, fp16 and missing scalar instruction type for sifive-7 pipeline model. gcc/testsuite/ChangeLog: PR target/120659 * gcc.target/riscv/pr120659.c: New test. --- gcc/config/riscv/sifi

Re: [PATCH] x86: Preserve frame pointer for no_callee_saved_registers attribute

2025-06-29 Thread H.J. Lu
On Mon, Jun 30, 2025 at 2:06 PM Hongtao Liu wrote: > > On Mon, Jun 30, 2025 at 11:16 AM H.J. Lu wrote: > > > > On Mon, Jun 30, 2025 at 10:37 AM Hongtao Liu wrote: > > > > > > On Sat, Jun 28, 2025 at 8:30 PM H.J. Lu wrote: > > > > > > > > Update functions with no_callee_saved_registers/preserve_

[to-be-committed] RISC-V: Ignore -Oz for most rvv testcase [NFC]

2025-06-29 Thread Kito Cheng
Most testcase in rvv folder already ignore -Oz, but some of them are not. This patch makes them consistent. gcc/testsuite/ChangeLog. * gcc.target/riscv/rvv/vsetvl/avl_single-21.c: Ignore -Oz. * gcc.target/riscv/rvv/vsetvl/avl_single-26.c: Ditto. * gcc.target/riscv/rvv/vset

Re: [PATCH] RISC-V: Vector-scalar negate-multiply-(subtract-)accumulate [PR119100]

2025-06-29 Thread Robin Dapp
This is failing pre-commit testing: linux rv64gcv lp64d medlow multilib: FAIL: gcc.target/riscv/rvv/base/bug-4.c (internal compiler error: in extract_insn, at recog.cc:2882) FAIL: gcc.target/riscv/rvv/base/bug-4.c (test for excess errors) linux rv32gcv ilp32d medlow multilib: FAIL: gcc.target

Re: [PATCH V1] RISC-V:Add the MIPS P8700 conditional move extension instruction support.

2025-06-29 Thread Umesh Kalappa
Thank you @Jeff Law for the comments and >>I suspect there's something goofy in the indentation in the block above. like clang-format ,does gcc have a code formatter we can use ? Thank you again ~U On Mon, Jun 30, 2025 at 12:33 AM Jeff Law wrote: > > > On 6/13/25 9:01 AM, Umesh Kalappa wrot

Re: [PATCH v2] x86: Preserve frame pointer for no_callee_saved_registers attribute

2025-06-29 Thread Hongtao Liu
On Mon, Jun 30, 2025 at 11:46 AM H.J. Lu wrote: > > On Mon, Jun 30, 2025 at 11:17 AM H.J. Lu wrote: > > > > On Mon, Jun 30, 2025 at 10:41 AM Hongtao Liu wrote: > > > > > > On Mon, Jun 30, 2025 at 10:37 AM Hongtao Liu wrote: > > > > > > > > On Sat, Jun 28, 2025 at 8:30 PM H.J. Lu wrote: > > > >

Re: [PATCH] x86: Preserve frame pointer for no_callee_saved_registers attribute

2025-06-29 Thread Hongtao Liu
On Mon, Jun 30, 2025 at 11:16 AM H.J. Lu wrote: > > On Mon, Jun 30, 2025 at 10:37 AM Hongtao Liu wrote: > > > > On Sat, Jun 28, 2025 at 8:30 PM H.J. Lu wrote: > > > > > > Update functions with no_callee_saved_registers/preserve_none attribute > > > to preserve frame pointer since caller may use

Request

2025-06-29 Thread Farhan Faruqui
Hello, May I confirm that this is the correct email address to reach you for a proposal? Farhan Faruqui

Re: [Patch, Fortran, Coarray, PR88076, v1] 0/6 Add a shared memory multi process coarray library.

2025-06-29 Thread Steve Kargl
;gmake check-fortran', and if I use RUNTESTFLAGS='dg.exp=\*unsign\*' to test the unsigned issue reported earlier, I see === gfortran Summary === # of expected passes434 # of unsupported tests 6 /home/kargl/gcc/obj/gcc/gfortran version 16.0.0 20250629 (experimental) (GC

Re: [Patch, Fortran, Coarray, PR88076, v1] 0/6 Add a shared memory multi process coarray library.

2025-06-29 Thread Steve Kargl
Yet, another head scratcher. ../../../gcc/libgfortran/caf/shmem/supervisor.c:235:27: error: 'environ' undeclared (first use in this function) 235 | for (char **e = environ; *e; ++e, ++n) | ^~~ I see 'extern char **environ;' in shmem.c. Is this sup

Re: [Patch, Fortran, Coarray, PR88076, v1] 0/6 Add a shared memory multi process coarray library.

2025-06-29 Thread Steve Kargl
On Sun, Jun 29, 2025 at 07:06:57PM -0700, Steve Kargl wrote: > On Sun, Jun 29, 2025 at 06:54:53PM -0700, Steve Kargl wrote: > > > > /usr/local/bin/ld: cannot find -lcaf_shmem: No such file or directory > > collect2: error: ld returned 1 exit status > > compiler exited with status 1 > > > > The fre

[PATCH v2] x86: Preserve frame pointer for no_callee_saved_registers attribute

2025-06-29 Thread H.J. Lu
On Mon, Jun 30, 2025 at 11:17 AM H.J. Lu wrote: > > On Mon, Jun 30, 2025 at 10:41 AM Hongtao Liu wrote: > > > > On Mon, Jun 30, 2025 at 10:37 AM Hongtao Liu wrote: > > > > > > On Sat, Jun 28, 2025 at 8:30 PM H.J. Lu wrote: > > > > > > > > Update functions with no_callee_saved_registers/preserve

Re: [PATCH] x86: Preserve frame pointer for no_callee_saved_registers attribute

2025-06-29 Thread Hongtao Liu
On Sat, Jun 28, 2025 at 8:30 PM H.J. Lu wrote: > > Update functions with no_callee_saved_registers/preserve_none attribute > to preserve frame pointer since caller may use it to save the current > stack: > > pushq %rbp > movq %rsp, %rbp > ... > call function > ... > leave > ret > > If callee chang

Re: [PATCH] x86: Preserve frame pointer for no_callee_saved_registers attribute

2025-06-29 Thread H.J. Lu
On Mon, Jun 30, 2025 at 10:41 AM Hongtao Liu wrote: > > On Mon, Jun 30, 2025 at 10:37 AM Hongtao Liu wrote: > > > > On Sat, Jun 28, 2025 at 8:30 PM H.J. Lu wrote: > > > > > > Update functions with no_callee_saved_registers/preserve_none attribute > > > to preserve frame pointer since caller may

RE: [COMMITTED, PATCH] shrink_wrap_separate_check_lea.c: Scan lea(l|q)

2025-06-29 Thread Cui, Lili
> -Original Message- > From: H.J. Lu > Sent: Monday, June 30, 2025 4:16 AM > To: Uros Bizjak > Cc: Cui, Lili ; GCC Patches ; > Liu, > Hongtao ; Richard Biener > ; Michael Matz > Subject: [COMMITTED, PATCH] shrink_wrap_separate_check_lea.c: Scan > lea(l|q) > > On Tue, Jun 17, 2025 at

Re: [PATCH] x86: Preserve frame pointer for no_callee_saved_registers attribute

2025-06-29 Thread H.J. Lu
On Mon, Jun 30, 2025 at 10:37 AM Hongtao Liu wrote: > > On Sat, Jun 28, 2025 at 8:30 PM H.J. Lu wrote: > > > > Update functions with no_callee_saved_registers/preserve_none attribute > > to preserve frame pointer since caller may use it to save the current > > stack: > > > > pushq %rbp > > movq %

Re: [PATCH] x86: Preserve frame pointer for no_callee_saved_registers attribute

2025-06-29 Thread Hongtao Liu
On Mon, Jun 30, 2025 at 10:37 AM Hongtao Liu wrote: > > On Sat, Jun 28, 2025 at 8:30 PM H.J. Lu wrote: > > > > Update functions with no_callee_saved_registers/preserve_none attribute > > to preserve frame pointer since caller may use it to save the current > > stack: > > > > pushq %rbp > > movq %

Re: [Patch, Fortran, Coarray, PR88076, v1] 0/6 Add a shared memory multi process coarray library.

2025-06-29 Thread Steve Kargl
On Sun, Jun 29, 2025 at 06:54:53PM -0700, Steve Kargl wrote: > > /usr/local/bin/ld: cannot find -lcaf_shmem: No such file or directory > collect2: error: ld returned 1 exit status > compiler exited with status 1 > > The freshly built gfortran cannot find the libcaf_shmem.a. > % find . -name \*li

Re: [Patch, Fortran, Coarray, PR88076, v1] 0/6 Add a shared memory multi process coarray library.

2025-06-29 Thread Steve Kargl
On Sun, Jun 29, 2025 at 03:30:21PM -0700, Steve Kargl wrote: > On Sun, Jun 29, 2025 at 11:07:31AM -0700, Steve Kargl wrote: > > On Sun, Jun 29, 2025 at 10:35:39AM -0700, Steve Kargl wrote: > > > > > > === gfortran Summary === > > > > > > # of expected passes73149 > > >

Re: [PATCH V3] x86: Enable separate shrink wrapping

2025-06-29 Thread Segher Boessenkool
Hi! On Tue, Jun 17, 2025 at 10:03:28PM +0800, Cui, Lili wrote: > Collected spec2017 performance on ZNVER5, EMR and ICELAKE. No performance > regression was observed. > For O2 multi-copy : > 511.povray_r improved by 2.8% on ZNVER5. > 511.povray_r improved by 4.2% on EMR No huge improvement, but n

Re: [Patch, Fortran, Coarray, PR88076, v1] 0/6 Add a shared memory multi process coarray library.

2025-06-29 Thread Steve Kargl
On Sun, Jun 29, 2025 at 11:07:31AM -0700, Steve Kargl wrote: > On Sun, Jun 29, 2025 at 10:35:39AM -0700, Steve Kargl wrote: > > > > === gfortran Summary === > > > > # of expected passes73149 > > # of unexpected failures522 It seems that something is mucking wi

Re: [PATCH v6 14/19] c++: Fix FMV return type ambiguation

2025-06-29 Thread Jeff Law
On 6/12/25 11:03 AM, Alfie Richards wrote: Add logic for the case of two FMV annotated functions with identical signature other than the return type. Previously this was ignored, this changes the behavior to emit a diagnostic. gcc/cp/ChangeLog: PR c++/119498 * decl.cc (duplic

[COMMITTED, PATCH] shrink_wrap_separate_check_lea.c: Scan lea(l|q)

2025-06-29 Thread H.J. Lu
On Tue, Jun 17, 2025 at 10:33 PM Uros Bizjak wrote: > > On Tue, Jun 17, 2025 at 4:03 PM Cui, Lili wrote: > > > > From: Lili Cui > > > > Hi Uros, > > > > This is patch v3, the main changes are as follows. > > > > 1. Added a pro_epilogue_adjust_stack_add_nocc in i386.md to add memory > > clobber

Re: [PATCH] expand: Allow reuse of local memory for tail call argument [PR42909]

2025-06-29 Thread Andrew Pinski
On Sun, Jun 29, 2025, 12:18 PM Jeff Law wrote: > > > On 6/27/25 12:16 AM, Andrew Pinski wrote: > > Since after a tail call function (even if it is tail called in the end), > > the current function does not care about the local memory any more so > > there is no reason to do a copy of the argument

Re: [PATCH] RISC-V: Vector-scalar negate-multiply-(subtract-)accumulate [PR119100]

2025-06-29 Thread Jeff Law
On 6/26/25 8:53 AM, Paul-Antoine Arras wrote: This pattern enables the combine pass (or late-combine, depending on the case) to merge a vec_duplicate into a (possibly negated) minus-mult RTL instruction. Before this patch, we have two instructions, e.g.: vfmv.v.fv6,fa0 vfnmacc.v

Re: [PATCH v6 11/19] c/c++: Add target_[version/clones] to decl diagnostics formatting.

2025-06-29 Thread Jeff Law
On 6/12/25 11:00 AM, Alfie Richards wrote: Adds the target_version and target_clones attributes to diagnostic messages for target_version semantics. This is because the target_version/target_clones attributes affect the identity of the decls, so need to be represented in diagnostics for them.

Re: [PATCH v6 09/19] fmv: Add reject_target_clone hook for filtering target_clone versions.

2025-06-29 Thread Jeff Law
On 6/12/25 11:00 AM, Alfie Richards wrote: This patch introduces the TARGET_REJECT_FUNCTION_CLONE_VERSION hook which is used to determine if a target_clones version string parses. If true is returned, a warning is emitted and from then on the version is ignored. This is as specified in the A

Re: [PATCH v6 08/19] riscv: Refactor riscv target parsing to take string_slice.

2025-06-29 Thread Jeff Law
On 6/12/25 11:00 AM, Alfie Richards wrote: This is a quick refactor of the riscv target processing code to take a string_slice rather than a decl. The reason for this is to enable it to work with target_clones where merging logic requires reasoning about each version string individually in th

Re: [PATCH] expand: Allow reuse of local memory for tail call argument [PR42909]

2025-06-29 Thread Jeff Law
On 6/27/25 12:16 AM, Andrew Pinski wrote: Since after a tail call function (even if it is tail called in the end), the current function does not care about the local memory any more so there is no reason to do a copy of the argument. This is only true for the first usage of the decl, the rest

Re: [PATCH v2] RISC-V: Refactor the function bitmap_union_of_preds_with_entry

2025-06-29 Thread Jeff Law
On 6/28/25 6:07 AM, Jin Ma wrote: The current implementation of this function is somewhat difficult to understand, as it uses a direct break statement within the for loop, rendering the loop meaningless. Additionally, during the Coverity check on the for loop, a warning appeared: "unreachable:

Re: [PATCH V1] RISC-V:Add the MIPS P8700 conditional move extension instruction support.

2025-06-29 Thread Jeff Law
On 6/13/25 9:01 AM, Umesh Kalappa wrote: Addressed the most of comments and tried to refactor the riscv_expand_conditional_move() to some extent. No regressions are found for "runtest --tool gcc --target_board='riscv-sim/-mabi=lp64d/-mtune=mips-p8700/-O2 ' riscv.exp" *config/riscv/

[RFC PATCH v2 1/3] Fortran: Do not make_decl_rtl in trans_function_start

2025-06-29 Thread Yangyu Chen
This patch is a preparation for the function multi-versioning support in Fortran. The function multi-versioning support requires changing the change_decl_assembler_name to add the target suffix, which is not allowed after make_decl_rtl is called, since the assembler name will be in the constant poo

[RFC PATCH v2 3/3] Add -ftarget-clones-table option support

2025-06-29 Thread Yangyu Chen
This patch adds support for target_clones table option. The target_clones table option allows users to specify multiple versions of a function and select the version at runtime based on the specified table. The target clone table is a JSON object where function names serve as keys, and their value

[RFC PATCH v2 2/3] json: add iterate method to object class

2025-06-29 Thread Yangyu Chen
Currently, the object class in json.h does not provide a way to iterate over its keys. This commit adds an `iterate` method to the object class, allowing users to iterate over the keys of a JSON object. Signed-off-by: Yangyu Chen gcc/ChangeLog: * json.h (class object): Add iterate metho

[RFC PATCH v2 0/3] Add -ftarget-clones-table option support

2025-06-29 Thread Yangyu Chen
This patch series introduces support for the target_clones table option in GCC. This option enables users to specify target_clones attributes in a separate file, allowing GCC to generate multiple versions of the function with different ISA extensions based on the specified table. This is achieved u

Re: [Patch, Fortran, Coarray, PR88076, v1] 0/6 Add a shared memory multi process coarray library.

2025-06-29 Thread Steve Kargl
On Sun, Jun 29, 2025 at 08:36:38PM +0200, Andre Vehreschild wrote: > > I would do git am pr88076_v1_1.patch or patch -p1 each of the patch files. Then they go where they ought to be. Thanks. I needed -p1 for v1_5 and v1_6. > Pro tip: create a new branch before doing the git am, then you can ju

Re: [Patch, Fortran, Coarray, PR88076, v1] 0/6 Add a shared memory multi process coarray library.

2025-06-29 Thread Andre Vehreschild
Hi Steve, I would do git am pr88076_v1_1.patch or patch -p1 each of the patch files. Then they go where they ought to be. Pro tip: create a new branch before doing the git am, then you can just switch back to master when desired. - Andre Andre Vehreschild * ve...@gmx.de Am 29. Juni 2025 20:2

Re: [Patch, Fortran, Coarray, PR88076, v1] 0/6 Add a shared memory multi process coarray library.

2025-06-29 Thread Steve Kargl
On Sun, Jun 29, 2025 at 10:35:39AM -0700, Steve Kargl wrote: > > Just applied the 6 patch (with the update part 5). I'm > seeing a significant increase in the number of failures > in 'make check-fortran' testing. > Just re-applied your patches in the top-level gcc/ directory. I was expecting mo

Re: [PATCH] c++: Fix up cp_build_array_ref COND_EXPR handling [PR120471]

2025-06-29 Thread Jason Merrill
On 6/28/25 3:08 AM, Jakub Jelinek wrote: On Fri, Jun 27, 2025 at 06:49:12PM -0400, Jason Merrill wrote: On 6/27/25 5:58 PM, Jakub Jelinek wrote: The following testcase is miscompiled since the introduction of UBSan, cp_build_array_ref COND_EXPR handling replaces (cond ? a : b)[idx] with cond ?

Re: [PATCH RFC] libgcc: don't use a weak ref for __cxa_finalize

2025-06-29 Thread Jason Merrill
On 6/28/25 3:17 PM, Florian Weimer wrote: * Jason Merrill: Since r10-6069[1] we control the call to __cxa_finalize with DEFAULT_USE_CXA_ATEXIT, so there's no need to also declare it as a weak reference; if the target has __cxa_atexit, it must also have __cxa_finalize. I expect that most targe

Re: [Patch, Fortran, Coarray, PR88076, v1] 0/6 Add a shared memory multi process coarray library.

2025-06-29 Thread Steve Kargl
On Sun, Jun 29, 2025 at 10:35:39AM -0700, Steve Kargl wrote: > > === gfortran Summary === > > # of expected passes73149 > # of unexpected failures522 > # of expected failures 343 > # of unresolved testcases 78 > # of unsupported tests 94

Re: [Patch, Fortran, Coarray, PR88076, v1] 0/6 Add a shared memory multi process coarray library.

2025-06-29 Thread Steve Kargl
On Thu, Jun 26, 2025 at 10:15:01AM +0200, Andre Vehreschild wrote: > > I deem this library fit for educational and research use, > where small to medium sized problems are researched. I do > not expect it to support a long term running application, > because is does not join adjacent blocks in th

Re: [Patch, Fortran, Coarray, PR88076, v1] 0/6 Add a shared memory multi process coarray library.

2025-06-29 Thread Steve Kargl
On Tue, Jun 24, 2025 at 03:09:33PM +0200, Andre Vehreschild wrote: > > this series of patches (six in total) adds a new coarray backend library to > libgfortran. The library uses shared memory and processes to implement > running multiple images on the same node. The work is based on work starte

Re: [PATCH v2] expand: Allow sibcalling for return structures in some cases [PR71761]

2025-06-29 Thread Jeff Law
On 6/25/25 8:58 PM, Andrew Pinski wrote: In the case of tailing call with a return of a structure, currently all large structures are rejected. We can allow the case were the return of the "tail call" function is setting the return value of the current function. This allows for the musttail t

[COMMITTED] cobol: Normalize generating and using function_decls.

2025-06-29 Thread Robert Dubner
These changes have been shown to generate more sensible code on both x86_64. On x86_64-pc-linux, a bootstrap build of --enable-languages=c,c++,cobol succeeded. >From b91fce351b74ab65016a19116ecf1bc1da9cc9cd Mon Sep 17 00:00:00 2001 From: Robert Dubner mailto:rdub...@symas.com Date: Sun, 29 Jun 20

Re: [PATCH] lra: Check for null lowpart_subregs [PR120733]

2025-06-29 Thread Jeff Law
On 6/24/25 4:30 AM, Richard Sandiford wrote: lra-eliminations.cc:move_plus_up tries to: Transform (subreg (plus reg const)) to (plus (subreg reg) const) when it is possible. Most of it is heavily conditional: if (!paradoxical_subreg_p (x) && GET_CODE (subreg_reg) == PLUS

Re: [PATCH] [testsuite] restore default action from dfp.exp [PR120631]

2025-06-29 Thread Jeff Law
On 6/26/25 1:08 AM, Alexandre Oliva wrote: dfp.exp tests for dfprt before deciding whether to default to run or compile, and the PR120631 tests override that without checking for dfprt. Rework them to avoid attempting to link and run programs when dfp runtime support isn't available. Tested

Re: [PATCH][RFC] phiopt: Optimize A < 0 ? ARG1 OP 2^n-1 : ARG1

2025-06-29 Thread Jeff Law
On 6/28/25 2:36 PM, Andrew Pinski wrote: On Sat, Jun 28, 2025, 1:19 PM Jeff Law > wrote: On 6/27/25 12:20 PM, Andrew Pinski wrote: > > > > I have been trying to most of the phiopt to over to use match and > simplify (via match.p

AFDO/FDO profile comparator

2025-06-29 Thread Jan Hubicka
> > > > On 24 Jun 2025, at 7:43 pm, Jan Hubicka wrote: > > > > External email: Use caution opening links or attachments > > > > > > Hi, > > this pass removes early-inlining from afdo pass since all inlining > > should now happen from early inliner. I tedted this on spec and there > > are 3 i

Re: [PATCH] x86: Preserve frame pointer for no_callee_saved_registers attribute

2025-06-29 Thread Sam James
"H.J. Lu" writes: > Update functions with no_callee_saved_registers/preserve_none attribute > to preserve frame pointer since caller may use it to save the current > stack: > > pushq %rbp > movq %rsp, %rbp > ... > call function > ... > leave > ret > > If callee changes frame pointer without resto

[COMMITED] contrib/mklog.py: Fix writing to a global variable

2025-06-29 Thread Filip Kastl
The last patch of mklog.py put top-level code into function 'main()'. Because of this, writing to global variable 'root' has to be preceded by explicitly declaring 'root' as global. Otherwise the write only has a local effect. Without this change, the '-d' cmdline flag would be broken. Commited