Re: [PATCH] Tweak documentation of ASM_INPUT_P

2024-08-27 Thread Richard Biener
On Tue, Aug 27, 2024 at 7:17 PM Richard Sandiford wrote: > > The documentation of ASM_INPUT_P implied that the flag has no > effect on ASM_EXPRs that have operands (and which therefore must be > extended asms). In fact we require ASM_INPUT_P to be false for all > extended asms. Quite a bad name

Re: [PATCH] RISC-V: Add missing mode_idx for vrol and vror

2024-08-27 Thread Kito Cheng
committed to trunk. > You don't need an OK of course but LGTM. > > When I found another instance of this I was thinking about having > exhaustive self tests for those attributes. Maybe a good learning > exercise? Yeah, that would be great, otherwise it's not really easy to maintain those attribu

[PATCH] libstdc++: Add missing feature-test macro in

2024-08-27 Thread Dhruv Chawla
version.syn#2 requires to define __cpp_lib_allocator_traits_is_always_equal. The attached patch therefore defines the __glibcxx_want_allocator_traits_is_always_equal macro to get the definition of the feature-test macro from . This is not isolated only to though. The standard requires the foll

Re: [PATCH v1 1/2] RISC-V: Add testcases for unsigned scalar quad and oct .SAT_TRUNC form 2

2024-08-27 Thread Patrick O'Neill
Thanks for the ping - It's running now: https://github.com/ewlu/gcc-precommit-ci/issues/2146 Patrick On 8/27/24 18:22, Li, Pan2 wrote: Hi Patrick, Could you please help to re-trigger the pre-commit? Thanks in advance! Pan -Original Message- From: Patrick O'Neill Sent: Tuesday, Augu

[PATCH 2/3] aarch64: Handle cost for vector add reduction

2024-08-27 Thread Andrew Pinski
While working on PR 114224 (popcount costs is not modeled), I noticed that addv (vector reduction add) was not handled either. This adds the handling there. Some of the extends are part of the instructions so we need to handle those too. gcc/ChangeLog: * config/aarch64/aarch64.cc (aarch6

[PATCH 3/3] aarch64: Add rtx cost for popcount [PR114224]

2024-08-27 Thread Andrew Pinski
While looking into some popcount related I noticed that the popcount cost is not modeled at all. This adds both the vector and scalar (for CSSC) costs. For CSSC, we default to `COSTS_N_INSNS (3)` based on the Ampere1B's cycle count that is found from LLVM's model. Built and tested for aarch64-linu

[PATCH 1/3] expand: Add debug dump on the cost for `popcount==1` expand

2024-08-27 Thread Andrew Pinski
While working on PR 114224, I found it would be useful to dump the different costs of the expansion to make easier to understand why one was chosen over the other. Bootstrapped and tested on x86_64-linux-gnu. Build and tested for aarch64-linux-gnu. gcc/ChangeLog: * internal-fn.cc (expand

[PATCH v3] Vect: Reconcile the const_int operand type of unsigned .SAT_ADD

2024-08-27 Thread pan2 . li
From: Pan Li The .SAT_ADD has 2 operand, when one of the operand may be INTEGER_CST. For example _1 = .SAT_ADD (_2, 9) comes from below sample code. Form 3: #define DEF_VEC_SAT_U_ADD_IMM_FMT_3(T, IMM) \ T __attribute__((noinline))

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

2024-08-27 Thread Andrew Pinski
On Tue, Aug 27, 2024 at 8:54 PM Kugan Vivekanandarajah wrote: > > Hi Richard, > > Thanks for the reply. > > > On 27 Aug 2024, at 7:05 pm, Richard Biener > > wrote: > > > > External email: Use caution opening links or attachments > > > > > > On Tue, Aug 27, 2024 at 8:23 AM Kugan Vivekanandarajah

New Georgian PO file for 'gcc' (version 14.2.0)

2024-08-27 Thread Translation Project Robot
Hello, gentle maintainer. This is a message from the Translation Project robot. A revised PO file for textual domain 'gcc' has been submitted by the Georgian team of translators. The file is available at: https://translationproject.org/latest/gcc/ka.po (This file, 'gcc-14.2.0.ka.po', has j

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

2024-08-27 Thread Kugan Vivekanandarajah
Hi Richard, Thanks for the reply. > On 27 Aug 2024, at 7:05 pm, Richard Biener wrote: > > External email: Use caution opening links or attachments > > > On Tue, Aug 27, 2024 at 8:23 AM Kugan Vivekanandarajah > wrote: >> >> Hi Richard, >> >>> On 22 Aug 2024, at 10:34 pm, Richard Biener >>

[gcc-wwwdocs PATCH] gcc-15: Mention recent update for x86_64 backend

2024-08-27 Thread Haochen Jiang
Hi all, Sorry for the disturb since I mis-typoed gcc-patches to gcc-patchs, resend the patch. This patch will add documentation for recent update in x86-64 backend. Ok for wwwdocs trunk? Thx, Haochen --- Mention AVX10.2 support and Xeon Phi removal in GCC 15. --- htdocs/gcc-15/changes.html

RE: [PATCH v1 1/2] RISC-V: Add testcases for unsigned scalar quad and oct .SAT_TRUNC form 2

2024-08-27 Thread Li, Pan2
Hi Patrick, Could you please help to re-trigger the pre-commit? Thanks in advance! Pan -Original Message- From: Patrick O'Neill Sent: Tuesday, August 20, 2024 12:14 AM To: Li, Pan2 ; gcc-patches@gcc.gnu.org Cc: juzhe.zh...@rivai.ai; kito.ch...@gmail.com; rdapp@gmail.com; Jeff Law

RE: [PATCH v2] Test: Move pr116278 run test to dg/torture [NFC]

2024-08-27 Thread Li, Pan2
Kindly ping. Pan -Original Message- From: Li, Pan2 Sent: Monday, August 19, 2024 10:05 AM To: gcc-patches@gcc.gnu.org Cc: juzhe.zh...@rivai.ai; kito.ch...@gmail.com; jeffreya...@gmail.com; rdapp@gmail.com; Li, Pan2 Subject: [PATCH v2] Test: Move pr116278 run test to dg/torture [NF

Re: sched1 pathology on RISC-V : PR/114729

2024-08-27 Thread Vineet Gupta
Hi Richard, On 8/7/24 10:47, Richard Sandiford wrote: > I should probably start by saying that the "model" heuristic is now > pretty old and was originally tuned for an in-order AArch32 core. > The aim wasn't to *minimise* spilling, but to strike a better balance > between parallelising with spill

How do I know if my patch was merged?

2024-08-27 Thread Weslley da Silva Pereira
Hi all, Thanks for reading my email. I submitted a patch for libstdc++/complex, but I have no idea if that was merged. I also have no idea on how to check that. Could someone help me? Patch name: "[PATCH] libstdc++/complex: Remove implicit type casts in complex" Many thanks, Weslley -- Wesl

[PATCH] Fix test failing on sparc

2024-08-27 Thread Andi Kleen
From: Andi Kleen SPARC does not support vectorizing conditions, which this test relies on. Use vect_condition as effective target. Committed as obvious. PR testsuite/116500 gcc/testsuite/ChangeLog: * gcc.dg/vect/vect-switch-ifcvt-1.c: Use vect_condition to check if vectorizing

Re: [PATCH v3 2/2] Prevent divide-by-zero

2024-08-27 Thread Edwin Lu
On 8/22/2024 5:35 AM, Richard Biener wrote: On Thu, Aug 22, 2024 at 1:03 AM Edwin Lu wrote: Hi, Just wanted to ping this for more guidance. It's difficult for me as long as I cannot investigate this with a testcase. Can we go ahead with the other parts so the testcase can be added and the

Re: Re: [PATCH] RISC-V: Fix subreg of VLS modes larger than a vector [PR116086].

2024-08-27 Thread 钟居哲
LGTM juzhe.zh...@rivai.ai From: Robin Dapp Date: 2024-08-28 03:48 To: juzhe.zh...@rivai.ai; gcc-patches CC: pal...@dabbelt.com; kito.ch...@gmail.com; jeffreya...@gmail.com; pan2...@intel.com; Robin Dapp Subject: Re: [PATCH] RISC-V: Fix subreg of VLS modes larger than a vector [PR116086]. > +

Re: [PATCH] c++/coroutines: fix actor cases not being added to the current switch [PR109867]

2024-08-27 Thread Arsen Arsenović
Jason Merrill writes: > On 8/1/24 12:48 PM, Arsen Arsenović wrote: >> Tested on x86_64-pc-linux-gnu, no regression. >> OK for trunk? >> TIA, have a lovely day. >> -- >8 -- >> Previously, we were building and inserting case_labels manually, which >> lead to them not being added int

m68k: Accept ASHIFT like MULT in address operand

2024-08-27 Thread Andreas Schwab
When LRA pulls an address operand out of a MEM it caninoicalizes a containing MULT into ASHIFT. Adjust the address decomposer to recognize this form. PR target/116413 * config/m68k/m68k.cc (m68k_decompose_index): Accept ASHIFT like MULT. (m68k_rtx_costs) [PLUS]: Li

[PATCH] ipa: Don't disable function parameter analysis for fat LTO streaming

2024-08-27 Thread H.J. Lu
Update analyze_parms not to disable function parameter analysis for -ffat-lto-objects. Tested on x86-64, there are no differences in zstd with "-O2 -flto=auto" -g "vs -O2 -flto=auto -g -ffat-lto-objects". PR ipa/116410 * ipa-modref.cc (analyze_parms): Always analyze function param

Re: [PATCH v3 10/10] fortran: Add -finline-intrinsics flag for MINLOC/MAXLOC [PR90608]

2024-08-27 Thread Harald Anlauf
Mikael, Am 23.08.24 um 10:31 schrieb Mikael Morin: From: Mikael Morin The documentation in this patch was partly reworded, compared to the previous version posted at: https://gcc.gnu.org/pipermail/gcc-patches/2024-August/660607.html The rest of the patch is unchanged, just rebased to a more re

Re: [PATCH] RISC-V: Fix subreg of VLS modes larger than a vector [PR116086].

2024-08-27 Thread Robin Dapp
> +(define_mode_iterator V_HAS_HALF [ > + V2QI V4QI V8QI V16QI V32QI V64QI V128QI V256QI V512QI V1024QI V2048QI > V4096QI > + V2HI V4HI V8HI V16HI V32HI V64HI V128HI V256HI V512HI V1024HI V2048HI > + V2SI V4SI V8SI V16SI V32SI V64SI V128SI V256SI V512SI V1024SI > + V2DI V4DI V8DI V16DI V32DI V

Re: [PATCH] Libquadmath: update doc for some constants

2024-08-27 Thread Sandra Loosemore
On 8/27/24 11:06, Tobias Burnus wrote: Hi FX, FX Coudert wrote: Give it’s a doc patch, I think it might fall under the obvious rule, and will commit in a week if there is no objection. The patch clearly fixes a bug in the current specification and is fine, I just wonder … * libquadmath.te

Re: [PATCH v1] Provide new GCC builtin __builtin_get_counted_by [PR116016]

2024-08-27 Thread Bill Wendling
On Tue, Aug 27, 2024 at 6:58 AM Qing Zhao wrote: > > On Aug 27, 2024, at 02:17, Martin Uecker wrote: > > Am Montag, dem 26.08.2024 um 17:21 -0700 schrieb Kees Cook: > >> On Mon, Aug 26, 2024 at 11:01:08PM +0200, Martin Uecker wrote: > >>> Am Montag, dem 26.08.2024 um 13:30 -0700 schrieb Kees Cook

Re: New version of unsiged patch

2024-08-27 Thread Steve Kargl
On Tue, Aug 27, 2024 at 06:46:08PM +0200, Thomas Koenig wrote: > Steve, > > > On Sun, Aug 18, 2024 at 12:10:18PM +0200, Thomas Koenig wrote: > > > > > > this version of the patch includes DOT_PRODUCT, MATMUL and quite > > > a few improvements for simplification. > > > > Thomas, > > > > Your upd

Re: [PATCH] c++: Don't show constructor internal name in error message [PR105483]

2024-08-27 Thread Jason Merrill
On 8/27/24 1:15 PM, Simon Martin wrote: Hi Jason, On 26 Aug 2024, at 19:30, Jason Merrill wrote: On 8/26/24 12:49 PM, Simon Martin wrote: We mention 'X::__ct' instead of 'X::X' in the "names the constructor, not the type" error for this invalid code: === cut here === struct X {}; void g (

Re: [patch,avr] Overhaul avr-ifelse RTL optimization pass

2024-08-27 Thread Georg-Johann Lay
Am 27.08.24 um 17:28 schrieb Jeff Law: On 8/26/24 1:15 PM, Georg-Johann Lay wrote: What the avr-ifelse pass does is try to replace 2 cbranch insns with one compare insn and two branches.  It runs after reload and just prior to .split2 (split_after_reload).  It must run after reload because REG

[PATCH] Tweak documentation of ASM_INPUT_P

2024-08-27 Thread Richard Sandiford
The documentation of ASM_INPUT_P implied that the flag has no effect on ASM_EXPRs that have operands (and which therefore must be extended asms). In fact we require ASM_INPUT_P to be false for all extended asms. Tested on aarch64-linux-gnu. OK to install? Richard gcc/ * tree.h (ASM_IN

Re: [PATCH] c++: Don't show constructor internal name in error message [PR105483]

2024-08-27 Thread Simon Martin
Hi Jason, On 26 Aug 2024, at 19:30, Jason Merrill wrote: > On 8/26/24 12:49 PM, Simon Martin wrote: >> We mention 'X::__ct' instead of 'X::X' in the "names the constructor, >> not the type" error for this invalid code: >> >> === cut here === >> struct X {}; >> void g () { >>X::X x; >> } >> =

[Committed v2 7/9] RISC-V: Move helper functions above expand_const_vector

2024-08-27 Thread Patrick O'Neill
On 8/27/24 08:04, Jeff Law wrote: On 8/26/24 6:37 PM, Patrick O'Neill wrote: These subroutines will be used in expand_const_vector in a future patch. Relocate so expand_const_vector can use them. gcc/ChangeLog: * config/riscv/riscv-v.cc (expand_vector_init_insert_elems): Relocate.   

[Committed v2 6/9] RISC-V: Allow non-duplicate bool patterns in expand_const_vector

2024-08-27 Thread Patrick O'Neill
On 8/27/24 08:04, Jeff Law wrote: On 8/26/24 6:37 PM, Patrick O'Neill wrote: Currently we assert when encountering a non-duplicate boolean vector. This patch allows non-duplicate vectors to fall through to the gcc_unreachable and assert there. This will be useful when adding a catch-all pat

[Committed v2 5/9] RISC-V: Handle 0.0 floating point pattern costing to match const_vector expander

2024-08-27 Thread Patrick O'Neill
On 8/27/24 08:02, Jeff Law wrote: On 8/26/24 6:36 PM, Patrick O'Neill wrote: The comment previously here stated that the Wc0/Wc1 cases are handled by the vi constraint but that is not true for the 0.0 Wc0 case. gcc/ChangeLog: * config/riscv/riscv.cc (riscv_const_insns): Handle 0.0 floa

[Committed v2 4/9] RISC-V: Emit costs for bool and stepped const vectors

2024-08-27 Thread Patrick O'Neill
On 8/27/24 08:01, Jeff Law wrote: On 8/26/24 6:36 PM, Patrick O'Neill wrote: These cases are handled in the expander (riscv-v.cc:expand_const_vector). We need the vector builder to detect these cases so extract that out into a new riscv-v.h header file. gcc/ChangeLog: * config/riscv/ri

Re: [PATCH v2 3/9] RISC-V: Handle case when constant vector construction target rtx is not a register

2024-08-27 Thread Patrick O'Neill
On 8/27/24 08:00, Jeff Law wrote: On 8/26/24 6:36 PM, Patrick O'Neill wrote: This manifests in RTL that is optimized away which causes runtime failures in the testsuite. Update all patterns to use a temp result register if required. gcc/ChangeLog: * config/riscv/riscv-v.cc (expand_co

[Committed v2 2/9] RISC-V: Reorder insn cost match order to match corresponding expander match order

2024-08-27 Thread Patrick O'Neill
On 8/27/24 07:56, Jeff Law wrote: On 8/26/24 6:36 PM, Patrick O'Neill wrote: The corresponding expander (riscv-v.cc:expand_const_vector) matches const_vec_duplicate_p before const_vec_series_p. Reorder to match this behavior when calculating costs. gcc/ChangeLog: * config/riscv/riscv.c

[Committed v2 1/9] RISC-V: Fix vid const vector expander for non-npatterns size steps

2024-08-27 Thread Patrick O'Neill
On 8/27/24 07:55, Jeff Law wrote: On 8/26/24 6:36 PM, Patrick O'Neill wrote: Prior to this patch the expander would emit vectors like: { 0, 0, 5, 5, 10, 10, ...} as: { 0, 0, 2, 2,  4,  4, ...} This patch sets the step size to the requested value. gcc/ChangeLog: * config/riscv/riscv-v.

Re: [PATCH] Libquadmath: update doc for some constants

2024-08-27 Thread Tobias Burnus
Hi FX, FX Coudert wrote: Give it’s a doc patch, I think it might fall under the obvious rule, and will commit in a week if there is no objection. The patch clearly fixes a bug in the current specification and is fine, I just wonder … * libquadmath.texi (M_LOG2Eq, M_LOG10Eq, M_2_PIq): Fix

Re: [PATCH v2 9/9] RISC-V: Add cost model asserts

2024-08-27 Thread Patrick O'Neill
On 8/27/24 08:19, Jeff Law wrote: On 8/26/24 6:37 PM, Patrick O'Neill wrote: This patch adds some advanced checking to assert that the emitted costs match emitted patterns for const_vecs. Flow: Costing: Insert into hashmap> Expand: Check for membership in hashmap   -> Not in hashmap: ignor

Re: [PATCH] Libquadmath: update doc for some constants

2024-08-27 Thread FX Coudert
kind ping Give it’s a doc patch, I think it might fall under the obvious rule, and will commit in a week if there is no objection. FX > As reported by Peter Randall, the description of three constants in > libquadmath is wrong. Attached patch fixes them. > > OK to push? > > FX > > > libquad

Re: New version of unsiged patch

2024-08-27 Thread Thomas Koenig
Steve, On Sun, Aug 18, 2024 at 12:10:18PM +0200, Thomas Koenig wrote: this version of the patch includes DOT_PRODUCT, MATMUL and quite a few improvements for simplification. Thomas, Your updated patch applied cleanly on top-of-tree gcc. Bootstrap and regression testing on amd64-*-freebsd co

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

2024-08-27 Thread Mariam Arutunian
On Tue, Aug 27, 2024 at 12:25 PM Richard Biener wrote: > On Mon, Aug 26, 2024 at 5:26 PM Matevos Mehrabyan > wrote: > > > > > > > > On Mon, Aug 26, 2024 at 2:44 AM Jeff Law wrote: > >> > >> > >> > >> On 8/20/24 5:41 AM, Richard Biener wrote: > >> > >> > > >> > So the store-merging variant IIRC

Re: [patch,avr] Overhaul avr-ifelse RTL optimization pass

2024-08-27 Thread Jeff Law
On 8/26/24 1:15 PM, Georg-Johann Lay wrote: What the avr-ifelse pass does is try to replace 2 cbranch insns with one compare insn and two branches.  It runs after reload and just prior to .split2 (split_after_reload).  It must run after reload because REG_CC comes into existence in .split2. 

Re: [PATCH 1/5] Handle namespaced names for CodeView

2024-08-27 Thread Jeff Law
On 8/26/24 4:48 PM, Mark Harmstone wrote: Run all CodeView names through a new function get_name, which chains together a DIE's DW_AT_name with that of its parent to create a C++-style name. gcc/ * dwarf2codeview.cc (get_name): New function. (add_enum_forward_def): Call get_na

Re: [PATCH] testsuite: Reduce cut-&-paste in scanltranstree.exp

2024-08-27 Thread Alex Coplan
On 15/08/2024 13:55, Richard Sandiford wrote: > scanltranstree.exp defines some LTO wrappers around standard > non-LTO scanners. Four of them are cut-&-paste variants of > one another, so this patch generates them from a single template. > It also does the same for scan-ltrans-tree-dump-times, so

Re: [PATCH v2 9/9] RISC-V: Add cost model asserts

2024-08-27 Thread Jeff Law
On 8/26/24 6:37 PM, Patrick O'Neill wrote: This patch adds some advanced checking to assert that the emitted costs match emitted patterns for const_vecs. Flow: Costing: Insert into hashmap> Expand: Check for membership in hashmap -> Not in hashmap: ignore, this wasn't costed -> In hashmap

Re: [PATCH v2 8/9] RISC-V: Add vslide1up/down pattern to expand_const_vector

2024-08-27 Thread Jeff Law
On 8/26/24 6:37 PM, Patrick O'Neill wrote: Also explicitly disallow CONST_VECTOR_DUPLICATE_P for now. CONST_VECTOR_DUPLICATE_P was previously disallowed implicitly. gcc/ChangeLog: * config/riscv/riscv-v.cc (expand_vec_series): Update comment. (expand_vector_init_insert_elems)

Re: [PATCH v2 7/9] RISC-V: Move helper functions above expand_const_vector

2024-08-27 Thread Jeff Law
On 8/26/24 6:37 PM, Patrick O'Neill wrote: These subroutines will be used in expand_const_vector in a future patch. Relocate so expand_const_vector can use them. gcc/ChangeLog: * config/riscv/riscv-v.cc (expand_vector_init_insert_elems): Relocate. (expand_vector_init_trailing

Re: [PATCH v2 6/9] RISC-V: Allow non-duplicate bool patterns in expand_const_vector

2024-08-27 Thread Jeff Law
On 8/26/24 6:37 PM, Patrick O'Neill wrote: Currently we assert when encountering a non-duplicate boolean vector. This patch allows non-duplicate vectors to fall through to the gcc_unreachable and assert there. This will be useful when adding a catch-all pattern to emit costs and handle arbita

Re: [PATCH v2 5/9] RISC-V: Handle 0.0 floating point pattern costing to match const_vector expander

2024-08-27 Thread Jeff Law
On 8/26/24 6:36 PM, Patrick O'Neill wrote: The comment previously here stated that the Wc0/Wc1 cases are handled by the vi constraint but that is not true for the 0.0 Wc0 case. gcc/ChangeLog: * config/riscv/riscv.cc (riscv_const_insns): Handle 0.0 floating-point case. OK Jef

Re: [PATCH v2 4/9] RISC-V: Emit costs for bool and stepped const vectors

2024-08-27 Thread Jeff Law
On 8/26/24 6:36 PM, Patrick O'Neill wrote: These cases are handled in the expander (riscv-v.cc:expand_const_vector). We need the vector builder to detect these cases so extract that out into a new riscv-v.h header file. gcc/ChangeLog: * config/riscv/riscv-v.cc (class rvv_builder): Mo

Re: [PATCH v2 3/9] RISC-V: Handle case when constant vector construction target rtx is not a register

2024-08-27 Thread Jeff Law
On 8/26/24 6:36 PM, Patrick O'Neill wrote: This manifests in RTL that is optimized away which causes runtime failures in the testsuite. Update all patterns to use a temp result register if required. gcc/ChangeLog: * config/riscv/riscv-v.cc (expand_const_vector): Use tmp register if

Re: [PATCH v2 2/9] RISC-V: Reorder insn cost match order to match corresponding expander match order

2024-08-27 Thread Jeff Law
On 8/26/24 6:36 PM, Patrick O'Neill wrote: The corresponding expander (riscv-v.cc:expand_const_vector) matches const_vec_duplicate_p before const_vec_series_p. Reorder to match this behavior when calculating costs. gcc/ChangeLog: * config/riscv/riscv.cc (riscv_const_insns): Relocate.

Re: [PATCH v2 1/9] RISC-V: Fix vid const vector expander for non-npatterns size steps

2024-08-27 Thread Jeff Law
On 8/26/24 6:36 PM, Patrick O'Neill wrote: Prior to this patch the expander would emit vectors like: { 0, 0, 5, 5, 10, 10, ...} as: { 0, 0, 2, 2, 4, 4, ...} This patch sets the step size to the requested value. gcc/ChangeLog: * config/riscv/riscv-v.cc (expand_const_vector): Fix ST

Re: [PATCH] RISC-V: Fix subreg of VLS modes larger than a vector [PR116086].

2024-08-27 Thread Jeff Law
On 8/27/24 8:02 AM, Robin Dapp wrote: Hi, this is a hopefully better way to solve the "subreg problem" by first, in the generic case, have the RA go via memory and second, providing a vector-vector extract that deals with it in an optimized way. When the source mode is potentially larger tha

Re: [PATCH] RISC-V: Fix subreg of VLS modes larger than a vector [PR116086].

2024-08-27 Thread juzhe.zh...@rivai.ai
+(define_mode_iterator V_HAS_HALF [ + V2QI V4QI V8QI V16QI V32QI V64QI V128QI V256QI V512QI V1024QI V2048QI V4096QI + V2HI V4HI V8HI V16HI V32HI V64HI V128HI V256HI V512HI V1024HI V2048HI + V2SI V4SI V8SI V16SI V32SI V64SI V128SI V256SI V512SI V1024SI + V2DI V4DI V8DI V16DI V32DI V64DI V128DI V

Re: [PATCH v4] Extend check-function-bodies to allow label and directives

2024-08-27 Thread Richard Sandiford
Andreas Schwab writes: > On Aug 27 2024, H.J. Lu wrote: > >> diff --git a/gcc/testsuite/gcc.target/i386/pr116174.c >> b/gcc/testsuite/gcc.target/i386/pr116174.c >> index 8877d0b51af..686aeb9ff31 100644 >> --- a/gcc/testsuite/gcc.target/i386/pr116174.c >> +++ b/gcc/testsuite/gcc.target/i386/pr1161

[PATCH] pr116174.c: Add the missing */

2024-08-27 Thread H.J. Lu
* gcc.target/i386/pr116174.c: Add the missing */. Signed-off-by: H.J. Lu --- gcc/testsuite/gcc.target/i386/pr116174.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/testsuite/gcc.target/i386/pr116174.c b/gcc/testsuite/gcc.target/i386/pr116174.c index 686aeb9ff31

Re: [PATCH] RISC-V: Add missing mode_idx for vrol and vror

2024-08-27 Thread Robin Dapp
You don't need an OK of course but LGTM. When I found another instance of this I was thinking about having exhaustive self tests for those attributes. Maybe a good learning exercise? -- Regards Robin

Re: [PATCH v4] Extend check-function-bodies to allow label and directives

2024-08-27 Thread Andreas Schwab
On Aug 27 2024, H.J. Lu wrote: > diff --git a/gcc/testsuite/gcc.target/i386/pr116174.c > b/gcc/testsuite/gcc.target/i386/pr116174.c > index 8877d0b51af..686aeb9ff31 100644 > --- a/gcc/testsuite/gcc.target/i386/pr116174.c > +++ b/gcc/testsuite/gcc.target/i386/pr116174.c > @@ -1,6 +1,20 @@ > /* {

[PATCH] RISC-V: Add missing mode_idx for vrol and vror

2024-08-27 Thread Kito Cheng
We add pattern for vector rotate, but seems like we forgot adding mode_idx which used in AVL propgation (riscv-avlprop.cc). gcc/ChangeLog: * config/riscv/vector.md (mode_idx): Add vrol and vror. gcctestsuite/ChangeLog: * gcc.target/riscv/rvv/autovec/rotr.c: New. --- gcc/config/

Re: [PATCH v2] Extend check-function-bodies to allow label and directives

2024-08-27 Thread H.J. Lu
On Tue, Aug 27, 2024 at 6:54 AM Richard Sandiford wrote: > > "H.J. Lu" writes: > >> > append function_regexp ")" > >> > } elseif { [string equal $line "..."] } { > >> > append function_regexp ".*" > >> > + } elseif { [regexp "^.L.*" $line] } { > >> >

[PATCH v4] Extend check-function-bodies to allow label and directives

2024-08-27 Thread H.J. Lu
As PR target/116174 shown, we may need to verify labels and the directive order. Extend check-function-bodies to support matched output lines to allow label and directives. gcc/ * doc/sourcebuild.texi (check-function-bodies): Add an optional argument for matched output lines. gc

[PATCH v2] gimple ssa: switchconv: Use __builtin_popcount and support more types in exp transform [PR116355]

2024-08-27 Thread Filip Kastl
Hi, this is the second version of this patch. See the mail with the first version here: https://inbox.sourceware.org/gcc-patches/ZsnRLdYErnIWQlCe@localhost.localdomain/ In this version I've made these adjustments: - Added calls direct_internal_fn_supported_p to can_pow2p. Before I just assum

[PATCH] RISC-V: Fix subreg of VLS modes larger than a vector [PR116086].

2024-08-27 Thread Robin Dapp
Hi, this is a hopefully better way to solve the "subreg problem" by first, in the generic case, have the RA go via memory and second, providing a vector-vector extract that deals with it in an optimized way. When the source mode is potentially larger than one vector (e.g. an LMUL2 mode for VLEN=1

Re: [PATCH v1] Provide new GCC builtin __builtin_get_counted_by [PR116016]

2024-08-27 Thread Qing Zhao
> On Aug 27, 2024, at 02:17, Martin Uecker wrote: > > Am Montag, dem 26.08.2024 um 17:21 -0700 schrieb Kees Cook: >> On Mon, Aug 26, 2024 at 11:01:08PM +0200, Martin Uecker wrote: >>> Am Montag, dem 26.08.2024 um 13:30 -0700 schrieb Kees Cook: On Mon, Aug 26, 2024 at 07:30:15PM +, Qing

Re: [PATCH v2] Extend check-function-bodies to allow label and directives

2024-08-27 Thread Richard Sandiford
"H.J. Lu" writes: >> > append function_regexp ")" >> > } elseif { [string equal $line "..."] } { >> > append function_regexp ".*" >> > + } elseif { [regexp "^.L.*" $line] } { >> >> {^\.L} would be more precise than "^.L.*". > > I tried {^\.L}. It did

Re: [PATCH v2] Extend check-function-bodies to allow label and directives

2024-08-27 Thread H.J. Lu
On Tue, Aug 27, 2024 at 2:18 AM Richard Sandiford wrote: > > "H.J. Lu" writes: > > As PR target/116174 shown, we may need to verify labels and the directive > > order. Extend check-function-bodies to support matched output lines to > > allow label and directives. > > > > gcc/ > > > > * doc

Re: LRA: Fix setup_sp_offset

2024-08-27 Thread Michael Matz
Hello, On Mon, 26 Aug 2024, Paul Koning wrote: > >>> Yeah, I wondered as well. For things to go wrong some instructions that > >>> contain pre/post-inc/dec of the stack pointer need to have reloads in > >>> such > >>> a way that the actual SP-change sideeffect moves to a different > >>> inst

[PATCH v3] Extend check-function-bodies to allow label and directives

2024-08-27 Thread H.J. Lu
As PR target/116174 shown, we may need to verify labels and the directive order. Extend check-function-bodies to support matched output lines to allow label and directives. gcc/ * doc/sourcebuild.texi (check-function-bodies): Add an optional argument for matched output lines. gc

Re: [PATCH v1] Provide new GCC builtin __builtin_get_counted_by [PR116016]

2024-08-27 Thread Qing Zhao
> On Aug 26, 2024, at 17:01, Martin Uecker wrote: > > Am Montag, dem 26.08.2024 um 13:30 -0700 schrieb Kees Cook: >> On Mon, Aug 26, 2024 at 07:30:15PM +, Qing Zhao wrote: >>> Hi, Martin, >>> >>> Looks like that there is some issue when I tried to use the _Generic for >>> the testing case

Re: [PATCH v1] Provide new GCC builtin __builtin_get_counted_by [PR116016]

2024-08-27 Thread Qing Zhao
> On Aug 26, 2024, at 16:30, Kees Cook wrote: > > On Mon, Aug 26, 2024 at 07:30:15PM +, Qing Zhao wrote: >> Hi, Martin, >> >> Looks like that there is some issue when I tried to use the _Generic for the >> testing cases, and then I narrowed down to a >> small testing case that shows the p

[committed] libstdc++: Do not use std::vector::reference default ctor [PR115098]

2024-08-27 Thread Jonathan Wakely
This default constructor was made private by r15-3124-gb25b101bc38000 so the pretty printer tests need a fix to stop using it. There's no conforming way to get a default-constructed 'reference' now, e.g. trying to access an element of a default-constructed std::vector will trigger an assertion. Rem

Re: [committed] libstdc++: Make std::vector::reference constructor private [PR115098]

2024-08-27 Thread Jonathan Wakely
On Mon, 26 Aug 2024 at 00:08, Andrew Pinski wrote: > > On Fri, Aug 23, 2024 at 5:20 AM Jonathan Wakely wrote: > > > > Tested x86_64-linux. Pushed to trunk. > > > > -- >8 -- > > > > The standard says this constructor should be private. LWG 4141 proposes > > to remove it entirely. We still need it

Re: [PATCH v1] Provide new GCC builtin __builtin_get_counted_by [PR116016]

2024-08-27 Thread Qing Zhao
> On Aug 26, 2024, at 15:46, Bill Wendling wrote: > > On Wed, Aug 21, 2024 at 8:43 AM Martin Uecker wrote: >> >> Am Mittwoch, dem 21.08.2024 um 15:24 + schrieb Qing Zhao: But if we changed it to return a void pointer, we could make this a compile-time check: au

Re: [PATCH v1 1/2] RISC-V: Add testcases for unsigned scalar .SAT_SUB IMM form 3

2024-08-27 Thread Jeff Law
On 8/27/24 1:17 AM, pan2...@intel.com wrote: From: Pan Li This patch would like to add test cases for the unsigned scalar .SAT_SUB IMM form 3. Aka: Form 3: #define DEF_SAT_U_SUB_IMM_FMT_3(T, IMM) \ T __attribute__((noinline)) \ sat_u_sub_imm##IMM##_##T##_fmt_3 (T y) \

Re: PING ^1 [PATCH] GCC Driver : Enable very long gcc command-line option

2024-08-27 Thread Richard Biener
On Tue, 27 Aug 2024, Dora, Sunil Kumar wrote: > Dear GCC Team, > > Please consider this as a gentle reminder to review the patch I posted at the > following link: [ > https://gcc.gnu.org/pipermail/gcc-patches/2024-August/660223.html ]. > > BUG Link : [ https://gcc.gnu.org/bugzilla/show_bug.cgi

RE: [PATCH] RISC-V: Fix double mode under RV32 not utilize vf

2024-08-27 Thread Demin Han
Hi Jeff, Yes, there are some tests fails after the last_combine pass introduced. I remember these tests still have vv format which not become vf after last_combine. I’ll update the testcase based on my local branch after your push. Regards, Demin From: Jeff Law Sent: 2024年8月26日 5:59 To: Demin

Re: [PATCH v4] Match: Support form 1 for scalar signed integer .SAT_ADD

2024-08-27 Thread Richard Biener
On Tue, Aug 27, 2024 at 1:53 PM wrote: > > From: Pan Li > > This patch would like to support the form 1 of the scalar signed > integer .SAT_ADD. Aka below example: > > Form 1: > #define DEF_SAT_S_ADD_FMT_1(T, UT, MIN, MAX) \ > T __attribute__((noinline)) \ > sat_s_add_##T#

[PATCH v4] Match: Support form 1 for scalar signed integer .SAT_ADD

2024-08-27 Thread pan2 . li
From: Pan Li This patch would like to support the form 1 of the scalar signed integer .SAT_ADD. Aka below example: Form 1: #define DEF_SAT_S_ADD_FMT_1(T, UT, MIN, MAX) \ T __attribute__((noinline)) \ sat_s_add_##T##_fmt_1 (T x, T y) \ {

Re: [PATCH] testsuite: Avoid running neon test on Cortex-M55

2024-08-27 Thread Richard Earnshaw (lists)
On 13/08/2024 17:18, Andre Vieira (lists) wrote: > I'm not a maintainer but I'd argue the entire test is bogus. > > The error reporting in this area seems to be somewhat fragile, if you compile > it with '-march=armv7-a -mfloat-abi=soft', you also don't get the error this > is testing for.  I'd

RE: [PATCH v3] Match: Support form 1 for scalar signed integer .SAT_ADD

2024-08-27 Thread Li, Pan2
> :c is required when you want to match up @0s and they appear in a commutative > operation and there's no canonicalization rule putting it into one or the > other > position. In your case you have two commutative operations you want to match > up, so it should be only necessary to try swapping o

RE: [PATCH v2] Vect: Reconcile the const_int operand type of unsigned .SAT_ADD

2024-08-27 Thread Li, Pan2
Thanks Richard for comments. > Err, can you please simply do >if (TREE_CODE (ops[1]) == INTEGER_CST) > ops[1] = fold_convert (TREE_TYPE (ops[0]), ops[1]) > ? you are always matching the constant to @1 IIRC. That would be much more simple, will have a try in v3. Pan --

RE: [RFC][PATCH] AArch64: Remove AARCH64_EXTRA_TUNE_USE_NEW_VECTOR_COSTS

2024-08-27 Thread Tamar Christina
> -Original Message- > From: Richard Sandiford > Sent: Tuesday, August 27, 2024 11:46 AM > To: Tamar Christina > Cc: Jennifer Schmitz ; gcc-patches@gcc.gnu.org; Kyrylo > Tkachov > Subject: Re: [RFC][PATCH] AArch64: Remove > AARCH64_EXTRA_TUNE_USE_NEW_VECTOR_COSTS > > Tamar Christina wr

Re: [patch][rfc] libgomp: Add OpenMP interop support to nvptx + gcn plugin

2024-08-27 Thread Tobias Burnus
Hi Andrew, Andrew Stubbs: On 22/08/2024 19:26, Tobias Burnus wrote: (A) Any comments, suggestions regarding the patch in general and in particular the plugin/ related parts? The code all looks pretty reasonable to me. The header file conditional includes worry me though: it is adding comple

[pushed] [PATCH] testsuite: Fix ending of comment in test cases

2024-08-27 Thread Torbjörn SVENSSON
Found a few more places that had similar issue with the termination of the comment, so fixed them all. Pushed below patch as obvious (r15-3215). -- gcc/testsuite/ChangeLog: * gcc.dg/pr108757-1.c: Fixed dg-comment. * gcc.dg/pr71071.c: Likewise. * gcc.dg/tree-ssa/noretur

Un-XFAIL 'gcc.dg/signbit-5.c' for GCN (was: [PATCH] RISC-V: Remove testcase XFAIL)

2024-08-27 Thread Thomas Schwinge
Hi! On 2024-08-19T13:14:02-0700, Edwin Lu wrote: > The testcase has been modified to include the -fwrapv flag which now > causes the test to pass. Remove the xfail exception > --- a/gcc/testsuite/gcc.dg/signbit-5.c > +++ b/gcc/testsuite/gcc.dg/signbit-5.c > @@ -4,7 +4,6 @@ > /* This test does n

Re: [RFC][PATCH] AArch64: Remove AARCH64_EXTRA_TUNE_USE_NEW_VECTOR_COSTS

2024-08-27 Thread Richard Sandiford
Tamar Christina writes: > Hi Jennifer, > >> -Original Message- >> From: Jennifer Schmitz >> Sent: Friday, August 23, 2024 1:07 PM >> To: gcc-patches@gcc.gnu.org >> Cc: Richard Sandiford ; Kyrylo Tkachov >> >> Subject: [RFC][PATCH] AArch64: Remove >> AARCH64_EXTRA_TUNE_USE_NEW_VECTOR_COST

Re: [PATCH] testuite: Accept vmov.f64

2024-08-27 Thread Richard Earnshaw (lists)
On 21/08/2024 17:06, Christophe Lyon wrote: > On Wed, 14 Aug 2024 at 22:04, Torbjörn SVENSSON > wrote: >> >> Ok for trunk and releases/gcc-14? >> >> -- >> >> On Cortex-M55 with fpv5-d16, the vmov.f64 instruction is used. > > Hi Torbjorn, > > Thanks for the patch: after looking further I realized

Re: [PATCH] arm: Always use vmov.f64 instead of vmov.f32 with MVE

2024-08-27 Thread Richard Earnshaw (lists)
On 21/08/2024 17:03, Christophe Lyon wrote: > With MVE, vmov.f64 is always supported (no need for +fp.dp extension). > > This patch updates two patterns: > - in movdi_vfp, we incorrectly checked > TARGET_VFP_SINGLE || TARGET_HAVE_MVE instead of > TARGET_VFP_SINGLE && !TARGET_HAVE_MVE, and didn

[PATCH v3] c++: Ensure ANNOTATE_EXPRs remain outermost expressions in conditions [PR116140]

2024-08-27 Thread Alex Coplan
Hi, This is a v3 that hopefully addresses the feedback from both Jason and Jakub. v2 was posted here: https://gcc.gnu.org/pipermail/gcc-patches/2024-August/660191.html (Sorry for the delay in posting the re-spin, I was away last week.) In this version we refactor to introudce a helper class (an

Re: [PATCH] RISC-V: Optimize the cost of the DFmode register move for RV32.

2024-08-27 Thread Kito Cheng
LGTM, good catch, and I am a little suppressed that we don't handle "case REG" in riscv_rtx_costs...but adding that might disturb too much at once, so this fix is fine for now, and ...and I guess we should improve that in future. On Tue, Aug 27, 2024 at 5:19 PM Xianmiao Qu wrote: > > Currently,

Re: [patch][rfc] libgomp: Add OpenMP interop support to nvptx + gcn plugin

2024-08-27 Thread Andrew Stubbs
On 22/08/2024 19:26, Tobias Burnus wrote: This patch adds OpenMP's interop support to the libgomp plugins (nvptx: cuda, cuda_driver, hip; gcn: hip, hsa).* [The idea is that the user can ask OpenMP to return a foreign-runtime handle (CUdevice, hipCtx_t, …) for to a specified OpenMP device numbe

[PATCH] RISC-V: Optimize the cost of the DFmode register move for RV32.

2024-08-27 Thread Xianmiao Qu
Currently, in RV32, even with the D extension enabled, the cost of DFmode register moves is still set to 'COSTS_N_INSNS (2)'. This results in the 'lower-subreg' pass splitting DFmode register moves into two SImode SUBREG register moves, leading to the generation of many redundant instructions. As

Re: [PATCH v2] Extend check-function-bodies to allow label and directives

2024-08-27 Thread Richard Sandiford
"H.J. Lu" writes: > As PR target/116174 shown, we may need to verify labels and the directive > order. Extend check-function-bodies to support matched output lines to > allow label and directives. > > gcc/ > > * doc/sourcebuild.texi (check-function-bodies): Add an optional > argument

Re: [PATCH v2] Vect: Reconcile the const_int operand type of unsigned .SAT_ADD

2024-08-27 Thread Richard Biener
On Tue, Aug 27, 2024 at 9:09 AM wrote: > > From: Pan Li > > The .SAT_ADD has 2 operand, when one of the operand may be INTEGER_CST. > For example _1 = .SAT_ADD (_2, 9) comes from below sample code. > > Form 3: > #define DEF_VEC_SAT_U_ADD_IMM_FMT_3(T, IMM) \ > T __attr

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

2024-08-27 Thread Richard Biener
On Tue, Aug 27, 2024 at 8:23 AM Kugan Vivekanandarajah wrote: > > Hi Richard, > > > On 22 Aug 2024, at 10:34 pm, Richard Biener > > wrote: > > > > External email: Use caution opening links or attachments > > > > > > On Wed, Aug 21, 2024 at 12:08 PM Kugan Vivekanandarajah > > wrote: > >> > >> Hi

Re: [PATCH v2 1/2] Enhance cse_insn to handle all-zeros and all-ones for vector mode.

2024-08-27 Thread Richard Biener
On Tue, Aug 27, 2024 at 5:20 AM liuhongt wrote: > > > You are possibly overwriting src_related_elt - I'd suggest to either break > > here or do the loop below for each found elt? > Changed. > > > Do we know that will always succeed? > 1) validate_subreg allows subreg for 2 vector modes with same c

PING ^1 [PATCH] GCC Driver : Enable very long gcc command-line option

2024-08-27 Thread Dora, Sunil Kumar
Dear GCC Team, Please consider this as a gentle reminder to review the patch I posted at the following link: [ https://gcc.gnu.org/pipermail/gcc-patches/2024-August/660223.html ]. BUG Link : [ https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111527 ] Your feedback or approval would be greatly appr

  1   2   >