Re: [PATCH 3/3] MATCH: Replace all uses of ssa_name_has_boolean_range with zero_one_valued_p

2023-09-05 Thread Jeff Law via Gcc-patches
On 9/2/23 09:09, Andrew Pinski via Gcc-patches wrote: This replaces all uses of ssa_name_has_boolean_range with zero_one_valued_p except for the one in the definition of zero_one_valued_p. This simplifies the code in general and makes only one way of saying we have a range of [0,1]. Note this

Re: [PATCH] ssa_name_has_boolean_range vs signed-boolean:31 types

2023-09-05 Thread Jeff Law via Gcc-patches
On 9/1/23 20:32, Andrew Pinski via Gcc-patches wrote: This turns out to be a latent bug in ssa_name_has_boolean_range where it would return true for all boolean types but all of the uses of ssa_name_has_boolean_range was expecting 0/1 as the range rather than [-1,0]. So when I fixed vector low

Re: [PATCH 2/2] VR-VALUES: Rewrite test_for_singularity using range_op_handler

2023-09-05 Thread Andrew Pinski via Gcc-patches
On Mon, Sep 4, 2023 at 11:06 PM Jeff Law via Gcc-patches wrote: > > > > On 9/1/23 11:30, Andrew Pinski via Gcc-patches wrote: > > So it turns out there was a simplier way of starting to > > improve VRP to start to fix PR 110131, PR 108360, and PR 108397. > > That was rewrite test_for_singularity t

Re: [PATCH] MATCH: Transform `(1 >> X) !=/== 0` into `X ==/!= 0`

2023-09-05 Thread Jeff Law via Gcc-patches
On 9/3/23 10:25, Andrew Pinski via Gcc-patches wrote: We currently have a pattern for handling `(C >> X) & D == 0` but if C is 1 and D is 1, the `& 1` might have been removed. gcc/ChangeLog: PR tree-optimization/105832 * match.pd (`(1 >> X) != 0`): New pattern OK jeff

Re: [PATCH] MATCH: Add `~MAX(~X, Y)` pattern: [PR96694]

2023-09-05 Thread Jeff Law via Gcc-patches
On 9/3/23 18:21, Andrew Pinski via Gcc-patches wrote: This adds `~MAX(~X, Y)` and `~MIN(~X, Y)` patterns that are like the `~(~a & b)` and `~(~a | b)` patterns and allows to reduce the number of ~ by 1. OK? Bootstrapped and tested on x86_64-linux-gnu with no regressions. PR tree-opti

[PATCH 16/12] _BitInt profile fixes [PR102989]

2023-09-05 Thread Jakub Jelinek via Gcc-patches
On Thu, Aug 24, 2023 at 03:14:32PM +0200, Jan Hubicka via Gcc-patches wrote: > this patch extends verifier to check that all probabilities and counts are > initialized if profile is supposed to be present. This is a bit complicated > by the posibility that we inline !flag_guess_branch_probability

Re: [PATCH] RISC-V: Emit .note.GNU-stack for non-linux target as well

2023-09-05 Thread Jeff Law via Gcc-patches
On 8/31/23 03:05, Kito Cheng wrote: We only emit that on linux target before, that not problem before, however Qemu has fix a bug to make qemu user mode honor PT_GNU_STACK[1], that will cause problem when we test baremetal with qemu. So the straightforward is enable that as well for non-linux

Re: [PATCH] MATCH: Add pattern for `(x | y) & (x & z)`

2023-09-05 Thread Jeff Law via Gcc-patches
On 9/3/23 14:49, Andrew Pinski via Gcc-patches wrote: Like the pattern already there for `(x | y) & x`, this adds a simple pattern to optimize `(x | y) & (x & z)` to just `x & z`. OK? Bootstrapped and tested on x86-64-linux-gnu with no regressions. gcc/ChangeLog: PR tree-optimizatio

Re: [PATCH] MATCH: Add `(x | c) & ~(y | c)` and `x & ~(y | x)` patterns [PR98710]

2023-09-05 Thread Jeff Law via Gcc-patches
On 9/3/23 19:25, Andrew Pinski via Gcc-patches wrote: Adding some more simple bit_and/bit_ior patterns. How often these show up, I have no idea. This was tested on top of https://gcc.gnu.org/pipermail/gcc-patches/2023-September/629174.html . OK? Bootstrapped and tested on x86_64-linux-gnu wi

Re: [PATCH] MATCH: `(nop_convert)-(convert)a` into -(convert)a if we are converting from something smaller

2023-09-05 Thread Jeff Law via Gcc-patches
On 9/2/23 01:00, Andrew Pinski via Gcc-patches wrote: This allows removal of one conversion and in the case of booleans, might be able to remove the negate and the other conversion later on. OK? Bootstrapped and tested on x86_64-linux-gnu with no regressions. PR tree-optimization/10

[PATCH 17/12] _BitInt a ? ~b : b match.pd fix [PR102989]

2023-09-05 Thread Jakub Jelinek via Gcc-patches
On Wed, Aug 09, 2023 at 12:19:54PM -0700, Andrew Pinski via Gcc-patches wrote: > PR tree-optimization/110937 > PR tree-optimization/100798 > --- a/gcc/match.pd > +++ b/gcc/match.pd > @@ -6460,6 +6460,20 @@ DEFINE_INT_AND_FLOAT_ROUND_FN (RINT) >(if (cmp == NE_EXPR) > { co

[PATCH 18/12] Handle BITINT_TYPE in build_{, minus_}one_cst [PR102989]

2023-09-05 Thread Jakub Jelinek via Gcc-patches
Hi! Recent match.pd changes trigger ICE in build_minus_one_cst, apparently I forgot to handle BITINT_TYPE in these (while I've handled it in build_zero_cst). Will commit as obvious together with the rest of the series when the last patches are approved. 2023-09-05 Jakub Jelinek PR c/

[committed] tree-ssa-tail-merge: Fix a comment typo

2023-09-05 Thread Jakub Jelinek via Gcc-patches
Hi! I've noticed a typo in a comment, fixed thusly. Committed to trunk as obvious. 2023-09-05 Jakub Jelinek * tree-ssa-tail-merge.cc (replace_block_by): Fix a comment typo: avreage -> average. --- gcc/tree-ssa-tail-merge.cc.jj 2023-07-11 13:40:40.253431941 +0200 +++ gcc

[PATCH V5 0/3] RISC-V: Add an experimental vector calling convention

2023-09-05 Thread Lehua Ding
V5 change: Rebase and fix vsetvl testcase fail by change `(unspec [...] UNSPEC_CALLEE_CC)` to `(use (unspec [...] UNSPEC_CALLEE_CC))`. This change makes single_set function re-think call_insn as a single set pattern. Hi RISC-V folks, This patch implement the proposal of RISC-V vector calling conv

[PATCH V5 2/3] RISC-V: Part-2: Save/Restore vector registers which need to be preversed

2023-09-05 Thread Lehua Ding
Because functions which follow vector calling convention variant has callee-saved vector reigsters but functions which follow standard calling convention don't have. We need to distinguish which function callee is so that we can tell GCC exactly which vector registers callee will clobber. So I enco

[PATCH V5 1/3] RISC-V: Part-1: Select suitable vector registers for vector type args and returns

2023-09-05 Thread Lehua Ding
I post the vector register calling convention rules from in the proposal[1] directly here: v0 is used to pass the first vector mask argument to a function, and to return vector mask result from a function. v8-v23 are used to pass vector data arguments, vector tuple arguments and the rest vector ma

[PATCH V5 3/3] RISC-V: Part-3: Output .variant_cc directive for vector function

2023-09-05 Thread Lehua Ding
Functions which follow vector calling convention variant need be annotated by .variant_cc directive according the RISC-V Assembly Programmer's Manual[1] and RISC-V ELF Specification[2]. [1] https://github.com/riscv-non-isa/riscv-asm-manual/blob/master/riscv-asm.md#pseudo-ops [2] https://github.c

Re: [PATCH] ssa_name_has_boolean_range vs signed-boolean:31 types

2023-09-05 Thread Andrew Pinski via Gcc-patches
On Tue, Sep 5, 2023 at 12:09 AM Jeff Law via Gcc-patches wrote: > > > > On 9/1/23 20:32, Andrew Pinski via Gcc-patches wrote: > > This turns out to be a latent bug in ssa_name_has_boolean_range > > where it would return true for all boolean types but all of the > > uses of ssa_name_has_boolean_ran

GNU Tools Cauldron 2023

2023-09-05 Thread Thomas Schwinge
Hi! On 2023-06-05T14:59:05+0100, Richard Earnshaw via Gcc wrote: > We are pleased to invite you all to the next GNU Tools Cauldron, > taking place in Cambridge, UK, on September 22-24, 2023. > > As for the previous instances, we have setup a wiki page for > details: > >https://gcc.gnu.org

Re: [PATCH V5 0/3] RISC-V: Add an experimental vector calling convention

2023-09-05 Thread Kito Cheng via Gcc-patches
Thanks for fixing the issue! I guess I could find time tonight to do the final round review and test :P then we could land this patch this week. On Tue, Sep 5, 2023 at 3:45 PM Lehua Ding wrote: > > V5 change: Rebase and fix vsetvl testcase fail by change > `(unspec [...] UNSPEC_CALLEE_CC)` to `(u

Re: [PATCH] fwprop: Allow UNARY_P and check register pressure.

2023-09-05 Thread Richard Sandiford via Gcc-patches
Robin Dapp writes: >> So I don't think I have a good feel for the advantages and disadvantages >> of doing this. Robin's analysis of the aarch64 changes was nice and >> detailed though. I think the one that worries me most is the addressing >> mode one. fwprop is probably the first chance we ge

[committed 1/2] arc: Remove obsolete mbbit-peephole option and unused patterns.

2023-09-05 Thread Claudiu Zissulescu via Gcc-patches
gcc/ * common/config/arc/arc-common.cc (arc_option_optimization_table): Remove mbbit_peephole. * config/arc/arc.md (UNSPEC_ARC_DIRECT): Remove. (store_direct): Likewise. (BBIT peephole2): Likewise. * config/arc/arc.opt (mbbit-peephole): Ignore option

[committed 2/2] arc: Cleanup addsi3 instruction pattern

2023-09-05 Thread Claudiu Zissulescu via Gcc-patches
This patch repurposes the code letter 's' to 'x', and 'S' to 'J'. Also it introduces new CODE letters 'x', 's', 'S', and 'N'. gcc/ChangeLog: * config/arc/arc-protos.h (arc_output_addsi): Remove declaration. (split_addsi): Likewise. * config/arc/arc.cc (arc_print_operand):

Re: [PATCH] fwprop: Allow UNARY_P and check register pressure.

2023-09-05 Thread Robin Dapp via Gcc-patches
> I imagine doing it in reverse postorder would still make sense. > > But my point was that, for the current fwprop limitation of substituting > into exactly one use of a register, we can check whether that use is > the *only* use of register. > > I.e. if we substitute: > > A: (set (reg R1) (f

[PATCH] RISC-V: Export functions as global extern preparing for dynamic LMUL patch use

2023-09-05 Thread Juzhe-Zhong
Notice those functions need to be use by COST model for dynamic LMUL use. Extract as a single patch and committed. gcc/ChangeLog: * config/riscv/riscv-protos.h (lookup_vector_type_attribute): Export global. (get_all_predecessors): New function. (get_all_successors): Ditto

[PATCH V2] RISC-V: Support Dynamic LMUL Cost model

2023-09-05 Thread Juzhe-Zhong
This patch support dynamic LMUL cost modeling with --param=riscv-autovec-lmul=dynamic. Consider this following case: void foo (int32_t *__restrict a, int32_t *__restrict b,int32_t *__restrict c, int32_t *__restrict a2, int32_t *__restrict b2, int32_t *__restrict c2, int32_t *__res

Re: [PATCH] riscv: xtheadcondmov: Don't run tests with -Oz

2023-09-05 Thread Philipp Tomsich
Applied to master. Thanks! Philipp. On Tue, 5 Sept 2023 at 08:22, Jeff Law wrote: > > > On 9/1/23 04:20, Christoph Muellner wrote: > > From: Christoph Müllner > > > > Recently, these xtheadcondmov tests regressed with -Oz: > > * FAIL: gcc.target/riscv/xtheadcondmov-mveqz-imm-eqz.c > > * FAIL: g

Re: [PATCH v2 1/2] strlen: fold strstr() even if the length isn't previously known [PR96601]

2023-09-05 Thread Jakub Jelinek via Gcc-patches
On Mon, Sep 04, 2023 at 11:14:41PM -0600, Jeff Law wrote: > > > On 9/4/23 14:58, Hamza Mahfooz wrote: > > Currently, we give up in fold_strstr_to_strncmp() if the length of the > > the second argument to strstr() isn't known to us by the time we hit > > that function. However, we can instead inse

[PATCH] xtensa: Optimize boolean evaluation when SImode EQ/NE to zero if TARGET_MINMAX

2023-09-05 Thread Takayuki 'January June' Suwa via Gcc-patches
This patch optimizes the boolean evaluation for equality to 0 in SImode using the MINU (Minimum Value Unsigned) machine instruction available when TARGET_MINMAX is configured, for example, (x != 0) to MINU(x, 1) and (x == 0) to (MINU(x, 1) ^ 1). /* example */ int test0(int x) { retur

[PATCH v1] RISC-V: Support FP SGNJ autovec for VLS mode

2023-09-05 Thread Pan Li via Gcc-patches
From: Pan Li This patch would like to allow the VLS mode autovec for the floating-point binary operation MAX/MIN. Given below code example: void test(float * restrict out, float * restrict in1, float * restrict in2) { for (int i = 0; i < 128; i++) out[i] = __builtin_copysignf (in1[i], in2

Re: [PATCH v3][RFC] c-family: Implement __has_feature and __has_extension [PR60512]

2023-09-05 Thread Alex Coplan via Gcc-patches
On 17/08/2023 10:39, Alex Coplan via Gcc-patches wrote: > I'd like to ping this for review from C and C++ maintainers: > https://gcc.gnu.org/pipermail/gcc-patches/2023-August/626178.html Ping^2 > > I probably should have dropped the RFC tag this time round as I think > the patch is nearly ready,

[COMMITTED] Revert "Adjust one Ada test"

2023-09-05 Thread Marc Poulhiès via Gcc-patches
This reverts commit d8dc61bb5ab99c3239ea93a37097f9419bee0211. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/testsuite/gnat.dg/unroll3.adb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/testsuite/gnat.dg/unroll3.adb b/gcc/testsuite/gnat.dg/unroll3.adb index

[COMMITTED] ada: Enforce subtype conformance of interface primitives

2023-09-05 Thread Marc Poulhiès via Gcc-patches
From: Javier Miranda gcc/ada/ * sem_ch3.adb (Add_Internal_Interface_Entities): Add missing subtype-conformance check on primitives implementing interface primitives. (Error_Posted_In_Formals): New subprogram. Tested on x86_64-pc-linux-gnu, committed on master. -

[COMMITTED] ada: Remove GNATcheck violations

2023-09-05 Thread Marc Poulhiès via Gcc-patches
From: Sheri Bernstein Use pragma Annotate to exempt GNATcheck violations that are related to proof code. Specifically, exempt rules "Metrics_LSLOC" and "Metrics_Cyclomatic_Complexity" whose limits are exceeded due to proof code, and exempt rule "Discriminated_Records" for a variant record that is

[COMMITTED] ada: Add missing units to Makefile.rtl

2023-09-05 Thread Marc Poulhiès via Gcc-patches
From: Ronan Desplanques A previous change accidently removed a-cohama and a-cohase from `Makefile.rtl`. This patch adds these units back gcc/ada/ * Makefile.rtl: Add missing units. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/Makefile.rtl | 2 ++ 1 file changed, 2

[COMMITTED] ada: Fix assertion failure on very peculiar enumeration type

2023-09-05 Thread Marc Poulhiès via Gcc-patches
From: Eric Botcazou The compiler currently does not support the combination of a representation clause on an enumeration type with a size clause whose value is greater than the size of the largest machine scalar supported by the target. Given that such a type would have little practical value, t

[COMMITTED] ada: Tweak comment about tasking corner case

2023-09-05 Thread Marc Poulhiès via Gcc-patches
From: Ronan Desplanques This patch adjusts a comment that could have misleadingly suggested that a corner case related to tasks could not exist in Ada 2012 or Ada 2022. gcc/ada/ * libgnarl/s-tassta.adb: Tweak comment. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/li

[COMMITTED] ada: Compiler hangs on invalid postcondition

2023-09-05 Thread Marc Poulhiès via Gcc-patches
From: Steve Baird In some cases involving an illegal reference to F'Result in the postcondition for a function not named F, the compiler would hang instead of correctly diagnosing the error. gcc/ada/ * sem_attr.adb (Denote_Same_Function): Handle the case where Has_Homonym (Pref_

[COMMITTED] ada: Crash on function returning empty Ada 2022 aggregate

2023-09-05 Thread Marc Poulhiès via Gcc-patches
From: Javier Miranda The compiler crashes processing a function that returns an empty aggregate when its returned type is a record type which defined its container aggregate aspects. gcc/ada/ * exp_aggr.adb (Expand_Container_Aggregate): Report warning on infinite recursion if an

[COMMITTED] ada: Spurious warning about negative modular literal

2023-09-05 Thread Marc Poulhiès via Gcc-patches
From: Steve Baird If -gnatw.m is enabled, the compiler generates a warning if a unary minus operator of a modular type is applied to an integer literal. This warning was being incorrectly generated in some cases where no integer literal is present in the source code. gcc/ada/ * sem_res.

[COMMITTED] ada: Fix crash on selected component lookup in generic instance

2023-09-05 Thread Marc Poulhiès via Gcc-patches
From: Bob Duff This patch fixes a compiler crash on selected component lookup in an instance of a generic unit when the relevant type is an itype. gcc/ada/ * sem_ch4.adb (Find_Component_In_Instance): Check that Declaration_Node (Par) is not Empty, as it is for itypes. Tested on

[COMMITTED] ada: Pass -msmp when linking for ppc-vx6 --RTS=rtp-smp

2023-09-05 Thread Marc Poulhiès via Gcc-patches
From: Alexandre Oliva gprbuild and gnatmake won't pass --RTS=rtp-smp to the compiler driver for linking. The flag was not used during linking: the .spec files named as linker options were all we passed for the linker to get the -L flags for lib_smp and lib. There was a problem, though: although

[COMMITTED] ada: Handle GNATcheck violations

2023-09-05 Thread Marc Poulhiès via Gcc-patches
From: Sheri Bernstein For the GNATcheck rule "Improper_Returns", either use pragma Annotate to exempt the violation with the rationale "early returns for performance", or refactor the code by replacing multiple returns by a single return statement with a conditional expression; this is more reada

[COMMITTED] ada: Crash on creation of extra formals on type extension

2023-09-05 Thread Marc Poulhiès via Gcc-patches
From: Javier Miranda The compiler blows up processing an overriding dispatching function of a derived tagged type that returns a private tagged type that has an access type discriminant. gcc/ada/ * accessibility.ads (Needs_Result_Accessibility_Extra_Formal): New subprogram.

[COMMITTED] ada: Remove redundant guard against an empty list of interfaces

2023-09-05 Thread Marc Poulhiès via Gcc-patches
From: Piotr Trojanek Code cleanup; semantics is unaffected. gcc/ada/ * sem_type.adb (Iface_Present_In_Ancestor): Remove guard for empty list of interfaces; the following loop will work just fine without it. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/sem_t

[COMMITTED] ada: Fix internal error on instantiation with private component type

2023-09-05 Thread Marc Poulhiès via Gcc-patches
From: Eric Botcazou First, this fixes an internal error on the instantiation of a nested generic package taking an array type whose component type is a private type declared in the parent package as formal type parameter. In the body of the instance, the full view of the private type is visible a

[COMMITTED] ada: Remove TBC comment, no more needed

2023-09-05 Thread Marc Poulhiès via Gcc-patches
From: Liaiss Merzougue gcc/ada/ * libgnat/s-imguti.adb: Remove comment. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/libgnat/s-imguti.adb | 1 - 1 file changed, 1 deletion(-) diff --git a/gcc/ada/libgnat/s-imguti.adb b/gcc/ada/libgnat/s-imguti.adb index 2e69e630c8a

[COMMITTED] ada: Fix DWARF for certain arrays

2023-09-05 Thread Marc Poulhiès via Gcc-patches
From: Tom Tromey An array whose index type is a nonstandard enum will be marked as "packed", but should not emit DW_AT_bit_stride unless it is also bit-packed. gcc/ada/ * gcc-interface/decl.cc (gnat_to_gnu_entity): Set bit-packed for constrained and unconstrained array types.

[COMMITTED] ada: Add guard before querying the type for its interfaces

2023-09-05 Thread Marc Poulhiès via Gcc-patches
From: Piotr Trojanek Fix crash on illegal code, when routine Iface_Present_In_Ancestor is called on the predefined String type and attempts to examine the list of interfaces. gcc/ada/ * sem_type.adb (Iface_Present_In_Ancestor): Only look at the list of interfaces for types that

[COMMITTED] ada: Preserve capability validity in address arithmetic

2023-09-05 Thread Marc Poulhiès via Gcc-patches
From: Daniel King On CHERI targets where System.Address is a capability, arithmetic on addresses should avoid converting to integers and instead use the operations defined in System.Storage_Elements to perform the arithmetic directly on the System.Address object. This preserves the capability's v

[COMMITTED] ada: Fix problematic secondary stack management in protected entry

2023-09-05 Thread Marc Poulhiès via Gcc-patches
From: Eric Botcazou The secondary stack mark goes formally out of scope before the finalizer reads it to reclaim the storage. gcc/ada/ * exp_ch9.adb (Build_Protected_Entry): Move the At_End procedure from the entry body to the inner block statement. Tested on x86_64-pc-linux-gn

[COMMITTED] ada: Remove redundant protection against empty list

2023-09-05 Thread Marc Poulhiès via Gcc-patches
From: Piotr Trojanek Calls to First on No_List intentionally return Empty, so explicit guards against No_List are unnecessary. Code cleanup; semantics is unaffected. gcc/ada/ * sem_type.adb (Interface_Present_In_Ancestor): Remove guard against no list of interfaces; fix style in

[COMMITTED] ada: building_executable_programs_with_gnat.rst: fix -gnatw.x index

2023-09-05 Thread Marc Poulhiès via Gcc-patches
From: Ghjuvan Lacambre The index for this paragraph was wrong. gcc/ada/ * doc/gnat_ugn/building_executable_programs_with_gnat.rst: Fix index. * gnat_ugn.texi: Regenerate. Tested on x86_64-pc-linux-gnu, committed on master. --- .../doc/gnat_ugn/building_executable_prog

[COMMITTED] ada: Support setting task affinity on QNX

2023-09-05 Thread Marc Poulhiès via Gcc-patches
From: Johannes Kliemann QNX does not support setting the thread affinity via a POSIX API. This implementation uses QNX's native Thread_Ctl API to set the thread affinity for Ada tasks. gcc/ada/ * libgnarl/s-taprop__qnx.adb: Implement Set_Task_Affinity. Tested on x86_64-pc-linux-gnu, co

Re: [PATCH v1] RISC-V: Support FP SGNJ autovec for VLS mode

2023-09-05 Thread juzhe.zh...@rivai.ai
LGTM juzhe.zh...@rivai.ai From: pan2.li Date: 2023-09-05 18:32 To: gcc-patches CC: juzhe.zhong; pan2.li; yanzhang.wang; kito.cheng Subject: [PATCH v1] RISC-V: Support FP SGNJ autovec for VLS mode From: Pan Li This patch would like to allow the VLS mode autovec for the floating-point binary

[COMMITTED] ada: Fix spurious warning emissions

2023-09-05 Thread Marc Poulhiès via Gcc-patches
From: Ronan Desplanques Before this patch, warnings handled by `Sem_Warn.Check_References` were erroneously emitted in some cases. Here is an example of a program that, when compiled with the `-gnatwu` switch, triggered the bug: procedure Main is package T is A : Integer;

[COMMITTED] ada: Elide the copy in extended returns for nonlimited by-reference types

2023-09-05 Thread Marc Poulhiès via Gcc-patches
From: Eric Botcazou gcc/ada/ * gcc-interface/trans.cc (gnat_to_gnu): Really test Storage_Pool on the simple return statement. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/gcc-interface/trans.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --gi

Re: [PING][PATCH] LoongArch: initial ada support on linux

2023-09-05 Thread Marc Poulhiès via Gcc-patches
Yujie Yang writes: > Hi Marc, > > Thank you for the review! > > We added -gnatea and -gnatez to CC1_SPECS for correct multilib handling, > and I believe this is currently specific to LoongArch. > > LoongArch relies on the GCC driver (via self_specs rules) to generate a > canonicalized tuple of p

Re:[pushed] [PATCH v6 0/4] Add Loongson SX/ASX instruction support to LoongArch target.

2023-09-05 Thread chenglulu
Pushed to r14-3700. 在 2023/8/31 下午5:08, Chenghui Pan 写道: This is an update of: https://gcc.gnu.org/pipermail/gcc-patches/2023-August/628303.html Changes since last version of patch set: - "dg-skip-if"-related Changes of the g++.dg/torture/vshuf* testcases are reverted. (Replaced by __builti

Re: [PATCH v2] RISC-V: Optimize the MASK opt generation

2023-09-05 Thread Kito Cheng via Gcc-patches
Hi Feng: Thanks for the simplification, that reduces the effort of adding a new extension! Functional part looks good, but I think we may document that new syntax at gcc/gcc/doc/options.texi On Thu, Aug 31, 2023 at 11:32 AM Feng Wang wrote: > > This patch rebases the change of "[PATCH] RISC-V: O

Re: [PATCH v3 1/4] LoongArch: improved target configuration interface

2023-09-05 Thread Xi Ruoyao via Gcc-patches
On Thu, 2023-08-31 at 20:48 +0800, Yang Yujie wrote: >  /* Note: optimize_size may vary across functions, >     while -m[no]-memcpy imposes a global constraint.  */ >  #define TARGET_DO_OPTIMIZE_BLOCK_MOVE_P  > loongarch_do_optimize_block_move_p() >   > -#ifndef HAVE_AS_EXPLICIT_RELOCS > -#define H

Re: [PATCH] analyzer: Move gcc.dg/analyzer tests to c-c++-common (2) [PR96395]

2023-09-05 Thread David Malcolm via Gcc-patches
On Mon, 2023-09-04 at 20:00 +0200, priour...@gmail.com wrote: > Hi, > > The second patch of this serie. > Regstrapped on x86_64-linux-gnu off trunk > a7d052b3200c7928d903a0242b8cfd75d131e374. Thanks for the patch. Overall, looks like great work, but there are a few nitpicks to be fixed, see b

Re: [PATCH v3 1/4] LoongArch: improved target configuration interface

2023-09-05 Thread chenglulu
在 2023/9/5 下午7:51, Xi Ruoyao 写道: On Thu, 2023-08-31 at 20:48 +0800, Yang Yujie wrote:  /* Note: optimize_size may vary across functions,     while -m[no]-memcpy imposes a global constraint.  */  #define TARGET_DO_OPTIMIZE_BLOCK_MOVE_P loongarch_do_optimize_block_move_p() -#ifndef HAVE_AS

Re: [PATCH 2/2] [RISC-V] Enalble zcmp for -Os

2023-09-05 Thread Kito Cheng via Gcc-patches
> @@ -5569,7 +5571,9 @@ riscv_avoid_multi_push (const struct riscv_frame_info > *frame) > { >if (!TARGET_ZCMP || crtl->calls_eh_return || frame_pointer_needed >|| cfun->machine->interrupt_handler_p || cfun->machine->varargs_size > != 0 > - || crtl->args.pretend_args_size != 0 ||

[PATCH v2] RISC-V: Fix Zicond ICE on large constants

2023-09-05 Thread Tsukasa OI via Gcc-patches
From: Tsukasa OI Large constant cons and/or alt will trigger ICEs building GCC target libraries (libgomp and libatomic) when the 'Zicond' extension is enabled. For instance, zicond-ice-2.c (new test case in this commit) will cause an ICE when SOME_NUMBER is 0x1000 or larger. While opposite numb

[PATCH v3 0/1] RISC-V: Add support for 'XVentanaCondOps' reusing 'Zicond' support

2023-09-05 Thread Tsukasa OI via Gcc-patches
PATCH v1: PATCH v2: Changes: v1 -> v2 * Removed bogus opt2 pattern as pointed out in:

[PATCH v3 1/1] RISC-V: Add support for 'XVentanaCondOps' reusing 'Zicond' support

2023-09-05 Thread Tsukasa OI via Gcc-patches
From: Tsukasa OI 'XVentanaCondOps' is a vendor extension from Ventana Micro Systems containing two instructions for conditional move and will be supported on their Veyron V1 CPU. And most notably (for historical reasons), 'XVentanaCondOps' and the standard 'Zicond' extension are functionally equ

RE: [PATCH v1] RISC-V: Support FP SGNJ autovec for VLS mode

2023-09-05 Thread Li, Pan2 via Gcc-patches
Committed, thanks Juzhe. Pan From: juzhe.zh...@rivai.ai Sent: Tuesday, September 5, 2023 7:14 PM To: Li, Pan2 ; gcc-patches Cc: Li, Pan2 ; Wang, Yanzhang ; kito.cheng Subject: Re: [PATCH v1] RISC-V: Support FP SGNJ autovec for VLS mode LGTM juzhe.zh...@rivai

Re: [PATCH] RISC-V: Emit .note.GNU-stack for non-linux target as well

2023-09-05 Thread Kito Cheng via Gcc-patches
committed, thanks :) On Tue, Sep 5, 2023 at 3:18 PM Jeff Law via Gcc-patches wrote: > > > > On 8/31/23 03:05, Kito Cheng wrote: > > We only emit that on linux target before, that not problem before, > > however Qemu has fix a bug to make qemu user mode honor PT_GNU_STACK[1], > > that will cause p

Re: [PATCH v3 1/4] LoongArch: improved target configuration interface

2023-09-05 Thread Xi Ruoyao via Gcc-patches
On Tue, 2023-09-05 at 20:01 +0800, chenglulu wrote: > > 在 2023/9/5 下午7:51, Xi Ruoyao 写道: > > On Thu, 2023-08-31 at 20:48 +0800, Yang Yujie wrote: > > >   /* Note: optimize_size may vary across functions, > > > while -m[no]-memcpy imposes a global constraint.  */ > > >   #define TARGET_DO_OPTI

testsuite: Port 'check-function-bodies' to nvptx (was: Add dg test for matching function bodies)

2023-09-05 Thread Thomas Schwinge
Hi! On 2023-09-04T23:05:05+0200, I wrote: > On 2019-07-16T15:04:49+0100, Richard Sandiford > wrote: >> This patch therefore adds a new check-function-bodies dg-final test >> The regexps in parse_function_bodies are fairly general, but might >> still need to be extended in future for targets lik

Re: [PATCH v3 1/4] LoongArch: improved target configuration interface

2023-09-05 Thread chenglulu
在 2023/9/5 下午8:17, Xi Ruoyao 写道: On Tue, 2023-09-05 at 20:01 +0800, chenglulu wrote: 在 2023/9/5 下午7:51, Xi Ruoyao 写道: On Thu, 2023-08-31 at 20:48 +0800, Yang Yujie wrote:   /* Note: optimize_size may vary across functions, while -m[no]-memcpy imposes a global constraint.  */   #defin

Re: [PATCH V2] Emit funcall external declarations only if actually used.

2023-09-05 Thread Jose E. Marchesi via Gcc-patches
ping^ > ping > >> [Differences from V1: >> - Prototype for call_from_call_insn moved before comment block. >> - Reuse the `call' flag for SYMBOL_REF_LIBCALL. >> - Fallback to check REG_CALL_DECL in non-direct calls. >> - New test to check correct behavior for non-direct calls.] >> >> There are m

Re: [PATCH v3 1/4] LoongArch: improved target configuration interface

2023-09-05 Thread Xi Ruoyao via Gcc-patches
On Thu, 2023-08-31 at 20:48 +0800, Yang Yujie wrote: > * Support options for LoongArch SIMD extensions: >   new configure options --with-simd={none,lsx,lasx}; >   new compiler option -msimd={none,lsx,lasx}; >   new driver options -m[no]-l[a]sx. Hmm... In my build (a cross compiler configured with

[PATCH] c: Don't pedwarn on _FloatN{,x} or {f,F}N{,x} suffixes for C2X

2023-09-05 Thread Jakub Jelinek via Gcc-patches
Hi! Now that _Float{16,32,64,128,32x,64x,128x} and {f,F}{16,32,64,128,32x,64x,128x} literal suffixes are in C23 standard, I think it is undesirable to pedwarn about these for -std=c2x, so this patch uses pedwarn_c11 instead. In c-family/, we don't have that function and am not sure it would be ve

Re: [PATCH] c++, v2: Diagnose [basic.scope.block]/2 violations even for block externs [PR52953]

2023-09-05 Thread Jason Merrill via Gcc-patches
On 9/1/23 09:34, Jakub Jelinek wrote: On Thu, Aug 31, 2023 at 05:46:28PM -0400, Jason Merrill wrote: I've suggested this to Core. Thanks. So, I'm not really sure what to do. Intuitively the patch seems right because even block externs redeclare stuff and change meaning of the identifiers an

Re: [PATCH] c++, v2: Diagnose [basic.scope.block]/2 violations even in compound-stmt of function-try-block [PR52953]

2023-09-05 Thread Jason Merrill via Gcc-patches
On 9/1/23 09:24, Jakub Jelinek wrote: On Thu, Aug 31, 2023 at 03:52:22PM -0400, Jason Merrill wrote: On 8/31/23 03:20, Jakub Jelinek wrote: As the following testcase shows, while check_local_shadow diagnoses most of the [basic.scope.block]/2 violations, it doesn't diagnose when parameter's name

Re: testsuite: Port 'check-function-bodies' to nvptx

2023-09-05 Thread Richard Sandiford via Gcc-patches
Thomas Schwinge writes: > Hi! > > On 2023-09-04T23:05:05+0200, I wrote: >> On 2019-07-16T15:04:49+0100, Richard Sandiford >> wrote: >>> This patch therefore adds a new check-function-bodies dg-final test > >>> The regexps in parse_function_bodies are fairly general, but might >>> still need to b

Re: [PATCH 01/11] aarch64: AARCH64_ISA_RCPC was defined twice

2023-09-05 Thread Richard Sandiford via Gcc-patches
Szabolcs Nagy writes: > gcc/ChangeLog: > > * config/aarch64/aarch64.h (AARCH64_ISA_RCPC): Remove dup. OK, thanks. Richard > --- > gcc/config/aarch64/aarch64.h | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/gcc/config/aarch64/aarch64.h b/gcc/config/aarch64/aarch64.h > index 2b0fc

Re: [PATCH 04/11] aarch64: Do not force a stack frame for EH returns

2023-09-05 Thread Richard Sandiford via Gcc-patches
Szabolcs Nagy writes: > EH returns no longer rely on clobbering the return address on the stack > so forcing a stack frame is not necessary. > > This does not actually change the code gen for the unwinder since there > are calls before the EH return. > > gcc/ChangeLog: > > * config/aarch64/a

[Patch] contrib/gcc-changelog: Check whether revert-commit exists

2023-09-05 Thread Tobias Burnus
That's based on the fail https://gcc.gnu.org/pipermail/gccadmin/2023q3/020349.html and on the discussion on IRC. The problem in for the cron job was that r14-3661-g084a7cf9fb2d9cb98dfbe7d91602c840ec50b002 referenced a commit that did not exist. This was temporarily fixed by Jakub, but it makes

Re: [PATCH 05/11] aarch64: Add eh_return compile tests

2023-09-05 Thread Richard Sandiford via Gcc-patches
Szabolcs Nagy writes: > gcc/testsuite/ChangeLog: > > * gcc.target/aarch64/eh_return-2.c: New test. > * gcc.target/aarch64/eh_return-3.c: New test. OK. I wonder if it's worth using check-function-bodies for -3.c though. It would then be easy to verify that the autiasp only occurs on t

Re: [Patch] contrib/gcc-changelog: Check whether revert-commit exists

2023-09-05 Thread Tobias Burnus
Attached an old patch. See attached patch for the current one. Difference is one line: the warning that is shown in the example output below. On 05.09.23 16:37, Tobias Burnus wrote: That's based on the fail https://gcc.gnu.org/pipermail/gccadmin/2023q3/020349.html and on the discussion on IRC.

Re: [PATCH] c++: Move consteval folding to cp_fold_r

2023-09-05 Thread Jason Merrill via Gcc-patches
On 9/1/23 13:23, Marek Polacek wrote: Bootstrapped/regtested on x86_64-pc-linux-gnu, ok for trunk? -- >8 -- In the review of P2564: it turned out that in order to correctly handle an example in the paper, we should stop doing i

[committed] OpenMP: Avoid ICE in c_parser_omp_clause_allocate with invalid expr

2023-09-05 Thread Tobias Burnus
I encountered an ICE when playing around. As allocate clauses are a bit separate from the allocate directive, I decided to fix it separately. Note: The check also handles alignment expression (no testcases) and C++ already checked for error_mark_node, i.e. it wasn't affected. Committed as Rev. r

Re: [PATCH 06/11] aarch64: Fix pac-ret eh_return tests

2023-09-05 Thread Richard Sandiford via Gcc-patches
Szabolcs Nagy writes: > This is needed since eh_return no longer prevents pac-ret in the > normal return path. > > gcc/testsuite/ChangeLog: > > * gcc.target/aarch64/return_address_sign_1.c: Move func4 to ... > * gcc.target/aarch64/return_address_sign_2.c: ... here and fix the > s

Re: [PATCH 07/11] aarch64: Disable branch-protection for pcs tests

2023-09-05 Thread Richard Sandiford via Gcc-patches
Szabolcs Nagy writes: > The tests manipulate the return address in abitest-2.h and thus not > compatible with -mbranch-protection=pac-ret+leaf or > -mbranch-protection=gcs. > > gcc/testsuite/ChangeLog: > > * gcc.target/aarch64/aapcs64/func-ret-1.c: Disable branch-protection. > * gcc.ta

Re: [PATCH] c++: improve verify_constant diagnostic [PR91483]

2023-09-05 Thread Jason Merrill via Gcc-patches
On 9/1/23 20:00, Marek Polacek wrote: Bootstrapped/regtested on x86_64-pc-linux-gnu, ok for trunk? -- >8 -- When verify_constant complains, it's pretty terse. Consider void test () { constexpr int i = 42; constexpr const int *p = &i; } where it says "'& i' is not a constan

Re: [PATCH 10/11] aarch64: Fix branch-protection error message tests

2023-09-05 Thread Richard Sandiford via Gcc-patches
Szabolcs Nagy writes: > Update tests for the new branch-protection parser errors. > > gcc/testsuite/ChangeLog: > > * gcc.target/aarch64/branch-protection-attr.c: Update. > * gcc.target/aarch64/branch-protection-option.c: Update. OK, thanks. (And I agree these are better messages. :))

[Committed] RISC-V: zicond: Fix opt2 pattern

2023-09-05 Thread Vineet Gupta
Fixes: 1d5bc3285e8a ("[committed][RISC-V] Fix 20010221-1.c with zicond") This was tripping up gcc.c-torture/execute/pr60003.c at -O1 since in failing case, pattern semantics were not matching with asm czero.nez We start with the following src code snippet: if (a == 0) return 0;

Re: [Patch] contrib/gcc-changelog: Check whether revert-commit exists

2023-09-05 Thread Arsen Arsenović via Gcc-patches
Tobias Burnus writes: > Attached an old patch. See attached patch for the current one. > > Difference is one line: the warning that is shown in the example output > below. Python-wise, the changes seem fine. Unsure if it does the right thing, though, since I'm not familiar with the full script

[PATCH] riscv: xtheadbb: Enable constant synthesis with th.srri

2023-09-05 Thread Christoph Muellner
From: Christoph Müllner Some constants can be built up using rotate-right instructions. The code that enables this can be found in riscv_build_integer_1(). However, this functionality is only available for Zbb, which includes the rori instruction. This patch enables this also for XTheadBb, which

Re: [PATCH] riscv: xtheadbb: Enable constant synthesis with th.srri

2023-09-05 Thread Jeff Law via Gcc-patches
On 9/5/23 09:42, Christoph Muellner wrote: From: Christoph Müllner Some constants can be built up using rotate-right instructions. The code that enables this can be found in riscv_build_integer_1(). However, this functionality is only available for Zbb, which includes the rori instruction.

Re: [PATCH] riscv: xtheadbb: Enable constant synthesis with th.srri

2023-09-05 Thread Philipp Tomsich
Applied to master. Thanks! Philipp. On Tue, 5 Sept 2023 at 18:10, Jeff Law wrote: > > > On 9/5/23 09:42, Christoph Muellner wrote: > > From: Christoph Müllner > > > > Some constants can be built up using rotate-right instructions. > > The code that enables this can be found in riscv_build_integ

Re: [Committed] Add Types to Un-Typed Pic Instructions:

2023-09-05 Thread Edwin Lu
On 9/1/2023 6:15 AM, Jeff Law wrote: On 8/31/23 17:01, Edwin Lu wrote: Related Discussion: https://inbox.sourceware.org/gcc-patches/12fb5088-3f28-0a69-de1e-f387371a5...@gmail.com/ This patch updates the pic instructions to ensure that no insn is left without a type attribute. Tested for

Re: [Committed] RISC-V: Add Types to Un-Typed Risc-v Instructions:

2023-09-05 Thread Edwin Lu
On 9/1/2023 11:02 AM, Jeff Law wrote: On 8/31/23 11:32, Edwin Lu wrote: Related Discussion: https://inbox.sourceware.org/gcc-patches/12fb5088-3f28-0a69-de1e-f387371a5...@gmail.com/ This patch updates the riscv instructions to ensure that no insn is left without a type attribute. Added ne

[PATCH 0/8] OpenMP: lvalue parsing and "declare mapper" support

2023-09-05 Thread Julian Brown
This series implements "lvalue" parsing for C and C++ map/to/from clauses, and "declare mapper" support for C, C++ and Fortran. This is the latter part of the series that was previously posted for mainline here: https://gcc.gnu.org/pipermail/gcc-patches/2022-December/609031.html and is approxi

[PATCH 2/8] OpenMP: lvalue parsing for map/to/from clauses (C)

2023-09-05 Thread Julian Brown
This patch adds support for parsing general lvalues ("locator list item types") for OpenMP "map", "to" and "from" clauses to the C front-end, similar to the previously-posted patch for C++. Such syntax is permitted for OpenMP 5.0 and above. It was previously posted for mainline here: https://g

[PATCH 3/8] OpenMP: C++ "declare mapper" support

2023-09-05 Thread Julian Brown
This patch adds support for OpenMP 5.0 "declare mapper" functionality for C++. This is based on the version of the patch posted for the og13 branch here: https://gcc.gnu.org/pipermail/gcc-patches/2023-June/623353.html The following follow up patches/fixes have also been incorporated into this

[PATCH 4/8] OpenMP: Support OpenMP 5.0 "declare mapper" directives for C

2023-09-05 Thread Julian Brown
This patch adds support for "declare mapper" directives (and the "mapper" modifier on "map" clauses) for C. It was previously posted for mainline here: https://gcc.gnu.org/pipermail/gcc-patches/2022-December/609041.html and for the og13 branch here: https://gcc.gnu.org/pipermail/gcc-patches

  1   2   >