Patch ping (Re: [PATCH] middle-end, i386: Pattern recognize add/subtract with carry [PR79173])

2023-06-13 Thread Jakub Jelinek via Gcc-patches
Hi! On Tue, Jun 06, 2023 at 11:42:07PM +0200, Jakub Jelinek via Gcc-patches wrote: > The following patch introduces {add,sub}c5_optab and pattern recognizes > various forms of add with carry and subtract with carry/borrow, see > pr79173-{1,2,3,4,5,6}.c tests on what is matched. > Primarily forms w

Re: [PATCH v2] [PR96339] Optimise svlast[ab]

2023-06-13 Thread Tejas Belagod via Gcc-patches
From: Richard Sandiford Date: Monday, June 12, 2023 at 2:15 PM To: Tejas Belagod Cc: gcc-patches@gcc.gnu.org , Tejas Belagod Subject: Re: [PATCH v2] [PR96339] Optimise svlast[ab] Tejas Belagod writes: > From: Tejas Belagod > > This PR optimizes an SVE intrinsics sequence where > svla

[PATCH v1] RISC-V: Fix one typo in full-vec-movel test

2023-06-13 Thread Pan Li via Gcc-patches
From: Pan Li This patch would like to fix one typo when checking assembly of full-vec-movel. Signed-off-by: Pan Li gcc/testsuite/ChangeLog: * gcc.target/riscv/rvv/autovec/vls-vlmax/full-vec-move1.c: Adjust dg-do to comiple for asm checking. --- .../gcc.target/riscv/rvv/autove

Re: [PATCH v1] RISC-V: Fix one typo in full-vec-movel test

2023-06-13 Thread Robin Dapp via Gcc-patches
> This patch would like to fix one typo when checking assembly of > full-vec-movel. OK. (I actually intended to commit this myself adding some more comments to the iterator change as well as fix the tests, but well...) Regards Robin

Re: Re: [PATCH v1] RISC-V: Fix one typo in full-vec-movel test

2023-06-13 Thread juzhe.zh...@rivai.ai
Oh. Sorry. Since I want to commit my patch so I asked Pan to commit your test as well. I think you can resend a fix of this testcase and drop this patch. juzhe.zh...@rivai.ai From: Robin Dapp Date: 2023-06-13 15:20 To: pan2.li; gcc-patches CC: rdapp.gcc; juzhe.zhong; jeffreyalaw; yanzhang.wan

Re: [PATCH v1] RISC-V: Fix one typo in full-vec-movel test

2023-06-13 Thread Robin Dapp via Gcc-patches
> Oh. Sorry. Since I want to commit my patch so I asked Pan to commit > your test as well. I think you can resend a fix of this testcase and > drop this patch. No problem, will fix it another time. Pan can just go ahead with this fix now, no need to wait for a maintainer, it's obvious enough. Th

RE: [PATCH v1] RISC-V: Fix one typo in full-vec-movel test

2023-06-13 Thread Li, Pan2 via Gcc-patches
Committed, thanks Robin and Juzhe. Pan -Original Message- From: Robin Dapp Sent: Tuesday, June 13, 2023 3:24 PM To: juzhe.zh...@rivai.ai; Li, Pan2 ; gcc-patches Cc: rdapp@gmail.com; jeffreyalaw ; Wang, Yanzhang ; kito.cheng Subject: Re: [PATCH v1] RISC-V: Fix one typo in full-ve

[COMMITTED] ada: Remove explicit decoration of wrapper created in freezing

2023-06-13 Thread Marc Poulhiès via Gcc-patches
From: Piotr Trojanek We create wrapper functions associated with inherited functions with controlling results which are not overridden during freezing. We partly decorated them explicitly, even though they would be fully decorated later anyway. This early decoration didn't work as expected, beca

[COMMITTED] ada: Simplify appending to a newly created list

2023-06-13 Thread Marc Poulhiès via Gcc-patches
From: Piotr Trojanek Code cleanup; semantics is unaffected. gcc/ada/ * exp_disp.adb (Make_Disp_Asynchronous_Select_Spec): Use a single call to New_List. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/exp_disp.adb | 6 +++--- 1 file changed, 3 insertions(+), 3

[COMMITTED] ada: Fix expansion of aggregates with controlled components

2023-06-13 Thread Marc Poulhiès via Gcc-patches
From: Eric Botcazou The expansion is incorrect in the case where the initialization expression of a component is a conditional expression that has a function call as one of its dependent expressions, leading to a wrong order of initialization, adjustment and finalization. gcc/ada/ * exp

[COMMITTED] ada: Factor out tag assignments from type in expander

2023-06-13 Thread Marc Poulhiès via Gcc-patches
From: Eric Botcazou They are performed in a few different places during expansion. gcc/ada/ * exp_util.ads (Make_Tag_Assignment_From_Type): Declare. * exp_util.adb (Make_Tag_Assignment_From_Type): New function. * exp_aggr.adb (Build_Record_Aggr_Code): Call the above func

[COMMITTED] ada: Tune style in detection of writable function actuals

2023-06-13 Thread Marc Poulhiès via Gcc-patches
From: Piotr Trojanek Cleanup; semantics is unaffected. gcc/ada/ * sem_util.adb (Check_Function_Writable_Actuals): Tune style; use subtype name to detect membership test nodes. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/sem_util.adb | 10 ++ 1 file

[COMMITTED] ada: Factor common processing in expansion of aggregates

2023-06-13 Thread Marc Poulhiès via Gcc-patches
From: Eric Botcazou The final processing at the component level of array aggregates and record aggregates is very similar, so this factors out the common processing into three new library-level subprograms. There should be no functional changes, but the expanded code may be changed in the case o

[COMMITTED] ada: Add No_Elaboration_Code_All pragma to System.Storage_Elements

2023-06-13 Thread Marc Poulhiès via Gcc-patches
From: Daniel King Allows System.Storage_Elements to be used in units that have the No_Elaboration_Code_All restriction. gcc/ada/ * libgnat/s-stoele.ads: Add No_Elaboration_Code_All pragma. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/libgnat/s-stoele.ads | 3 +++ 1

[COMMITTED] ada: Cleanup expansion of locally handled exception handlers

2023-06-13 Thread Marc Poulhiès via Gcc-patches
From: Piotr Trojanek Code cleanup related to handling exceptions in GNATprove; semantics is unaffected. gcc/ada/ * exp_ch11.ads (Find_Local_Handler): Fix typo in comment. * exp_ch11.adb (Find_Local_Handler): Remove redundant check for the Exception_Handler list being pre

[COMMITTED] ada: Small housekeeping work in expansion of extension aggregates

2023-06-13 Thread Marc Poulhiès via Gcc-patches
From: Eric Botcazou This avoids repeatedly calling Unqualify on the same node, removes a dead call to Generate_Finalization_Actions, a redundant setting of Assignment_OK and reuses a local variable more consistently. No functional changes. gcc/ada/ * exp_aggr.adb (Build_Record_Aggr_Cod

[COMMITTED] ada: Fix wrong expansion of limited extension aggregate

2023-06-13 Thread Marc Poulhiès via Gcc-patches
From: Eric Botcazou This happens when the ancestor part is itself an aggregate: in this case, the tag of the extension aggregate is wrongly set to that of the ancestor. gcc/ada/ * exp_aggr.adb (Build_Record_Aggr_Code): In the case of an extension aggregate of a limited type whos

[COMMITTED] ada: Cleanup finding of locally handled exception handlers

2023-06-13 Thread Marc Poulhiès via Gcc-patches
From: Piotr Trojanek Code cleanup related to handling exceptions in GNATprove; semantics is unaffected. gcc/ada/ * exp_ch11.adb (Find_Local_Handler): Replace guard against other constructs appearing in the list of exception handlers with iteration using First_Non_Pragma/

[COMMITTED] ada: Remove obsolete code in Analyze_Assignment

2023-06-13 Thread Marc Poulhiès via Gcc-patches
From: Eric Botcazou This code was dealing with build-in-place calls for nonlimited types, but they no longer exist since Is_Build_In_Place_Result_Type => Is_Limited_View. gcc/ada/ * sem_ch5.adb (Analyze_Assignment): Turn Rhs into a constant and remove calls to the following subp

[COMMITTED] ada: Fix internal error on imported function with post-condition

2023-06-13 Thread Marc Poulhiès via Gcc-patches
From: Eric Botcazou The problem, which is also present for an expression function, is that the function is invoked in the initializing expression of a variable declared in the same declarative part as the function, which causes the freezing of its artificial body before the post-condition is anal

[COMMITTED] ada: Remove wrong comment about expansion of exceptions for GNATprove

2023-06-13 Thread Marc Poulhiès via Gcc-patches
From: Piotr Trojanek Code cleanup related to handling exceptions in GNATprove. gcc/ada/ * exp_ch11.adb (Expand_N_Raise_Statement): Expansion of raise statements never happens in GNATprove mode. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/exp_ch11.adb | 8 +

[COMMITTED] ada: Remove unreferenced routine Is_Inherited_Operation_For_Type

2023-06-13 Thread Marc Poulhiès via Gcc-patches
From: Piotr Trojanek Remove routine that is no referenced after deconstructing of restriction SPARK_05. gcc/ada/ * sem_util.ads (Is_Inherited_Operation_For_Type): Remove spec. * sem_util.adb (Is_Inherited_Operation_For_Type): Remove body. Tested on x86_64-pc-linux-gnu, committe

[COMMITTED] ada: Fix exception raised on invalid contract in generic package

2023-06-13 Thread Marc Poulhiès via Gcc-patches
From: Eric Botcazou This lets the compiler give a proper error message instead. gcc/ada/ * contracts.adb (Contract_Error): New exception. (Add_Contract_Item): Raise Contract_Error instead of Program_Error. (Add_Generic_Contract_Pragma): Deal with Contract_Error. Tested

[COMMITTED] ada: Add missing ss_mark/ss_release in quantified expressions

2023-06-13 Thread Marc Poulhiès via Gcc-patches
From: Bob Duff If a quantified expression says "for all ... of F(...)" where F(...) is a function call that returns on the secondary stack, we need to clean up the secondary stack. This patch adds the required ss_mark/ss_release in that case. gcc/ada/ * exp_ch4.adb (Expand_N_Qua

[COMMITTED] ada: Use ghost predicate in standard library

2023-06-13 Thread Marc Poulhiès via Gcc-patches
From: Yannick Moy In preparation for attribute Initialized to become ghost, use aspect Ghost_Predicate instead of Predicate in unit Ada.Strings.Superbounded of the standard library. gcc/ada/ * libgnat/a-strsup.ads: Change predicate aspect. * sem_ch13.adb (Add_Predicate): Fix for

[COMMITTED] ada: Streamline expansion of controlled actions for aggregates

2023-06-13 Thread Marc Poulhiès via Gcc-patches
From: Eric Botcazou This changes the strategy used to expand controlled actions for array and record aggregates so as to make it simpler and more robust. The current strategy is to set the No_Ctrl_Actions flag on the assignments generated during the expansion of aggregate, as done during the exp

[COMMITTED] ada: Skip elaboration checks for abstract subprograms on derived types

2023-06-13 Thread Marc Poulhiès via Gcc-patches
From: Piotr Trojanek Elaboration checks skip abstract subprogram declarations, which have no body that could be examined. Now these checks also skip abstract subprograms of a derived type, which have no body either. gcc/ada/ * sem_elab.adb (Check_Overriding_Primitive): Prevent Correspon

[COMMITTED] ada: Mark attribute Initialized as ghost code

2023-06-13 Thread Marc Poulhiès via Gcc-patches
From: Yannick Moy Implement the SPARK RM change that defines attribute Initialized as being ghost, i.e. only allowed where a ghost entity would be allowed. gcc/ada/ * ghost.adb (Check_Ghost_Context): Allow absence of Ghost_Id for attribute. Update error message to mention Ghost_

[COMMITTED] ada: Implement new aspect Always_Terminates for SPARK

2023-06-13 Thread Marc Poulhiès via Gcc-patches
From: Piotr Trojanek This patch allows subprograms to be annotated with aspect Always_Terminates that requires a boolean expression. When this expression evaluates to True, the subprogram is required to terminate or raise an exception, but not loop infinitely. This aspect is only meant to be use

[COMMITTED] ada: Fix spurious error on call to function returning private in generic

2023-06-13 Thread Marc Poulhiès via Gcc-patches
From: Eric Botcazou The spurious error is given on a call to a parameterless function returning a private type, present in the body of a generic construct both declared and instantiated in the presence of the full view of the type, because this full view is not properly restored for the instantia

[COMMITTED] ada: Disable inlining in potentially unevaluated contexts

2023-06-13 Thread Marc Poulhiès via Gcc-patches
From: Piotr Trojanek Instead of explicitly disabling inlining in quantified expressions, (which happen to be only preanalysed) and then disabling inlining in potentially unevaluated contexts that are fully analysed (which happen to include quantified expressions), we now simply disable inlining i

[COMMITTED] ada: Fix iterated component initialization

2023-06-13 Thread Marc Poulhiès via Gcc-patches
The call to Resolve_Aggr_Expr may leave references to temporary entities used to check for the construct legality and meant to be removed. Using Preanalyze_And_Resolve correctly guarantees that there is no visible occurrence of such entities. gcc/ada/ * sem_aggr.adb (Resolve_Iterated_Com

[COMMITTED] ada: Recognize iterated_component_association as potentially unevaluated

2023-06-13 Thread Marc Poulhiès via Gcc-patches
From: Piotr Trojanek Routine Is_Potentially_Unevaluated was written for Ada 2012, but now we use it for Ada 2022 as well, so it must recognize iterated component associations (which were added by Ada 2022) as an array component association. gcc/ada/ * sem_util.adb (Is_Potentially_Uneval

[COMMITTED] ada: Recognize iterated_component_association as repeatedly evaluated

2023-06-13 Thread Marc Poulhiès via Gcc-patches
From: Piotr Trojanek As iterated_component_association is an array_component_association (because of a grammar rule Ada 2022 RM 4.3.3(5/5)), its expression is repeatedly evaluated (because of Ada 2022 RM 6.1.1(22.14/5)). With this patch we will now get errors for both conjuncts in this code, whi

[COMMITTED] ada: Fix another case of missing Has_Private_View flag

2023-06-13 Thread Marc Poulhiès via Gcc-patches
From: Eric Botcazou It occurs for the case of a function call first parsed as an identifier. gcc/ada/ * sem_ch12.adb (Save_References_In_Identifier): In the case where the identifier has been turned into a function call by analysis, call Set_Global_Type on the entity if

[COMMITTED] ada: Fix decoration of iterated component association for GNATprove

2023-06-13 Thread Marc Poulhiès via Gcc-patches
From: Piotr Trojanek This patch is an alternative solution for a recent fix in analysis of iterated component association. To recap, if the iterated expression is an aggregate, we want to propagate the component type downward with a call to Resolve_Aggr_Expr; otherwise we want this expression to

[PATCH, committed] testsuite: Check int128 effective target for pr109932-{1,2}.c [PR110230]

2023-06-13 Thread Kewen.Lin via Gcc-patches
Hi, This patch is to make newly added test cases pr109932-{1,2}.c check int128 effective target to avoid unsupported type error on 32-bit. I did hit this failure during testing and fixed it, but made a stupid mistake not updating the local formatted patch which was actually out of date. Pushed a

[PATCH 1/2] Missed opportunity to use [SU]ABD

2023-06-13 Thread Oluwatamilore Adebayo via Gcc-patches
From: oluade01 This adds a recognition pattern for the non-widening absolute difference (ABD). gcc/ChangeLog: * doc/md.texi (sabd, uabd): Document them. * internal-fn.def (ABD): Use new optab. * optabs.def (sabd_optab, uabd_optab): New optabs, * tree-vect-pattern

[PATCH 2/2] AArch64: New RTL for ABD

2023-06-13 Thread Oluwatamilore Adebayo via Gcc-patches
From: oluade01 This patch adds new RTL and tests for sabd and uabd PR tree-optimization/109156 gcc/ChangeLog: * config/aarch64/aarch64-simd-builtins.def (sabd, uabd): Change the mode to 3. * config/aarch64/aarch64-simd.md (aarch64_abd): Rename to abd3. *

Re: [PATCH v1] rs6000: Update powerpc test fold-vec-extract-int.p8.c

2023-06-13 Thread Kewen.Lin via Gcc-patches
Hi, on 2023/5/19 15:40, Ajit Agarwal via Gcc-patches wrote: > Hello All: > > Update powerpc tests for both le and be endian with extra removal of zero > extension and sign extension. > with default ree pass for rs6000 target. Nice! > > Bootstrapped and regtested on powerpc64-linux-gnu. > >

Re: Patch ping (Re: [PATCH] middle-end, i386: Pattern recognize add/subtract with carry [PR79173])

2023-06-13 Thread Uros Bizjak via Gcc-patches
On Tue, Jun 13, 2023 at 9:06 AM Jakub Jelinek wrote: > > Hi! > > On Tue, Jun 06, 2023 at 11:42:07PM +0200, Jakub Jelinek via Gcc-patches wrote: > > The following patch introduces {add,sub}c5_optab and pattern recognizes > > various forms of add with carry and subtract with carry/borrow, see > > pr

[committed] [PATCH v1] rs6000: Update powerpc test fold-vec-extract-int.p8.c

2023-06-13 Thread Ajit Agarwal via Gcc-patches
commit 17714c08e9013b51cf8d04ac39f844d355c923f2 (HEAD -> master, origin/master, origin/HEAD) Author: “Ajit Kumar Agarwal” Date: Fri May 19 02:30:44 2023 -0500 testsuite: Update powerpc test fold-vec-extract-int.p8.c Update powerpc tests with extra zero_extend removal with default

Re: [PATCH] Add MinGW option -mcrtdll= for choosing C RunTime DLL library

2023-06-13 Thread LIU Hao via Gcc-patches
在 2023/6/13 14:29, Pali Rohár 写道: Of course, just I'm not sure where to put the new paragraph. At the beginning? Or after the text? What do you think? Maybe just in front of 'This option is available for MinGW targets.' Also you may reword it as you like. -- Best regards, LIU Hao OpenPGP

Re: [PATCH] middle-end, i386: Pattern recognize add/subtract with carry [PR79173]

2023-06-13 Thread Richard Biener via Gcc-patches
On Tue, 6 Jun 2023, Jakub Jelinek wrote: > Hi! > > The following patch introduces {add,sub}c5_optab and pattern recognizes > various forms of add with carry and subtract with carry/borrow, see > pr79173-{1,2,3,4,5,6}.c tests on what is matched. > Primarily forms with 2 __builtin_add_overflow or _

[PATCH] Fix disambiguation against .MASK_LOAD

2023-06-13 Thread Richard Biener via Gcc-patches
Alias analysis was treating .MASK_LOAD as storing a full vector which means we disambiguate against decls of smaller than vector size. This complements the previous patch handling .MASK_STORE and fixes runtime execution FAILs of gfortran.dg/matmul_3.f90 and gfortran.dg/inline_sum_2.f90 when using A

[PATCH] middle-end/110232 - fix native interpret of vector

2023-06-13 Thread Richard Biener via Gcc-patches
The following fixes native interpretation of a buffer as boolean vector with bit-precision elements such as AVX512 vectors. The check whether the buffer covers the whole vector was broken for bit-precision elements and the following instead implements it based on the vector type size. Bootstrappe

Re: [PATCH] c, c++: Accept __builtin_classify_type (typename)

2023-06-13 Thread Jason Merrill via Gcc-patches
On 6/12/23 15:57, Jakub Jelinek wrote: Hi! As mentioned in my stdckdint.h mail, __builtin_classify_type has a problem that argument promotion (the argument is passed to ... prototyped builtin function) means that certain type classes will simply never appear. I think it is too late to change how

[PATCHv3, rs6000] Add two peephole2 patterns for mr. insn

2023-06-13 Thread HAO CHEN GUI via Gcc-patches
Hi, This patch adds two peephole2 patterns which help convert certain insn sequences to "mr." instruction. These insn sequences can't be combined in combine pass. Compared to last version, it changes the new mode iterator name from "Q" to "WORD". Bootstrapped and tested on powerpc64-linux B

[PATCH][committed] aarch64: Extend -mtp= arguments

2023-06-13 Thread Kyrylo Tkachov via Gcc-patches
Hi all, After discussing the -mtp= option with Arm's LLVM developers we'd like to extend the functionality of the option somewhat. First of all, there is another TPIDR register that can be used to read the thread pointer: TPIDRRO_EL0 (which can also be accessed by AArch32 under another name) so i

[PATCH] RISC-V: Add more SLP tests

2023-06-13 Thread juzhe . zhong
From: Juzhe-Zhong gcc/testsuite/ChangeLog: * gcc.target/riscv/rvv/autovec/partial/slp-10.c: New test. * gcc.target/riscv/rvv/autovec/partial/slp-11.c: New test. * gcc.target/riscv/rvv/autovec/partial/slp_run-10.c: New test. * gcc.target/riscv/rvv/autovec/partial/s

[PATCH][committed] arm: Extend -mtp= arguments

2023-06-13 Thread Kyrylo Tkachov via Gcc-patches
Hi all, After discussing the -mtp= option with Arm's LLVM developers we'd like to extend the functionality of the option somewhat. There are actually 3 system registers that can be accessed for the thread pointer in aarch32: tpidrurw, tpidruro, tpidrprw. They are all read through the CP15 co-pr

Re: [PATCH 4/4] rs6000: build constant via li/lis;rldic

2023-06-13 Thread Jiufu Guo via Gcc-patches
Hi David, Thanks for your valuable comments! David Edelsohn writes: > > On Wed, Jun 7, 2023 at 9:56 PM Jiufu Guo wrote: > > Hi, > > This patch checks if a constant is possible to be built by "li;rldic". > We only need to take care of "negative li", other forms do not need to check. > Fo

[PATCH] RISC-V: Fix bug of VLA SLP auto-vectorization

2023-06-13 Thread juzhe . zhong
From: Juzhe-Zhong Sorry for producing bugs in the previous VLA SLP patch. Consider this following permutation: _85 = VEC_PERM_EXPR <{ 99, 17, ... }, { 11, 80, ... }, { 0, POLY_INT_CST [4, 4], 1, POLY_INT_CST [5, 4], 2, POLY_INT_CST [6, 4], ... }>; The correct result should be: _85 = { 99, 11,

[committed] libgomp/testsuite: Add requires-unified-addr-1.{c,f90} [PR109837]

2023-06-13 Thread Tobias Burnus
Add a testcase for "omp requires unified_address" as we hadn't one. The feature itself worked since the beginning (hardware + implementation wise); that the devices report 'omp requires unified_address' as supported is newer: for nvptx since r13-3460-g131d18e928a3ea and for GCN since r14-1584-gf1

Re: [PATCH] RISC-V: Add more SLP tests

2023-06-13 Thread Robin Dapp via Gcc-patches
Hi Juzhe, as the tests are mostly directly from aarch64's testsuite I would advise comments on where they were taken from as well as a TODO that they should become common tests for a specific target selector (vect_scalable_supported or something). How about some assembly checks for the non-run te

[PATCH v2 0/3] c++: Track lifetimes in constant evaluation [PR70331,...]

2023-06-13 Thread Nathaniel Shead via Gcc-patches
(Another) ping. I also have some more changes on top of this patch set as well if this looks good as it is. https://gcc.gnu.org/pipermail/gcc-patches/2023-March/614811.html Thanks! On Wed, Mar 29, 2023 at 01:32:55PM +1100, Nathaniel Shead wrote: > This is an update of the patch series at > https

[PATCH] c++: Report invalid id-expression in decltype [PR100482]

2023-06-13 Thread Nathaniel Shead via Gcc-patches
(Another) ping. On Sun, Apr 30, 2023 at 12:00:05PM +1000, Nathaniel Shead wrote: > This patch ensures that any errors raised by finish_id_expression when > parsing a decltype expression are properly reported, rather than > potentially going ignored and causing invalid code to be accepted. > > We

[PATCH] c++: Fix ICE with parameter pack of decltype(auto) [PR103497]

2023-06-13 Thread Nathaniel Shead via Gcc-patches
(Another) ping. https://gcc.gnu.org/pipermail/gcc-patches/2023-April/616465.html On Sat, Apr 22, 2023 at 04:25:13PM +1000, Nathaniel Shead wrote: > Bootstrapped and tested on x86_64-pc-linux-gnu. > > -- 8< -- > > This patch raises an error early when the decltype(auto) specifier is > used as a

Re: Re: [PATCH] RISC-V: Add more SLP tests

2023-06-13 Thread juzhe.zh...@rivai.ai
>> as the tests are mostly directly from aarch64's testsuite I would >> advise comments on where they were taken from as well as a TODO that >> they should become common tests for a specific target selector >> (vect_scalable_supported or something). Ok. >> (How about some assembly checks for th

[PATCH V2] RISC-V: Add more SLP tests

2023-06-13 Thread juzhe . zhong
From: Juzhe-Zhong gcc/testsuite/ChangeLog: * gcc.target/riscv/rvv/autovec/partial/slp-10.c: New test. * gcc.target/riscv/rvv/autovec/partial/slp-11.c: New test. * gcc.target/riscv/rvv/autovec/partial/slp_run-10.c: New test. * gcc.target/riscv/rvv/autovec/partial/s

[ping] Add 'libgomp.{, oacc-}fortran/fortran-torture_execute_math.f90'

2023-06-13 Thread Thomas Schwinge
Hi! On 2023-06-05T14:18:48+0200, I wrote: > OK to push the attached > "Add 'libgomp.{,oacc-}fortran/fortran-torture_execute_math.f90'"? Ping. Grüße Thomas - Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstraße 201, 80634 München; Gesellschaft mit beschränkter H

[ping] driver: Forward '-lgfortran', '-lm' to offloading compilation

2023-06-13 Thread Thomas Schwinge
Hi! On 2023-06-05T14:25:18+0200, I wrote: > OK to push the attached > "driver: Forward '-lgfortran', '-lm' to offloading compilation"? > (We didn't have a PR open for that, or did we?) Ping. Grüße Thomas - Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstraße 201

[PATCH] RISC-V: Remove duplicate `#include "riscv-vector-switch.def"`

2023-06-13 Thread Lehua Ding
Hi, This patch remove the duplicate `#include "riscv-vector-switch.def"` statement and add #undef for ENTRY and TUPLE_ENTRY macros later. Best, Lehua --- gcc/config/riscv/riscv-v.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gcc/config/riscv/riscv-v.cc b/gcc/config/ri

Re: [PATCH] RISC-V: Remove duplicate `#include "riscv-vector-switch.def"`

2023-06-13 Thread juzhe.zh...@rivai.ai
Send V2 patch with changelog. Thanks. juzhe.zh...@rivai.ai From: Lehua Ding Date: 2023-06-13 18:53 To: gcc-patches; juzhe.zhong Subject: [PATCH] RISC-V: Remove duplicate `#include "riscv-vector-switch.def"` Hi, This patch remove the duplicate `#include "riscv-vector-switch.def"` statement an

[PATCH V2] RISC-V: Remove duplicate `#include "riscv-vector-switch.def"`

2023-06-13 Thread Lehua Ding
Hi, This patch remove the duplicate `#include "riscv-vector-switch.def"` statement and add #undef for ENTRY and TUPLE_ENTRY macros later. Best, Lehua gcc/ChangeLog: * config/riscv/riscv-v.cc (struct mode_vtype_group): Remove duplicate #include. (ENTRY): Undef. (TUPLE_EN

Re: [PATCH V2] RISC-V: Remove duplicate `#include "riscv-vector-switch.def"`

2023-06-13 Thread juzhe.zh...@rivai.ai
LGTM. Thanks. Will merge it soon. juzhe.zh...@rivai.ai From: Lehua Ding Date: 2023-06-13 18:59 To: gcc-patches; juzhe.zhong Subject: [PATCH V2] RISC-V: Remove duplicate `#include "riscv-vector-switch.def"` Hi, This patch remove the duplicate `#include "riscv-vector-switch.def"` statement an

Re: [PATCH V2] RISC-V: Remove duplicate `#include "riscv-vector-switch.def"`

2023-06-13 Thread Lehua Ding
> LGTM. > Thanks. > Will merge it soon. Thank you for such a prompt reply.    

Re: [PATCH] New finish_compare_by_pieces target hook (for x86).

2023-06-13 Thread Richard Biener via Gcc-patches
On Mon, Jun 12, 2023 at 4:04 PM Roger Sayle wrote: > > > The following simple test case, from PR 104610, shows that memcmp () == 0 > can result in some bizarre code sequences on x86. > > int foo(char *a) > { > static const char t[] = "0123456789012345678901234567890"; > return __builtin_me

Re: [ping] Add 'libgomp.{,oacc-}fortran/fortran-torture_execute_math.f90'

2023-06-13 Thread Tobias Burnus
On 13.06.23 12:42, Thomas Schwinge wrote: On 2023-06-05T14:18:48+0200, I wrote: OK to push the attached "Add 'libgomp.{,oacc-}fortran/fortran-torture_execute_math.f90'"? Subject: [PATCH] Add 'libgomp.{,oacc-}fortran/fortran-torture_execute_math.f90' gcc/testsuite/ * gfortran.for

Re: [PATCH] middle-end, i386: Pattern recognize add/subtract with carry [PR79173]

2023-06-13 Thread Jakub Jelinek via Gcc-patches
On Tue, Jun 13, 2023 at 08:40:36AM +, Richard Biener wrote: > I suspect re-association can wreck things even more here. I have > to say the matching code is very hard to follow, not sure if > splitting out a function matching > >_22 = .{ADD,SUB}_OVERFLOW (_6, _5); >_23 = REALPART_EXPR

RE: [PATCH v5] RISC-V: Add vector psabi checking.

2023-06-13 Thread Li, Pan2 via Gcc-patches
Committed v6 with riscv.exp and rvv.exp passed, thanks Kito. Pan -Original Message- From: Li, Pan2 Sent: Monday, June 12, 2023 8:49 PM To: Kito Cheng ; Wang, Yanzhang Cc: gcc-patches@gcc.gnu.org; juzhe.zh...@rivai.ai Subject: RE: [PATCH v5] RISC-V: Add vector psabi checking. Sure thing

[PATCH V3] RISC-V: Add more SLP tests

2023-06-13 Thread juzhe . zhong
From: Juzhe-Zhong gcc/testsuite/ChangeLog: * gcc.target/riscv/rvv/autovec/partial/slp-10.c: New test. * gcc.target/riscv/rvv/autovec/partial/slp-11.c: New test. * gcc.target/riscv/rvv/autovec/partial/slp-13.c: New test. * gcc.target/riscv/rvv/autovec/partial/slp-1

Re: [PATCH V3] RISC-V: Add more SLP tests

2023-06-13 Thread Robin Dapp via Gcc-patches
Hi Juzhe, thanks, works for me as is. I just hope somebody is going to take on the task of making different LMUL SLP variants "scannable" at some point because it would definitely increase our test coverage with these tests. (Or split the tests manually and not iterate over LMUL) Regards Robin

[pushed] c++: mutable temps in rodata

2023-06-13 Thread Jason Merrill via Gcc-patches
Tested x86_64-pc-linux-gnu, applying to trunk. -- 8< -- If the type of a temporary has mutable members, we can't set TREE_READONLY on the VAR_DECL; this is parallel to the check in cp_apply_type_quals_to_decl. gcc/cp/ChangeLog: * tree.cc (build_target_expr): Check TYPE_HAS_MUTABLE_P. g

Re: [PATCH] RISC-V: Fix bug of VLA SLP auto-vectorization

2023-06-13 Thread Robin Dapp via Gcc-patches
Hi Juzhe, LGTM. You could also add the aarch64 test disclaimer here again, but no need for a V2. Regards Robin

Re: Re: [PATCH V3] RISC-V: Add more SLP tests

2023-06-13 Thread juzhe.zh...@rivai.ai
Ok. After floating-point binary. I will do floating-point ternary. I think you do conversion next (widen floating point, float to int, int to float). It seems that we almost done most of the part autovec patterns in RISC-V port. What else we can do? My second middle-end patch (LEN_MASK _* load/s

[PATCH] Fix memory leak in loop header copying

2023-06-13 Thread Richard Biener via Gcc-patches
Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed. * tree-ssa-loop-ch.cc (ch_base::copy_headers): Free loop BBs. --- gcc/tree-ssa-loop-ch.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/gcc/tree-ssa-loop-ch.cc b/gcc/tree-ssa-loop-ch.cc index 7fdef3bb11a..22252bee135 100

[PATCH] rs6000: replace '(const_int 0)' to 'unspec:BLK [(const_int 0)]' for stack_tie

2023-06-13 Thread Jiufu Guo via Gcc-patches
Hi, For stack_tie, currently below insn is generated: (insn 15 14 16 3 (parallel [ (set (mem/c:BLK (reg/f:DI 1 1) [1 A8]) (const_int 0 [0])) ]) "/home/guojiufu/temp/gdb.c":13:3 922 {stack_tie} (nil)) It is "set (mem/c:BLK (reg/f:DI 1 1) (const_int 0 [

Re: [PATCH] rs6000: replace '(const_int 0)' to 'unspec:BLK [(const_int 0)]' for stack_tie

2023-06-13 Thread Xi Ruoyao via Gcc-patches
On Tue, 2023-06-13 at 20:23 +0800, Jiufu Guo via Gcc-patches wrote: > Compare with previous version, this addes ChangeLog and removes > const_anchor parts. > https://gcc.gnu.org/pipermail/gcc-patches/2023-June/621356.html. [Off topic] const_anchor is just broken now. See https://gcc.gnu.org/bug

[PATCH] Add -Wmissing-variable-declarations [PR65213].

2023-06-13 Thread Hamza Mahfooz
Resolves: PR c/65213 - Extend -Wmissing-declarations to variables [i.e. add -Wmissing-variable-declarations] gcc/c-family/ChangeLog: PR c/65213 * c.opt (-Wmissing-variable-declarations): New option. gcc/c/ChangeLog: PR c/65213 * c-decl.cc (start_decl): Handle -Wm

Re: [PATCH V3] RISC-V: Add more SLP tests

2023-06-13 Thread Jeff Law via Gcc-patches
On 6/13/23 05:38, juzhe.zh...@rivai.ai wrote: From: Juzhe-Zhong gcc/testsuite/ChangeLog: * gcc.target/riscv/rvv/autovec/partial/slp-10.c: New test. * gcc.target/riscv/rvv/autovec/partial/slp-11.c: New test. * gcc.target/riscv/rvv/autovec/partial/slp-13.c: New test

Re: [PATCH] RISC-V: Fix bug of VLA SLP auto-vectorization

2023-06-13 Thread Jeff Law via Gcc-patches
On 6/13/23 06:16, Robin Dapp wrote: Hi Juzhe, LGTM. You could also add the aarch64 test disclaimer here again, but no need for a V2. Agreed. jeff

Re: [PATCH 1/4] rs6000: build constant via li;rotldi

2023-06-13 Thread David Edelsohn via Gcc-patches
On Mon, Jun 12, 2023 at 11:30 PM Jiufu Guo wrote: > > > Hi David, > > David Edelsohn writes: > > On Wed, Jun 7, 2023 at 9:55 PM Jiufu Guo wrote: > > > > Hi, > > > > This patch checks if a constant is possible to be rotated to/from a > > positive > > or negative value from "li". If so, we cou

Re: [PATCH] Fix note_defect3 function

2023-06-13 Thread Jeff Law via Gcc-patches
On 6/12/23 21:18, Akari Takahashi via Gcc-patches wrote: Hello, I've noticed an issue with the note_defect3 function and have prepared a patch to fix it. The function is missing a return statement, which is causing undefined behavior. This patch adds the missing return statement, ensuring tha

Ping * 2 : Fwd: [V9][PATCH 1/2] Handle component_ref to a structre/union field including flexible array member [PR101832]

2023-06-13 Thread Qing Zhao via Gcc-patches
Hi, I’d like to ping this patch again for the Middle-end approval (on gcc/tree-object-size.cc change). This is an important patch to Linux Kernel security. The patch has addressed all the comments and suggestions raised during the review process. The C FE, Doc changes has been approved. Most

RE: [PATCH] RISC-V: Fix bug of VLA SLP auto-vectorization

2023-06-13 Thread Li, Pan2 via Gcc-patches
Committed, thanks Jeff. Pan -Original Message- From: Gcc-patches On Behalf Of Jeff Law via Gcc-patches Sent: Tuesday, June 13, 2023 9:30 PM To: Robin Dapp ; juzhe.zh...@rivai.ai; gcc-patches@gcc.gnu.org Cc: kito.ch...@gmail.com; kito.ch...@sifive.com; pal...@dabbelt.com; pal...@rivosi

RE: [PATCH V3] RISC-V: Add more SLP tests

2023-06-13 Thread Li, Pan2 via Gcc-patches
Committed, thanks Jeff. Pan -Original Message- From: Gcc-patches On Behalf Of Jeff Law via Gcc-patches Sent: Tuesday, June 13, 2023 9:26 PM To: juzhe.zh...@rivai.ai; gcc-patches@gcc.gnu.org Cc: kito.ch...@gmail.com; kito.ch...@sifive.com; pal...@dabbelt.com; pal...@rivosinc.com; rdapp.

Re: [PATCH] RISC-V: Add comments of some functions

2023-06-13 Thread Jeff Law via Gcc-patches
On 6/12/23 20:26, juzhe.zh...@rivai.ai wrote: From: Juzhe-Zhong gcc/ChangeLog: * config/riscv/riscv-v.cc (rvv_builder::single_step_npatterns_p): Add comment. (shuffle_generic_patterns): Ditto. (expand_vec_perm_const_1): Ditto. OK. Thanks! jeff

Re: [PATCH V2] RISC-V: Support RVV VLA SLP auto-vectorization

2023-06-13 Thread Jeff Law via Gcc-patches
On 6/12/23 20:27, juzhe.zh...@rivai.ai wrote: Ok. https://gcc.gnu.org/pipermail/gcc-patches/2023-June/thread.html I have add comments as you suggested. Thanks. With those changes I think the main patch here (RVV VLA SLP auto

Re: [PATCH] RISC-V: Implement vec_set and vec_extract.

2023-06-13 Thread Jeff Law via Gcc-patches
On 6/13/23 00:50, Robin Dapp wrote: I suggest we implement vector calling convention even though it is not ratified yet. We can allow calling convention to be enabled only when --param=riscv-autovec-preference=fixed-vlmax. We have such issue: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=1101

RE: [PATCH] RISC-V: Add comments of some functions

2023-06-13 Thread Li, Pan2 via Gcc-patches
Committed, thanks Jeff. Pan -Original Message- From: Gcc-patches On Behalf Of Jeff Law via Gcc-patches Sent: Tuesday, June 13, 2023 10:06 PM To: juzhe.zh...@rivai.ai; gcc-patches@gcc.gnu.org Cc: kito.ch...@gmail.com; kito.ch...@sifive.com; pal...@dabbelt.com; pal...@rivosinc.com; rdapp

Re: [PATCH] modula2: Fix bootstrap

2023-06-13 Thread Jakub Jelinek via Gcc-patches
On Wed, Jun 07, 2023 at 09:42:22AM +0100, Andre Vieira (lists) wrote: > I do need those includes and sorry I broke your bootstrap it didn't show up > on my aarch64-unknown-linux-gnu bootstrap, I'm guessing the rules there were > just run in a different order. Glad you were able to fix it :) Unfort

RE: [PATCH] RISC-V: Remove duplicate `#include "riscv-vector-switch.def"`

2023-06-13 Thread Li, Pan2 via Gcc-patches
Committed, thanks Juzhe. Pan -Original Message- From: Gcc-patches On Behalf Of juzhe.zh...@rivai.ai Sent: Tuesday, June 13, 2023 6:56 PM To: 丁乐华 ; gcc-patches Subject: Re: [PATCH] RISC-V: Remove duplicate `#include "riscv-vector-switch.def"` Send V2 patch with changelog. Thanks. j

Re: [RFC] Add stdckdint.h header for C23

2023-06-13 Thread Joseph Myers
On Tue, 13 Jun 2023, Jakub Jelinek via Gcc-patches wrote: > There is always the possibility to have the header co-owned by both > the compiler and C library, limits.h style. > Just > #if __has_include_next() > # include_next > #endif > perhaps guarded with some macro at the end of the GCC versio

Re: [PATCH] ipa: Self-DCE of uses of removed call LHSs (PR 108007)

2023-06-13 Thread Martin Jambor
Ping. Thanks, Martin On Fri, May 12 2023, Martin Jambor wrote: > Hi, > > PR 108007 is another manifestation where we rely on DCE to clean-up > after IPA-SRA and if the user explicitely switches DCE off, IPA-SRA > can leave behind statements which are fed uninitialized values and > trap, even tho

Re: [RFC] Add stdckdint.h header for C23

2023-06-13 Thread Jakub Jelinek via Gcc-patches
On Tue, Jun 13, 2023 at 03:10:48PM +, Joseph Myers wrote: > > So why does C2X say > > Recommended practice > > It is recommended to produce a diagnostic message if type2 or type3 are > > not suitable integer types, or if *result is not a modifiable lvalue of > > a suitable integer type. > > ? >

RE: [PATCH v2] machine descriptor: New compact syntax for insn and insn_split in Machine Descriptions.

2023-06-13 Thread Tamar Christina via Gcc-patches
Hi All, Updated patch with feedback addressed. Bootstrapped Regtested on aarch64-none-linux-gnu and no issues. Any feedback? Thanks, Tamar gcc/ChangeLog: * gensupport.cc (class conlist, add_constraints, add_attributes, skip_spaces, expect_char, preprocess_compact_syntax,

Re: [ping] driver: Forward '-lgfortran', '-lm' to offloading compilation

2023-06-13 Thread Joseph Myers
On Tue, 13 Jun 2023, Thomas Schwinge wrote: > Hi! > > On 2023-06-05T14:25:18+0200, I wrote: > > OK to push the attached > > "driver: Forward '-lgfortran', '-lm' to offloading compilation"? > > (We didn't have a PR open for that, or did we?) > > Ping. OK. -- Joseph S. Myers jos...@codesourcery

Re: [RFC] Add stdckdint.h header for C23

2023-06-13 Thread Joseph Myers
On Tue, 13 Jun 2023, Jakub Jelinek via Gcc-patches wrote: > Yeah, having say __builtin_{clz,ctz,ffs,popcount,parity} variants which would > be typegeneric and would allow say any normal integral or _BitInt type > (or just unsigned versions thereof?) would be useful. Even without _BitInt > we have

[PATCH, OpenACC 2.7] Implement self clause for compute constructs

2023-06-13 Thread Chung-Lin Tang via Gcc-patches
Hi Thomas, This patch implements the compiler side for the 'self' clause for compute constructs: parallel, kernels, and serial. As you know, the actual "local device" device type for libgomp is not yet implemented, so the libgomp side is basically just a simple duplicate of what host-fallback i

  1   2   >