[COMMITTED] Use delete[] in int_range destructor [PR109920]

2023-05-22 Thread Aldy Hernandez via Gcc-patches
gcc/ChangeLog: PR tree-optimization/109920 * value-range.h (RESIZABLE>::~int_range): Use delete[]. --- gcc/value-range.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/value-range.h b/gcc/value-range.h index 171e6426c6e..936eb175062 100644 --- a/gcc/value-

[wwwdocs, committed] projects/gomp: Link to GCC 13 impl. status as well

2023-05-22 Thread Tobias Burnus
The main purpose of this commit was to trigger an update of the webpage as permission issues did not update it yesterday. Well, it only succeeded partially - the attached commits are now visible, but yesterday's changed by Jakub and me don't. Tobias - Siemens Electronic Design Au

Re: [C PATCH v3] Fix ICEs related to VM types in C 2/2

2023-05-22 Thread Martin Uecker via Gcc-patches
Am Dienstag, dem 23.05.2023 um 08:13 +0200 schrieb Richard Biener: > On Mon, May 22, 2023 at 7:24 PM Martin Uecker via Gcc-patches > wrote: > > > > > > > > This version contains the middle-end changes for PR109450 > > and test cases as before. The main middle-end change is that > > we use gimp

Re: [PATCH 2/2] vect: Enhance cost evaluation in vect_transform_slp_perm_load_1

2023-05-22 Thread Richard Biener via Gcc-patches
On Tue, May 23, 2023 at 5:01 AM Kewen.Lin wrote: > > Hi Richi, > > Thanks for the review! > > on 2023/5/22 21:44, Richard Biener wrote: > > On Wed, May 17, 2023 at 8:15 AM Kewen.Lin wrote: > >> > >> Hi, > >> > >> Following Richi's suggestion in [1], I'm working on deferring > >> cost evaluation n

Re: [C PATCH v3] Fix ICEs related to VM types in C 2/2

2023-05-22 Thread Richard Biener via Gcc-patches
On Mon, May 22, 2023 at 7:24 PM Martin Uecker via Gcc-patches wrote: > > > > This version contains the middle-end changes for PR109450 > and test cases as before. The main middle-end change is that > we use gimplify_type_sizes also for parameters and remove > the special code that also walked int

[PATCH] RISC-V: Refactor the framework of RVV auto-vectorization

2023-05-22 Thread juzhe . zhong
From: Juzhe-Zhong This patch is to refactor the framework of RVV auto-vectorization. Since we find out are keep adding helpers && wrappers when implementing auto-vectorization. It will make the RVV auto-vectorizaiton very messy. After double check my downstream RVV GCC, assemble all auto-vector

Re: [PATCH 1/2] Improve do_store_flag for single bit comparison against 0

2023-05-22 Thread Richard Biener via Gcc-patches
On Mon, May 22, 2023 at 5:21 PM Andrew Pinski wrote: > > On Mon, May 22, 2023 at 4:56 AM Richard Biener via Gcc-patches > wrote: > > > > On Fri, May 19, 2023 at 4:15 AM Andrew Pinski via Gcc-patches > > wrote: > > > > > > While working something else, I noticed we could improve > > > the followi

Re: [PATCH] c-family: implement -ffp-contract=on

2023-05-22 Thread Richard Biener via Gcc-patches
On Mon, May 22, 2023 at 5:16 PM Alexander Monakov wrote: > > > On Mon, 22 May 2023, Richard Biener wrote: > > > On Thu, May 18, 2023 at 11:04 PM Alexander Monakov via Gcc-patches > > wrote: > > > > > > Implement -ffp-contract=on for C and C++ without changing default > > > behavior (=off for -std

[PATCH v2] xtensa: Optimize '(x & CST1_POW2) != 0 ? CST2_POW2 : 0'

2023-05-22 Thread Takayuki 'January June' Suwa via Gcc-patches
On 2023/05/23 11:27, Max Filippov wrote: > Hi Suwa-san, Hi! > This change introduces a bunch of test failures on big endian configuration. > I believe that's because the starting bit position for zero_extract is counted > from different ends depending on the endianness. Oops, what a stupid mista

Re: [PATCH v2] rs6000: Add buildin for mffscrn instructions

2023-05-22 Thread Kewen.Lin via Gcc-patches
on 2023/5/23 01:31, Carl Love wrote: > On Mon, 2023-05-22 at 14:36 +0800, Kewen.Lin wrote: >> Hi Carl, >> >> on 2023/5/19 05:12, Carl Love via Gcc-patches wrote: >>> GCC maintainers: >>> >>> version 2. Fixed an issue with the test case. The dg-options line >>> was >>> missing. >>> >>> The followi

[PATCH] RISC-V: Add the option "-mdisable-multilib-check" to avoid multilib checks breaking the compilation.

2023-05-22 Thread Jin Ma via Gcc-patches
When testing a extension, it is often necessary for a certain program not to need some kind of extension, such as the bitmanip extension, to evaluate the performance or codesize of the extension. However, the current multilib rules will report an error when it is not a superset of the MULTILIB_REQU

Re: [PATCH] RISC-V: Add missing torture-init and torture-finish for rvv.exp

2023-05-22 Thread Vineet Gupta
On 5/22/23 02:17, Kito Cheng wrote: Ooops, seems still some issue around here, Yep still 5000 fails :-( but I found something might related this issue: https://github.com/gcc-mirror/gcc/commit/d6654a4be3ba44c0d57be7c8a51d76d9721345e1 https://github.com/gcc-mirror/gcc/commit/23c49bb8d09bc3b

Re: [PATCH] rs6000: Fix __builtin_vec_xst_trunc definition

2023-05-22 Thread Kewen.Lin via Gcc-patches
on 2023/5/23 03:50, Carl Love wrote: > On Mon, 2023-05-22 at 17:04 +0800, Kewen.Lin wrote: >> Hi Carl, >> >> on 2023/5/11 02:06, Carl Love via Gcc-patches wrote: >>> GCC maintainers: >>> >>> The following patch fixes errors in the arguments in the >>> __builtin_altivec_tr_stxvrhx, __builtin_a

Re: [PATCH 2/2] vect: Enhance cost evaluation in vect_transform_slp_perm_load_1

2023-05-22 Thread Kewen.Lin via Gcc-patches
Hi Richi, Thanks for the review! on 2023/5/22 21:44, Richard Biener wrote: > On Wed, May 17, 2023 at 8:15 AM Kewen.Lin wrote: >> >> Hi, >> >> Following Richi's suggestion in [1], I'm working on deferring >> cost evaluation next to the transformation, this patch is >> to enhance function vect_tra

Re: [PATCH v4] libgfortran: Replace mutex with rwlock

2023-05-22 Thread Zhu, Lipeng via Gcc-patches
On 5/16/2023 3:08 PM, Zhu, Lipeng wrote: On 5/9/2023 10:32 AM, Zhu, Lipeng wrote: On 1/1/1970 8:00 AM, Bernhard Reutner-Fischer wrote: On Mon,  8 May 2023 17:44:43 +0800 Lipeng Zhu wrote: This patch try to introduce the rwlock and split the read/write to unit_root tree and unit_cache

Re: [PATCH 1/2] xtensa: Optimize '(x & CST1_POW2) != 0 ? CST2_POW2 : 0'

2023-05-22 Thread Andrew Pinski via Gcc-patches
On Mon, May 22, 2023 at 7:28 PM Max Filippov via Gcc-patches wrote: > > Hi Suwa-san, > > On Mon, May 22, 2023 at 12:06 AM Takayuki 'January June' Suwa > wrote: > > > > This patch decreses one machine instruction from "single bit extraction > > with shifting" operation, and tries to eliminate the

Re: [PATCH] Fold _mm{,256,512}_abs_{epi8,epi16,epi32,epi64} into gimple ABS_EXPR.

2023-05-22 Thread Hongtao Liu via Gcc-patches
On Mon, May 22, 2023 at 3:35 PM liuhongt wrote: > > Also for 64-bit vector abs intrinsics _mm_abs_{pi8,pi16,pi32}. > > Bootstrapped and regtested on x86_64-pc-linux-gnu{-m32,}. > Ok for trunk? Ready push to main trunk. > > gcc/ChangeLog: > > PR target/109900 > * config/i386/i386.cc

Re: [PATCH 1/2] xtensa: Optimize '(x & CST1_POW2) != 0 ? CST2_POW2 : 0'

2023-05-22 Thread Max Filippov via Gcc-patches
Hi Suwa-san, On Mon, May 22, 2023 at 12:06 AM Takayuki 'January June' Suwa wrote: > > This patch decreses one machine instruction from "single bit extraction > with shifting" operation, and tries to eliminate the conditional > branch if CST2_POW2 doesn't fit into signed 12 bits with the help > of

[patch] mcore: Fix sprintf length warning

2023-05-22 Thread Jan-Benedict Glaw
Hi! One of the supplied argument strings is unneccesarily long (c-sky, using basically the same code, fixed it to a shorter length) and this fixes overflow warnings, as GCC fails to deduce that the full 256 bytes for load_op[] are not used at all. make[1]: Entering directory '/var/lib/laminar/r

[pushed] libobjc: Add local macros to support encode generation [P109913].

2023-05-22 Thread Iain Sandoe via Gcc-patches
This fixes bootstrap on powerpc-darwin, and was tested there for both GNU and NeXT Objective-C testsuite. Approved in the PR by Andrew, pushed to trunk, thanks, Iain --- 8< --- r14-976-g9907413a3a6aa3 alters code to use the preferred _P-style macros rather than direct comparisons of (for example

Re: [PATCH] libstdc++: Add missing constexpr to simd

2023-05-22 Thread Marc Glisse via Gcc-patches
On Mon, 22 May 2023, Jonathan Wakely via Libstdc++ wrote: * subscripting vector builtins is not allowed in constant expressions Is that just because nobody made it work (yet)? Yes. https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101651 and others. * if the implementation would otherwise call

Re: [PATCH] Replace __gnu_cxx::__ops::__negate with std::not_fn

2023-05-22 Thread Jonathan Wakely via Gcc-patches
On Mon, 22 May 2023 at 21:51, François Dumont via Libstdc++ < libstd...@gcc.gnu.org> wrote: > I was thinking that it might be nice to get rid of predefined_ops.h > content. > > So here is a start with __negate. Drawback is that stl_algo.h has to > include . We definitely don't want that. std::no

Re: [PATCH] libstdc++: Add missing constexpr to simd

2023-05-22 Thread Jonathan Wakely via Gcc-patches
On Mon, 22 May 2023 at 21:27, Matthias Kretz wrote: > On Monday, 22 May 2023 18:25:15 CEST Jonathan Wakely wrote: > > I note that using if (not __builtin_constant_evaluated()) will fail if > > compiled with -fno-operator-names, which is why we don't use 'not', > 'and', > > etc. elsewhere in libst

[PATCH] Replace __gnu_cxx::__ops::__negate with std::not_fn

2023-05-22 Thread François Dumont via Gcc-patches
I was thinking that it might be nice to get rid of predefined_ops.h content. So here is a start with __negate. Drawback is that stl_algo.h has to include . For now I just get rid of stl_algo.h include in to rather use stl_algobase.h. But maybe it would be better to also isolate std::not_fn in

[COMMITTED] i386: Adjust emulated integer vector mode shift costs

2023-05-22 Thread Uros Bizjak via Gcc-patches
Returned integer vector mode costs of emulated instructions in ix86_shift_rotate_cost are wrong and do not reflect generated instruction sequences. Rewrite handling of different integer vector modes and different target ABIs to return real instruction counts in order to calcuate better costs of va

Re: [PATCH] libstdc++: Add missing constexpr to simd

2023-05-22 Thread Matthias Kretz via Gcc-patches
On Monday, 22 May 2023 18:25:15 CEST Jonathan Wakely wrote: > I note that using if (not __builtin_constant_evaluated()) will fail if > compiled with -fno-operator-names, which is why we don't use 'not', 'and', > etc. elsewhere in libstdc++. I don't know if (or why) anybody uses that > option though

Re: [C PATCH v3] Fix ICEs related to VM types in C 2/2

2023-05-22 Thread Joseph Myers
On Mon, 22 May 2023, Martin Uecker via Gcc-patches wrote: > +static void > +add_decl_expr(location_t loc, enum decl_context decl_context, tree type, > tree *expr) Missing space before '(', and the line should be wrapped to be no more than 80 columns. The C front-end changes are OK with those f

[PATCH ver 2] rs6000: Fix __builtin_vec_xst_trunc definition

2023-05-22 Thread Carl Love via Gcc-patches
Kewen, GCC maintainers: Version 2, addressed comments from Kewen. Added an additional overloaded builtin: void __builtin_vec_xst_trunc (vuq, signed long long, long *); The following patch fixes errors in the arguments in the __builtin_altivec_tr_stxvrhx, __builtin_altivec_tr_stxvrwx built

Re: [PATCH] rs6000: Fix __builtin_vec_xst_trunc definition

2023-05-22 Thread Carl Love via Gcc-patches
On Mon, 2023-05-22 at 17:04 +0800, Kewen.Lin wrote: > Hi Carl, > > on 2023/5/11 02:06, Carl Love via Gcc-patches wrote: > > GCC maintainers: > > > > The following patch fixes errors in the arguments in the > > __builtin_altivec_tr_stxvrhx, __builtin_altivec_tr_stxvrwx > > builtin > > defini

[PATCH] Convert remaining uses of value_range in ipa-*.cc to Value_Range.

2023-05-22 Thread Aldy Hernandez via Gcc-patches
Minor cleanups to get rid of value_range in IPA. There's only one left, but it's in the switch code which is integer specific. OK? gcc/ChangeLog: * ipa-cp.cc (decide_whether_version_node): Adjust comment. * ipa-fnsummary.cc (evaluate_conditions_for_known_args): Adjust fo

[PATCH] Implement ipa_vr hashing.

2023-05-22 Thread Aldy Hernandez via Gcc-patches
Implement hashing for ipa_vr. When all is said and done, all these patches incurr a 7.64% slowdown for ipa-cp, with is entirely covered by the similar 7% increase in this area last week. So we get type agnostic ranges with "infinite" range precision close to free. There is no change in overall c

[PATCH] Convert ipa_jump_func to use ipa_vr instead of a value_range.

2023-05-22 Thread Aldy Hernandez via Gcc-patches
This patch converts the ipa_jump_func code to use the type agnostic ipa_vr suitable for GC instead of value_range which is integer specific. I've disabled the range cacheing to simplify the patch for review, but it is handled in the next patch in the series. OK? gcc/ChangeLog: * ipa-cp.

Re: [PATCH] Convert ipcp_vr_lattice to type agnostic framework.

2023-05-22 Thread Aldy Hernandez via Gcc-patches
I've adjusted the patch with some minor cleanups that came up when I implemented the rest of the IPA revamp. Rested. OK? On Wed, May 17, 2023 at 4:31 PM Aldy Hernandez wrote: > > This converts the lattice to store ranges in Value_Range instead of > value_range (*) to make it type agnostic, and

Re: [PATCH] Provide an API for ipa_vr.

2023-05-22 Thread Aldy Hernandez via Gcc-patches
I've adjusted the patch with some minor cleanups that came up when I implemented the rest of the IPA revamp. Retested. OK? On Wed, May 17, 2023 at 4:16 PM Aldy Hernandez wrote: > > This patch encapsulates the ipa_vr internals into an API. It also > makes it type agnostic, in preparation for u

[COMMITTED] Implement some miscellaneous zero accessors for Value_Range.

2023-05-22 Thread Aldy Hernandez via Gcc-patches
This adds some missing accessors to the type agnostic Value_Range class. They'll be used in the upcoming IPA work. gcc/ChangeLog: * value-range.h (class Value_Range): Implement set_zero, set_nonzero, and nonzero_p. --- gcc/value-range.h | 3 +++ 1 file changed, 3 insertions(+)

[testsuite,committed]: PR52614: Fix more of the int=32 assumption fallout.

2023-05-22 Thread Georg-Johann Lay
Applied more of the int=32 assumption fallout. Johann -- testsuite/52641: Fix more of implicit int=32 assumption fallout. gcc/testsuite/ PR testsuite/52641 * gcc.c-torture/compile/pr108892.c: Require int32. * gcc.c-torture/compile/pr98199.c: Require int32plus. *

[PATCH v3] rs6000: Add buildin for mffscrn instructions

2023-05-22 Thread Carl Love via Gcc-patches
Kewen, Segher, GCC maintainers: Version 3, fixed various issues noted by Kewen. Retested on Power 10. No regression issues. Version 2, Fixed an issue with the test case. The dg-options line was missing. The following patch adds an overloaded builtin. There are two possible arguments for the

Re: [PATCH v2] rs6000: Add buildin for mffscrn instructions

2023-05-22 Thread Carl Love via Gcc-patches
On Mon, 2023-05-22 at 14:36 +0800, Kewen.Lin wrote: > Hi Carl, > > on 2023/5/19 05:12, Carl Love via Gcc-patches wrote: > > GCC maintainers: > > > > version 2. Fixed an issue with the test case. The dg-options line > > was > > missing. > > > > The following patch adds an overloaded builtin. T

[C PATCH v3] Fix ICEs related to VM types in C 2/2

2023-05-22 Thread Martin Uecker via Gcc-patches
This version contains the middle-end changes for PR109450 and test cases as before. The main middle-end change is that we use gimplify_type_sizes also for parameters and remove the special code that also walked into pointers (which is incorrect).   In addition, in the C FE this patch now also

[C PATCH v3] Fix ICEs related to VM types in C 1/2

2023-05-22 Thread Martin Uecker via Gcc-patches
Hi Joseph, I had to create another revision of the patch because of some case I had overlooked (vm-types pointed-to by parameters declared as I arrays). I splitted the patch up in two parts for easier reviewing. The first part only has the FE changes and most of the tests. The only minor chan

Re: [PATCH] libstdc++: Add missing constexpr to simd

2023-05-22 Thread Jonathan Wakely via Gcc-patches
On Mon, 22 May 2023 at 16:36, Matthias Kretz via Libstdc++ < libstd...@gcc.gnu.org> wrote: > OK for trunk and backporting? > > regtested on x86_64-linux and aarch64-linux > > The constexpr API is only available with -std=gnu++XX (and proposed for > C++26). The proposal is to have the complete simd

Re: [PATCH] add glibc-stdint.h to vax and lm32 linux target (PR target/105525)

2023-05-22 Thread Jan-Benedict Glaw
Hi Mikael! On Mon, 2023-05-22 17:25:39 +0200, Mikael Pettersson wrote: > On Mon, May 22, 2023 at 3:57 PM Jan-Benedict Glaw wrote: > > On Mon, 2023-05-22 14:10:48 +0100, Maciej W. Rozycki > > wrote: > > > On Fri, 19 May 2023, Mikael Pettersson wrote: > > > > The background is that I maintain a

[PATCH] libstdc++: Add missing constexpr to simd

2023-05-22 Thread Matthias Kretz via Gcc-patches
OK for trunk and backporting? regtested on x86_64-linux and aarch64-linux The constexpr API is only available with -std=gnu++XX (and proposed for C++26). The proposal is to have the complete simd API usable in constant expressions. This patch resolves several issues with using simd in constant e

[committed] libstdc++: Resolve -Wunused-variable warnings in stdx::simd and tests

2023-05-22 Thread Matthias Kretz via Gcc-patches
pushed to master, will backport later regtested on x86_64-linux Signed-off-by: Matthias Kretz libstdc++-v3/ChangeLog: * include/experimental/bits/simd_builtin.h (_S_fpclassify): Move __infn into #ifdef'ed block. * testsuite/experimental/simd/tests/fpclassify.cc: Declare

Re: [PATCH] add glibc-stdint.h to vax and lm32 linux target (PR target/105525)

2023-05-22 Thread Mikael Pettersson via Gcc-patches
On Mon, May 22, 2023 at 3:57 PM Jan-Benedict Glaw wrote: > > Hi! > > On Mon, 2023-05-22 14:10:48 +0100, Maciej W. Rozycki > wrote: > > On Fri, 19 May 2023, Mikael Pettersson wrote: > > > The background is that I maintain a script to build GCC-based crosses to > > > as many targets as I can, curr

Re: [PATCH 1/2] Improve do_store_flag for single bit comparison against 0

2023-05-22 Thread Andrew Pinski via Gcc-patches
On Mon, May 22, 2023 at 4:56 AM Richard Biener via Gcc-patches wrote: > > On Fri, May 19, 2023 at 4:15 AM Andrew Pinski via Gcc-patches > wrote: > > > > While working something else, I noticed we could improve > > the following function code generation: > > ``` > > unsigned f(unsigned t) > > { >

Re: [PATCH] c-family: implement -ffp-contract=on

2023-05-22 Thread Alexander Monakov via Gcc-patches
On Mon, 22 May 2023, Richard Biener wrote: > On Thu, May 18, 2023 at 11:04 PM Alexander Monakov via Gcc-patches > wrote: > > > > Implement -ffp-contract=on for C and C++ without changing default > > behavior (=off for -std=cNN, =fast for C++ and -std=gnuNN). > > The documentation changes menti

[testsuite,committed] PR testsuite/52641

2023-05-22 Thread Georg-Johann Lay
Applied more annotations to reduce testsuite fallout for 16-bit int / pointer targets. https://gcc.gnu.org/r14-1074 Most of the affected tests use constants not suitable for 16-bit int, bit-fields wider than 16 bits, etc. Johann -- commit 9f5065094c9632a50bea604d5896a139609e50cf Author: Ge

[avr,testsuite,committed] Skip test that fail for avr for this or that reason.

2023-05-22 Thread Georg-Johann Lay
This annotates some tests that won't work for AVR like: * asm goto with output reload (AVR is not lra). * Using a program address as a ram address. * Float related stuff: AVR double is 32-bit, and long double is incomplete (some functions missing, no signed zeros, etc.) Applied as obvious.

[COMMITTED] i386: Account for the memory read in V*QImode multiplication sequences

2023-05-22 Thread Uros Bizjak via Gcc-patches
Add the cost of a memory read to the cost of V*QImode vector mult sequences. gcc/ChangeLog: * config/i386/i386.cc (ix86_multiplication_cost): Add the cost of a memory read to the cost of V?QImode sequences. Bootstrapped and regression tested on x86_64-linux-gnu {,-m32}. Uros. diff --git

Re: [PATCH 0/7] openmp: OpenMP 5.1 loop transformation directives

2023-05-22 Thread Jakub Jelinek via Gcc-patches
On Wed, May 17, 2023 at 01:55:00PM +0200, Frederik Harwath wrote: > Thanks for the explanation. But actually doing this would require a > complete rewrite which would almost certainly imply that mainline GCC > would not support the loop transformations for a long time. I don't think it needs compl

RE: [PATCH] RISC-V: Add "m_" prefix for private member

2023-05-22 Thread Li, Pan2 via Gcc-patches
Committed, thanks Kito. Pan -Original Message- From: Gcc-patches On Behalf Of Kito Cheng via Gcc-patches Sent: Monday, May 22, 2023 9:49 PM To: juzhe.zh...@rivai.ai Cc: gcc-patches@gcc.gnu.org; kito.ch...@gmail.com; pal...@dabbelt.com; pal...@rivosinc.com; jeffreya...@gmail.com; rdapp.

Re: [PATCH] add glibc-stdint.h to vax and lm32 linux target (PR target/105525)

2023-05-22 Thread Jan-Benedict Glaw
Hi! On Mon, 2023-05-22 14:10:48 +0100, Maciej W. Rozycki wrote: > On Fri, 19 May 2023, Mikael Pettersson wrote: > > The background is that I maintain a script to build GCC-based crosses to > > as many targets as I can, currently it supports 78 distinct processors and > > 82 triplets (four process

Re: [PATCH] RISC-V: Add "m_" prefix for private member

2023-05-22 Thread Kito Cheng via Gcc-patches
LGTM On Mon, May 22, 2023 at 8:10 PM wrote: > > From: Juzhe-Zhong > > Since the current framework is hard to maintain and > hard to be used in the future possible auto-vectorization patterns. > > We will need to keep adding more helpers and arguments during the > auto-vectorization supporting. W

Re: [PATCH 2/2] vect: Enhance cost evaluation in vect_transform_slp_perm_load_1

2023-05-22 Thread Richard Biener via Gcc-patches
On Wed, May 17, 2023 at 8:15 AM Kewen.Lin wrote: > > Hi, > > Following Richi's suggestion in [1], I'm working on deferring > cost evaluation next to the transformation, this patch is > to enhance function vect_transform_slp_perm_load_1 which > could under-cost for vector permutation, since the cos

Re: [PATCH v2] tree-ssa-sink: Improve code sinking pass

2023-05-22 Thread Richard Biener via Gcc-patches
On Fri, May 19, 2023 at 11:43 AM Ajit Agarwal wrote: > > Hello All: > > This patch improves code sinking pass to sink statements before call to reduce > register pressure. > Review comments are incorporated. > > For example : > > void bar(); > int j; > void foo(int a, int b, int c, int d, int e, i

Re: [PATCH 1/4] Missed opportunity to use [SU]ABD

2023-05-22 Thread Richard Biener via Gcc-patches
On Thu, May 18, 2023 at 7:59 PM Richard Sandiford wrote: > > Thanks for the update. Some of these comments would have applied > to the first version, so sorry for not catching them first time. > > writes: > > From: oluade01 > > > > This adds a recognition pattern for the non-widening > > absolu

Re: [PATCH] PR gcc/98350:Handle FMA friendly in reassoc pass

2023-05-22 Thread Richard Biener via Gcc-patches
On Wed, May 17, 2023 at 3:02 PM Cui, Lili wrote: > > From: Lili Cui > > Make some changes in reassoc pass to make it more friendly to fma pass later. > Using FMA instead of mult + add reduces register pressure and insruction > retired. > > There are mainly two changes > 1. Put no-mult ops and mul

[PATCH] libiberty: On Windows pass a >32k cmdline through a response file.

2023-05-22 Thread Costas Argyris via Gcc-patches
Currently on Windows, when CreateProcess is called with a command-line that exceeds the 32k Windows limit, we get a very bad error: "CreateProcess: No such file or directory" This patch detects the case where this would happen and writes the long command-line to a temporary response file and call

Re: [PATCH 1/2] PR gcc/98350:Add a param to control the length of the chain with FMA in reassoc pass

2023-05-22 Thread Richard Biener via Gcc-patches
On Wed, May 17, 2023 at 3:05 PM Cui, Lili wrote: > > > I think to make a difference you need to hit the number of parallel > > fadd/fmul > > the pipeline can perform. I don't think issue width is ever a problem for > > chains w/o fma and throughput of fma vs fadd + fmul should be similar. > > >

Re: [PATCH] add glibc-stdint.h to vax and lm32 linux target (PR target/105525)

2023-05-22 Thread Maciej W. Rozycki
On Fri, 19 May 2023, Mikael Pettersson wrote: > > Hmm, I find it quite insteresting and indeed encouraging that someone > > actually verifies our VAX/Linux target. > > > > Mikael, how do you actually verify it however? > > My vax builds are only cross-compilers without kernel headers or libc.

Re: [PATCH 2/3] Refactor widen_plus as internal_fn

2023-05-22 Thread Richard Biener via Gcc-patches
On Thu, 18 May 2023, Andre Vieira (lists) wrote: > How about this? > > Not sure about the DEF_INTERNAL documentation I rewrote in internal-fn.def, > was struggling to word these, so improvements welcome! The even/odd variant optabs are also commutative_optab_p, so is the vec_widen_sadd without h

Re: [PATCH v1] tree-ssa-sink: Improve code sinking pass.

2023-05-22 Thread Richard Biener via Gcc-patches
On Thu, May 18, 2023 at 9:14 AM Ajit Agarwal wrote: > > Hello All: > > This patch improves code sinking pass to sink statements before call to reduce > register pressure. > Review comments are incorporated. > > Bootstrapped and regtested on powerpc64-linux-gnu. > > Thanks & Regards > Ajit > > > tr

[PATCH] libgomp: Fix build for -fshort-enums

2023-05-22 Thread Sebastian Huber
Make sure that the API enums have at least the size of int. Otherwise the following build error may occur: In file included from gcc/libgomp/env.c:34: ./libgomp_f.h: In function 'omp_check_defines': ./libgomp_f.h:77:8: error: size of array 'test' is negative 77 | char test[(28 != sizeof (omp

Re: Re: [PATCH] RISC-V: Add RVV comparison autovectorization

2023-05-22 Thread juzhe.zh...@rivai.ai
I will first send refactor patch soon. Then second send comparison patch. The refactor patch will be applicable for all future use, and they should come first since I have implemented the all RVV auto-vectorization patterns and I know what we will need in the future use. Thanks. juzhe.zh...@riv

Re: [PATCH] RISC-V: Add RVV comparison autovectorization

2023-05-22 Thread Robin Dapp via Gcc-patches
> I do refactoring since we are going to have many different > auto-vectorization patterns, for example: cond_addetc. > > I should make the current framework suitable for all of them to > simplify the future work. That's good in general but can't it wait until the respective changes go in? I

Re: Re: [PATCH] RISC-V: Add RVV comparison autovectorization

2023-05-22 Thread juzhe.zh...@rivai.ai
Yes, I am working on it, but I noticed that the current framework is really ugly and bad. I am gonna refactor it before I send comparison support. I do refactoring since we are going to have many different auto-vectorization patterns, for example: cond_addetc. I should make the current fram

Re: [PATCH] Fix handling of non-integral bit-fields in native_encode_initializer

2023-05-22 Thread Richard Biener via Gcc-patches
On Mon, May 22, 2023 at 10:10 AM Eric Botcazou via Gcc-patches wrote: > > Hi, > > the encoder for CONSTRUCTORs assumes that all bit-fields (DECL_BIT_FIELD) have > integral types, but that's not the case in Ada where they may have pretty much > any type, resulting in a wrong encoding for them. > >

Re: [PATCH] RISC-V: Add RVV comparison autovectorization

2023-05-22 Thread Robin Dapp via Gcc-patches
> Thanks Robin. Address comment. Did you intend to send an update here already or are you working on it? Just wondering because you just sent another refactoring patch. Regards Robin

[PATCH] RISC-V: Add "m_" prefix for private member

2023-05-22 Thread juzhe . zhong
From: Juzhe-Zhong Since the current framework is hard to maintain and hard to be used in the future possible auto-vectorization patterns. We will need to keep adding more helpers and arguments during the auto-vectorization supporting. We should refactor the framework now for the future use sinc

Re: [PATCH] avr: Set param_min_pagesize to 0 [PR105523]

2023-05-22 Thread Richard Biener via Gcc-patches
On Fri, May 19, 2023 at 7:58 AM wrote: > > On 26/04/23, 5:51 PM, "Richard Biener" > wrote: > > On Wed, Apr 26, 2023 at 12:56 PM > > wrote: > > > > > > On Wed, Apr 26, 2023 at 3:15 PM Richard Biener via Gcc-patches >

Re: [PATCH 1/2] Improve do_store_flag for single bit comparison against 0

2023-05-22 Thread Richard Biener via Gcc-patches
On Fri, May 19, 2023 at 4:15 AM Andrew Pinski via Gcc-patches wrote: > > While working something else, I noticed we could improve > the following function code generation: > ``` > unsigned f(unsigned t) > { > if (t & ~(1<<30)) __builtin_unreachable(); > return t != 0; > } > ``` > Right know we

RE: [PATCH] RISC-V: Fix typo of multiple_rgroup-2.h

2023-05-22 Thread Li, Pan2 via Gcc-patches
Committed, thanks Kito and Juzhe and sorry for inconvenient. Pan -Original Message- From: Kito Cheng Sent: Monday, May 22, 2023 6:05 PM To: juzhe.zh...@rivai.ai Cc: gcc-patches@gcc.gnu.org; kito.ch...@sifive.com; pal...@dabbelt.com; pal...@rivosinc.com; jeffreya...@gmail.com; rdapp

Re: Re: [PATCH V11] VECT: Add decrement IV support in Loop Vectorizer

2023-05-22 Thread juzhe.zh...@rivai.ai
>> Not sure if you've covered this already in another thread but IIRC >> RVV uses "with-len" not only for loads and stores but for arithmetic >> instructions as well which is where (3) fails. Fortunately RVV uses >> element counts(?) Yes, RVV uses element count. But I did discover we have bugs f

Re: [committed] Enable LRA on several ports

2023-05-22 Thread Richard Biener via Gcc-patches
On Fri, May 19, 2023 at 1:45 PM Maciej W. Rozycki wrote: > > On Tue, 2 May 2023, Jeff Law via Gcc-patches wrote: > > > Well, I'd say that my plan would be to deprecate any target that is not > > converted by the end of this development cycle. So the change keeps cris > > from > > falling into th

Re: [PATCH V11] VECT: Add decrement IV support in Loop Vectorizer

2023-05-22 Thread Richard Biener via Gcc-patches
On Fri, May 19, 2023 at 12:59 PM Richard Sandiford via Gcc-patches wrote: > > "juzhe.zh...@rivai.ai" writes: > >>> I don't think this is a property of decrementing IVs. IIUC it's really > >>> a property of rgl->factor == 1 && factor == 1, where factor would need > >>> to be passed in by the call

Re: [PATCH] RISC-V: Fix typo of multiple_rgroup-2.h

2023-05-22 Thread Kito Cheng via Gcc-patches
ok On Mon, May 22, 2023 at 6:02 PM wrote: > > From: Juzhe-Zhong > > Just notice this following fail in the regression: > FAIL: gcc.target/riscv/rvv/autovec/partial/multiple_rgroup-2.c (test for > excess errors) > FAIL: gcc.target/riscv/rvv/autovec/partial/multiple_rgroup_run-2.c (test for > ex

Re: [PATCH] c-family: implement -ffp-contract=on

2023-05-22 Thread Richard Biener via Gcc-patches
On Thu, May 18, 2023 at 11:04 PM Alexander Monakov via Gcc-patches wrote: > > Implement -ffp-contract=on for C and C++ without changing default > behavior (=off for -std=cNN, =fast for C++ and -std=gnuNN). The documentation changes mention the defaults are changed for standard modes, I suppose yo

[PATCH] RISC-V: Fix typo of multiple_rgroup-2.h

2023-05-22 Thread juzhe . zhong
From: Juzhe-Zhong Just notice this following fail in the regression: FAIL: gcc.target/riscv/rvv/autovec/partial/multiple_rgroup-2.c (test for excess errors) FAIL: gcc.target/riscv/rvv/autovec/partial/multiple_rgroup_run-2.c (test for excess errors) gcc/testsuite/ChangeLog: * gcc.targe

Re: [PATCH, rs6000] Split TImode for logical operations in expand pass [PR100694]

2023-05-22 Thread Kewen.Lin via Gcc-patches
Hi Haochen, on 2023/2/8 13:08, HAO CHEN GUI wrote: > Hi, > The logical operations for TImode is split after reload pass right now. Some > potential optimizations miss as the split is too late. This patch removes > TImode from "AND", "IOR", "XOR" and "NOT" expander so that these logical > operati

Re: [PATCH] RISC-V: Implement autovec abs, vneg, vnot.

2023-05-22 Thread Kito Cheng via Gcc-patches
> > So I expect you will also apply those refactor on Juzhe's new changes? > > If so I would like to have a separated NFC refactor patch if possible. > > What's NFC? :) Do you mean to just have the refactor part as a separate > patch? If yes, I agree. NFC: non-functional-change, that's a term us

Re: [PATCH] RISC-V: Add missing torture-init and torture-finish for rvv.exp

2023-05-22 Thread Kito Cheng via Gcc-patches
Ooops, seems still some issue around here, but I found something might related this issue: https://github.com/gcc-mirror/gcc/commit/d6654a4be3ba44c0d57be7c8a51d76d9721345e1 https://github.com/gcc-mirror/gcc/commit/23c49bb8d09bc3bfce9a08be637cf32ac014de56 On Mon, May 22, 2023 at 2:42 PM Kito Cheng

Re: Re: [PATCH] RISC-V: Implement autovec abs, vneg, vnot.

2023-05-22 Thread juzhe.zh...@rivai.ai
Yeah, I agree wit kito. For example, I see you have rename "get_prefer_***" into "get_preferred_**" I think this NFC patch should be separated patch. Thanks. juzhe.zh...@rivai.ai From: Kito Cheng Date: 2023-05-22 17:05 To: Robin Dapp CC: 钟居哲; gcc-patches; palmer; Michael Collison; Jeff Law Su

Re: [PATCH] RISC-V: Implement autovec abs, vneg, vnot.

2023-05-22 Thread Robin Dapp via Gcc-patches
> So I expect you will also apply those refactor on Juzhe's new changes? > If so I would like to have a separated NFC refactor patch if possible. What's NFC? :) Do you mean to just have the refactor part as a separate patch? If yes, I agree. > e.g. > Juzhe's vec_cmp/vcond -> NFC refactor patch

[COMMITTED] ada: Reuse idiomatic procedure in CStand

2023-05-22 Thread Marc Poulhiès via Gcc-patches
From: Ronan Desplanques This change replaces a call to Set_Name_Entity_Id with a call to the higher-level Set_Current_Entity. gcc/ada/ * cstand.adb: Use more idiomatic procedure. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/cstand.adb | 3 +-- 1 file changed, 1 ins

Re: [PATCH] RISC-V: Implement autovec abs, vneg, vnot.

2023-05-22 Thread Kito Cheng via Gcc-patches
So I expect you will also apply those refactor on Juzhe's new changes? If so I would like to have a separated NFC refactor patch if possible. e.g. Juzhe's vec_cmp/vcond -> NFC refactor patch -> abs, vneg, vnot On Mon, May 22, 2023 at 4:59 PM Robin Dapp wrote: > > As discussed with Juzhe off-list

[COMMITTED] ada: Incorrect constant folding in postcondition involving 'Old

2023-05-22 Thread Marc Poulhiès via Gcc-patches
From: Justin Squirek The following patch fixes an issue in the compiler whereby certain flavors of access comparisons may be incorrectly constant-folded out of contract expressions - notably in postcondition expressions featuring a reference to 'Old. gcc/ada/ * checks.adb (Install_Null_

Re: [PATCH] rs6000: Fix __builtin_vec_xst_trunc definition

2023-05-22 Thread Kewen.Lin via Gcc-patches
Hi Carl, on 2023/5/11 02:06, Carl Love via Gcc-patches wrote: > GCC maintainers: > > The following patch fixes errors in the arguments in the > __builtin_altivec_tr_stxvrhx, __builtin_altivec_tr_stxvrwx builtin > definitions. Note, these builtins are used by the overloaded > __builtin_vec_xst_tr

[COMMITTED] ada: Fix crash caused by incorrect expansion of iterated component

2023-05-22 Thread Marc Poulhiès via Gcc-patches
The way iterated component are expanded could lead to inconsistent tree. This change fixes 2 issues: - in an early step during Pre_Analyze, the loop variable still has Any_Type and the compiler must not emit an error. A later full Analyze is supposed to correctly set the Etype, and only then shou

Re: Re: [PATCH] RISC-V: Add RVV comparison autovectorization

2023-05-22 Thread juzhe.zh...@rivai.ai
Thanks Robin. Address comment. juzhe.zh...@rivai.ai From: Robin Dapp Date: 2023-05-22 16:07 To: juzhe.zhong; gcc-patches CC: rdapp.gcc; kito.cheng; palmer; jeffreyalaw; Richard Sandiford Subject: Re: [PATCH] RISC-V: Add RVV comparison autovectorization Hi Juzhe, thanks. Some remarks inline.

[COMMITTED] ada: Rename Is_Past_Self_Hiding_Point flag to be Is_Not_Self_Hidden

2023-05-22 Thread Marc Poulhiès via Gcc-patches
From: Bob Duff ...which seems clearer. Still work in progress. gcc/ada/ * cstand.adb (Is_Past_Self_Hiding_Point): Rename to be Is_Not_Self_Hidden. * einfo.ads: Likewise. * exp_aggr.adb: Likewise. * gen_il-fields.ads: Likewise. * gen_il-gen-gen_en

[COMMITTED] ada: Small cleanup in support for protected subprograms

2023-05-22 Thread Marc Poulhiès via Gcc-patches
From: Eric Botcazou This moves the propagation of the Uses_Sec_Stack flag, from the original to the rewritten subprogram, to the point where the latter is expanded, along with the propagation of the Has_Nested_Subprogram flag, as well as addresses a ??? comment in the same block of code. No func

[COMMITTED] ada: Use idiomatic construct in Expand_N_Package_Body

2023-05-22 Thread Marc Poulhiès via Gcc-patches
From: Eric Botcazou gcc/ada/ * exp_ch7.adb (Expand_N_Package_Body): Call Defining_Entity to get the entity of the body. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/exp_ch7.adb | 11 +-- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/g

[COMMITTED] ada: Further fixes to GNATprove and CodePeer expression pretty-printer

2023-05-22 Thread Marc Poulhiès via Gcc-patches
From: Piotr Trojanek The expression pretty-printer still crashes on several tests, but already gives much better outputs for many previously unsupported constructs. gcc/ada/ * pprint.adb (Expression_Image): Handle several previously unsupported constructs. Tested on x86_64-pc-l

[COMMITTED] ada: Avoid repeated calls when looking for first/last slocs of a node

2023-05-22 Thread Marc Poulhiès via Gcc-patches
From: Piotr Trojanek gcc/ada/ * errout.adb (First_Loc): Avoid repeated calls. (Last_Loc): Likewise. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/errout.adb | 34 ++ 1 file changed, 18 insertions(+), 16 deletions(-) diff --git

[COMMITTED] ada: Fix missing finalization in separate package body

2023-05-22 Thread Marc Poulhiès via Gcc-patches
From: Eric Botcazou This directly comes from a loophole in the implementation. gcc/ada/ * exp_ch7.adb (Process_Package_Body): New procedure taken from... (Build_Finalizer.Process_Declarations): ...here. Call the above procedure to deal with both package bodies and packa

[COMMITTED] ada: Cleanup redundant condition in resolution of entity names

2023-05-22 Thread Marc Poulhiès via Gcc-patches
From: Piotr Trojanek Code cleanup related to new contract for SPARK; semantics is unaffected. gcc/ada/ * sem_res.adb (Resolve_Entity_Name): Combine two IF statements that execute code only for references that come from source. Tested on x86_64-pc-linux-gnu, committed on master.

[COMMITTED] ada: Add missing word in comment

2023-05-22 Thread Marc Poulhiès via Gcc-patches
From: Ronan Desplanques gcc/ada/ * par-ch3.adb: Add missing word in comment. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/par-ch3.adb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/ada/par-ch3.adb b/gcc/ada/par-ch3.adb index 7126afbfbeb..a71

Re: [PATCH] RISC-V: Implement autovec abs, vneg, vnot.

2023-05-22 Thread Robin Dapp via Gcc-patches
As discussed with Juzhe off-list, I will rebase this patch against Juzhe's vec_cmp/vcond patch once that hits the trunk. Regards Robin

[COMMITTED] ada: Add Is_Past_Self_Hiding_Point flag

2023-05-22 Thread Marc Poulhiès via Gcc-patches
From: Bob Duff This patch adds a flag Is_Past_Self_Hiding_Point. When False, this will replace E_Void as the indicator for a premature use of a declaration within itself -- for example, "X : T := X;". One might think this flag should be called something like Is_Hidden_From_All_Visibility, revers

  1   2   >