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

[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

[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

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

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

[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

[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

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

[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

[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. *

[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(+)

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

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

[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.

[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 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

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 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: [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

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

[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

[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

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

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 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

[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

[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

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

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 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 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 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] 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] 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

[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 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 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] 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

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

[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: [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

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 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

[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

[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-

<    1   2