[PATCH v1] RISC-V: Refactor RVV frm_mode attr for rounding mode intrinsic

2023-08-05 Thread Pan Li via Gcc-patches
From: Pan Li The frm_mode attr has some assumptions for each define insn as below. 1. The define insn has at least 9 operands. 2. The operands[9] must be frm reg. 3. The operands[9] must be const int. Actually, the frm operand can be operands[8], operands[9] or operands[10], and not all the

Re: [PATCH] Add -Wdisabled-optimization warning for not optimizing sibling calls

2023-08-05 Thread David Malcolm via Gcc-patches
On Sun, 2023-08-06 at 02:28 +0530, Prathamesh Kulkarni via Gcc-patches wrote: > On Fri, 4 Aug 2023 at 23:28, Bradley Lucier via Gcc-patches > wrote: Hi Bradley and Prathamesh... > > > > The patch at the end adds a warning when a tail/sibling call cannot > > be > > optimized for various

Re: [PATCH] Add -Wdisabled-optimization warning for not optimizing sibling calls

2023-08-05 Thread Prathamesh Kulkarni via Gcc-patches
On Sun, 6 Aug 2023 at 03:07, Bradley Lucier wrote: > > On 8/5/23 4:58 PM, Prathamesh Kulkarni wrote: > > I don't have comments on the patch, but a new warning will also > > require a corresponding entry in doc/invoke.texi. > > Thank you for your comment. > > -Wdisabled-optimization is an

Re: [PATCH] Add -Wdisabled-optimization warning for not optimizing sibling calls

2023-08-05 Thread Bradley Lucier via Gcc-patches
On 8/5/23 4:58 PM, Prathamesh Kulkarni wrote: I don't have comments on the patch, but a new warning will also require a corresponding entry in doc/invoke.texi. Thank you for your comment. -Wdisabled-optimization is an established warning, it's just that I'd like it to apply in another

Re: [PATCH] Add -Wdisabled-optimization warning for not optimizing sibling calls

2023-08-05 Thread Prathamesh Kulkarni via Gcc-patches
On Fri, 4 Aug 2023 at 23:28, Bradley Lucier via Gcc-patches wrote: > > The patch at the end adds a warning when a tail/sibling call cannot be > optimized for various reasons. > > I built and tested GCC with and without the patch with configuration > > Configured with: ../../gcc-mainline/configure

[PATCH] MATCH: Extend min_value/max_value to pointer types

2023-08-05 Thread Andrew Pinski via Gcc-patches
Since we already had the infrastructure to optimize `(x == 0) && (x > y)` to false for integer types, this extends the same to pointer types as indirectly requested by PR 96695. OK? Bootstrapped and tested on x86_64-linux-gnu with no regressions. gcc/ChangeLog: PR

[C PATCH] Support typename as selector in _Generic

2023-08-05 Thread Martin Uecker via Gcc-patches
Clang now has an extension which accepts a typename for _Generic. This is simple to implement and is useful. Do we want this? Clang calls it a "Clang extension" in the pedantic warning. I changed it to "an extension" I am not sure what the policy is. Do we need an extra warning option?

[committed] c: Less warnings for parameters declared as arrays [PR98536]

2023-08-05 Thread Martin Uecker via Gcc-patches
I splitted up the patch into two parts and committed only the FE parts which were already approved and the tests. This solves one of the two issues. Bootstrapped and regression tested on x86_64-pc-linux-gnu. Less warnings for parameters declared as arrays [PR98536] To avoid false

[no subject]

2023-08-05 Thread xeon khjj via Gcc-patches
>From 104178c3912314f41a61a316e7c3bc0487ea8f3c Mon Sep 17 00:00:00 2001 From: K1ZeKaTo Date: Sat, 5 Aug 2023 14:50:19 + Subject: [PATCH] Make the rvalue work fine. It seems not considering the rvalue in the last version. --- libstdc++-v3/include/bits/iterator_concepts.h | 16

Re: [committed] [RISC-V] Avoid sub-word mode comparisons with Zicond

2023-08-05 Thread Jeff Law
On 8/5/23 01:46, Xiao Zeng wrote: The operands to the comparison need to be in DImode for rv64 and SImode for rv32.  That's the X iterator. After analyzing the rtl log, I can't agree more with this sentence. Note the mode of the comparison operands may be different than the mode of the

Re: [PATCH] core: Support heap-based trampolines

2023-08-05 Thread FX Coudert via Gcc-patches
Hi Richard, Thanks for your feedback. Here is an amended version of the patch, taking into consideration your requests and the following discussion. There is no configure option for the libgcc part, and the documentation is amended. The patch is split into three commits for core, target and

Re: [RFC] light expander sra for parameters and returns

2023-08-05 Thread Jiufu Guo via Gcc-patches
Hi, Richard Biener writes: > On Thu, 3 Aug 2023, Jiufu Guo wrote: > >> >> Hi Richard, >> >> Richard Biener writes: >> >> > On Tue, 1 Aug 2023, Jiufu Guo wrote: >> > >> >> >> >> Hi, >> >> >> >> Richard Biener writes: >> >> >> >> > On Mon, 24 Jul 2023, Jiufu Guo wrote: >> >> > >> >> >>

Re: Re: [PATCH v3] [RISC-V] Generate Zicond instruction for select pattern with condition eq or neq to 0

2023-08-05 Thread Xiao Zeng
On Sat, Aug 05, 2023 at 05:31:00 AM  Jeff Law wrote: > >On 8/1/23 19:38, Xiao Zeng wrote: >> This patch recognizes Zicond patterns when the select pattern >> with condition eq or neq to 0 (using eq as an example), namely: >> >> 1 rd = (rs2 == 0) ? non-imm : 0 >> 2 rd = (rs2 == 0) ? non-imm :

Re: RISC-V: Folding memory for FP + constant case

2023-08-05 Thread Manolis Tsamis
Hi Jeff, Thanks for all the info! Then I'll prepare/test a patch that removes this regcprop limitation and send it out. I have already tested that this change is enough to make fmo optimize leela as well. Manolis On Fri, Aug 4, 2023 at 7:23 PM Jeff Law wrote: > > > > On 8/4/23 03:52, Manolis

Re: [committed] [RISC-V] Avoid sub-word mode comparisons with Zicond

2023-08-05 Thread Xiao Zeng
On Wed, Aug 02, 2023 at 01:41:00 PM  Jeff Law wrote: > >c-torture/execute/pr59014-2.c fails with the Zicond work on rv64.  We >miscompile the "foo" routine because we have eliminated a required sign >extension. > >The key routine looks like this: > >foo (long long int x, long long int y) >{ >