Re: [PATCH 5/5] x86: yet more PR target/100711-like splitting

2023-06-24 Thread Hongtao Liu via Gcc-patches
On Sun, Jun 25, 2023 at 2:35 PM Hongtao Liu wrote: > > On Sun, Jun 25, 2023 at 2:25 PM Jan Beulich wrote: > > > > On 25.06.2023 07:12, Hongtao Liu wrote: > > > On Wed, Jun 21, 2023 at 2:29 PM Jan Beulich via Gcc-patches > > > wrote: > > >> > > >> --- > > >> For the purpose here (and elsewhere) b

Re: [PATCH 5/5] x86: yet more PR target/100711-like splitting

2023-06-24 Thread Hongtao Liu via Gcc-patches
On Sun, Jun 25, 2023 at 2:25 PM Jan Beulich wrote: > > On 25.06.2023 07:12, Hongtao Liu wrote: > > On Wed, Jun 21, 2023 at 2:29 PM Jan Beulich via Gcc-patches > > wrote: > >> > >> --- > >> For the purpose here (and elsewhere) bcst_vector_operand() (really: > >> bcst_mem_operand()) isn't permissiv

Re: [PATCH 4/5] x86: further PR target/100711-like splitting

2023-06-24 Thread Hongtao Liu via Gcc-patches
On Sun, Jun 25, 2023 at 2:16 PM Jan Beulich wrote: > > On 25.06.2023 07:06, Hongtao Liu wrote: > > On Wed, Jun 21, 2023 at 2:28 PM Jan Beulich via Gcc-patches > > wrote: > >> > >> With respective two-operand bitwise operations now expressable by a > >> single VPTERNLOG, add splitters to also deal

Re: [PATCH 5/5] x86: yet more PR target/100711-like splitting

2023-06-24 Thread Jan Beulich via Gcc-patches
On 25.06.2023 07:12, Hongtao Liu wrote: > On Wed, Jun 21, 2023 at 2:29 PM Jan Beulich via Gcc-patches > wrote: >> >> --- >> For the purpose here (and elsewhere) bcst_vector_operand() (really: >> bcst_mem_operand()) isn't permissive enough: We'd want it to allow >> 128-bit and 256-bit types as well

Re: [PATCH 4/5] x86: further PR target/100711-like splitting

2023-06-24 Thread Jan Beulich via Gcc-patches
On 25.06.2023 07:06, Hongtao Liu wrote: > On Wed, Jun 21, 2023 at 2:28 PM Jan Beulich via Gcc-patches > wrote: >> >> With respective two-operand bitwise operations now expressable by a >> single VPTERNLOG, add splitters to also deal with ior and xor >> counterparts of the original and-only case. N

RE: [PATCH] GIMPLE_FOLD: Apply LEN_MASK_{LOAD, STORE} into GIMPLE_FOLD

2023-06-24 Thread Li, Pan2 via Gcc-patches
Committed, thanks Jeff. Pan -Original Message- From: Gcc-patches On Behalf Of Jeff Law via Gcc-patches Sent: Saturday, June 24, 2023 10:45 PM To: juzhe.zh...@rivai.ai; gcc-patches@gcc.gnu.org Cc: rguent...@suse.de; richard.sandif...@arm.com Subject: Re: [PATCH] GIMPLE_FOLD: Apply LEN_MA

Re: [PATCH 1/5] x86: use VPTERNLOG for further bitwise two-vector operations

2023-06-24 Thread Jan Beulich via Gcc-patches
On 25.06.2023 06:42, Hongtao Liu wrote: > On Wed, Jun 21, 2023 at 2:26 PM Jan Beulich via Gcc-patches > wrote: >> >> +(define_code_iterator andor [and ior]) >> +(define_code_attr nlogic [(and "nor") (ior "nand")]) >> +(define_code_attr ternlog_nlogic [(and "0x11") (ior "0x77")]) >> + >> +(define_i

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

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

Re: [PATCH 5/5] x86: yet more PR target/100711-like splitting

2023-06-24 Thread Hongtao Liu via Gcc-patches
On Wed, Jun 21, 2023 at 2:29 PM Jan Beulich via Gcc-patches wrote: > > Following two-operand bitwise operations, add another splitter to also > deal with not followed by broadcast all on its own, which can be > expressed as simple embedded broadcast instead once a broadcast operand > is actually p

Re: [PATCH 4/5] x86: further PR target/100711-like splitting

2023-06-24 Thread Hongtao Liu via Gcc-patches
On Wed, Jun 21, 2023 at 2:28 PM Jan Beulich via Gcc-patches wrote: > > With respective two-operand bitwise operations now expressable by a > single VPTERNLOG, add splitters to also deal with ior and xor > counterparts of the original and-only case. Note that the splitters need > to be separate, as

Re: [PATCH 3/5] x86: allow memory operand for AVX2 splitter for PR target/100711

2023-06-24 Thread Hongtao Liu via Gcc-patches
On Wed, Jun 21, 2023 at 2:28 PM Jan Beulich via Gcc-patches wrote: > > The intended broadcast (with AVX512) can very well be done right from > memory. Ok. > > gcc/ > > * config/i386/sse.md: Permit non-immediate operand 1 in AVX2 > form of splitter for PR target/100711. > > --- a/gc

Re: [PATCH 2/5] x86: use VPTERNLOG also for certain andnot forms

2023-06-24 Thread Hongtao Liu via Gcc-patches
On Wed, Jun 21, 2023 at 2:27 PM Jan Beulich via Gcc-patches wrote: > > When it's the memory operand which is to be inverted, using VPANDN* > requires a further load instruction. The same can be achieved by a > single VPTERNLOG*. Add two new alternatives (for plain memory and > embedded broadcast),

Re: [PATCH 1/5] x86: use VPTERNLOG for further bitwise two-vector operations

2023-06-24 Thread Hongtao Liu via Gcc-patches
On Wed, Jun 21, 2023 at 2:26 PM Jan Beulich via Gcc-patches wrote: > > All combinations of and, ior, xor, and not involving two operands can be > expressed that way in a single insn. > > gcc/ > > PR target/93768 > * config/i386/i386.cc (ix86_rtx_costs): Further special-case >

Re: [PATCH] RISC-V: force arg and target to reg rtx under -O0

2023-06-24 Thread juzhe.zh...@rivai.ai
Hi, Li. Appreciate for catching this! I think it's better: -emit_insn (gen_rtx_SET (gen_lowpart (e.vector_mode (), e.target), src)); +emit_move_insn (gen_lowpart (e.vector_mode (), e.target), src); do this to fix this issue. Thanks. juzhe.zh...@rivai.ai From: Li Xu Date: 2023-06-25 11:08 To:

[PATCH] internal-fn: Fix bug of BIAS argument index

2023-06-24 Thread juzhe . zhong
From: Ju-Zhe Zhong When trying to enable LEN_MASK_{LOAD,STORE} in RISC-V port, I found I made a mistake in case of argument index of BIAS. This patch is an obvious fix, Ok for trunk ? gcc/ChangeLog: * internal-fn.cc (expand_partial_store_optab_fn): Fix bug of BIAS argument index. --

[PATCH] RISC-V: force arg and target to reg rtx under -O0

2023-06-24 Thread Li Xu
arg and target should be expanded to reg rtx during expand pass. Consider this following case: void test_vlmul_ext_v_i8mf8_i8mf4(vint8mf8_t op1) { vint8mf4_t res = __riscv_vlmul_ext_v_i8mf8_i8mf4(op1); } Compilation fails with: test.c: In function 'test_vlmul_ext_v_i8mf8_i8mf4': test.c:5:1: err

Re: Re: [PATCH V1] RISC-V:Add float16 tuple type support

2023-06-24 Thread juzhe.zh...@rivai.ai
Such issue will be addressed by this patch: https://gcc.gnu.org/pipermail/gcc-patches/2023-June/622440.html But still wait for Jakub's comments. juzhe.zh...@rivai.ai From: Andreas Schwab Date: 2023-06-23 18:25 To: shiyulong CC: gcc-patches; palmer; kito.cheng; jim.wilson.gcc; juzhe.zhong; pan

[PATCHv4, rs6000] Splat vector small V2DI constants with ISA 2.07 instructions [PR104124]

2023-06-24 Thread HAO CHEN GUI via Gcc-patches
Hi, This patch adds a new insn for vector splat with small V2DI constants on P8. If the value of constant is in RANGE (-16, 15) and not 0 or -1, it can be loaded with vspltisw and vupkhsw on P8. It should be efficient than loading vector from memory. Compared to last version, the main change i

Re: [PATCH] RISCV: Add -m(no)-omit-leaf-frame-pointer support.

2023-06-24 Thread Stefan O'Rear via Gcc-patches
On Sat, Jun 24, 2023, at 11:01 AM, Jeff Law via Gcc-patches wrote: > On 6/21/23 02:14, Wang, Yanzhang wrote: >> Hi Jeff, sorry for the late reply. >> >>> The long branch handling is done at the assembler level. So the clobbering >>> of $ra isn't visible to the compiler. Thus the compiler has to

RE: [PATCH] SSA ALIAS: Apply LEN_MASK_{LOAD, STORE} into SSA alias analysis

2023-06-24 Thread Li, Pan2 via Gcc-patches
Committed, thanks Jeff. Pan -Original Message- From: Gcc-patches On Behalf Of Jeff Law via Gcc-patches Sent: Saturday, June 24, 2023 10:09 PM To: 钟居哲 ; gcc-patches Cc: rguenther ; richard.sandiford Subject: Re: [PATCH] SSA ALIAS: Apply LEN_MASK_{LOAD, STORE} into SSA alias analysis

Re: [PATCH v2] x86: make better use of VBROADCASTSS / VPBROADCASTD

2023-06-24 Thread Hongtao Liu via Gcc-patches
On Sun, Jun 25, 2023 at 9:17 AM Liu, Hongtao wrote: > > > > > -Original Message- > > From: Jan Beulich > > Sent: Wednesday, June 21, 2023 8:40 PM > > To: Hongtao Liu > > Cc: gcc-patches@gcc.gnu.org; Kirill Yukhin ; Liu, > > Hongtao > > Subject: Re: [PATCH v2] x86: make better use of VBR

RE: [PATCH v2] x86: make better use of VBROADCASTSS / VPBROADCASTD

2023-06-24 Thread Liu, Hongtao via Gcc-patches
> -Original Message- > From: Jan Beulich > Sent: Wednesday, June 21, 2023 8:40 PM > To: Hongtao Liu > Cc: gcc-patches@gcc.gnu.org; Kirill Yukhin ; Liu, > Hongtao > Subject: Re: [PATCH v2] x86: make better use of VBROADCASTSS / > VPBROADCASTD > > On 21.06.2023 09:44, Jan Beulich wrote:

RE: [PATCH V1] RISC-V:Add float16 tuple type abi

2023-06-24 Thread Li, Pan2 via Gcc-patches
Committed, thanks Jeff. Pan -Original Message- From: Jeff Law Sent: Saturday, June 24, 2023 10:51 PM To: juzhe.zh...@rivai.ai; yulong ; gcc-patches Cc: palmer ; Kito.cheng ; Li, Pan2 ; wuwei2016 ; jiawei ; shihua ; dje.gcc ; pinskia ; Robin Dapp Subject: Re: [PATCH V1] RISC-V:Add

Re: [Patch, fortran] PR49213 - [OOP] gfortran rejects structure constructor expression

2023-06-24 Thread Harald Anlauf via Gcc-patches
Hi Paul! On 6/24/23 15:18, Paul Richard Thomas via Gcc-patches wrote: I have included the adjustment to 'gfc_is_ptr_fcn' and eliminating the extra blank line, introduced by my last patch. I played safe and went exclusively for class functions with attr.class_pointer set on the grounds that these

[PATCH, part2, committed] Fortran: ABI for scalar CHARACTER(LEN=1),VALUE dummy argument [PR110360]

2023-06-24 Thread Harald Anlauf via Gcc-patches
Dear all, the first part of the patch came with a testcase that also exercised code for constant string arguments, which was not touched by that patch but seems to have caused runtime failures on big-endian platforms (e.g. Power-* BE) for all optimization levels, and on x86 / -m32 at -O1 and highe

[x86_PATCH] New *ashl_doubleword_highpart define_insn_and_split.

2023-06-24 Thread Roger Sayle
This patch contains a pair of (related) optimizations in i386.md that allow us to generate better code for the example below (this is a step towards fixing a bugzilla PR, but I've forgotten the number). __int128 foo64(__int128 x, long long y) { __int128 t = (__int128)y << 64; return x ^ t; }

PR82943 - Suggested patch to fix

2023-06-24 Thread Alexander Westbrooks via Gcc-patches
Hello, I am new to the GFortran community. Over the past two weeks I created a patch that should fix PR82943 for GFortran. I have attached it to this email. The patch allows the code below to compile successfully. I am working on creating test cases next, but I am new to the process so it may take

[x86_64 PATCH] Handle SUBREG conversions in TImode STV (for ptest).

2023-06-24 Thread Roger Sayle
This patch teaches i386's STV pass how to handle SUBREG conversions, i.e. that a TImode SUBREG can be transformed into a V1TImode SUBREG, without worrying about other DEFs and USEs. A motivating example where this is useful is typedef long long __m128i __attribute__ ((__vector_size__ (16))); int

Re: [PATCH] RISC-V: Split VF iterators for Zvfh(min).

2023-06-24 Thread Jeff Law via Gcc-patches
On 6/22/23 07:03, Robin Dapp wrote: Hi, when working on FP widening/narrowing I realized the Zvfhmin handling is not ideal right now: We use the "enabled" insn attribute to disable instructions not available with Zvfhmin (but only with Zvfh). However, "enabled == 0" only disables insn alter

Re: [PATCH v7 0/6] c++, libstdc++: get std::is_object to dispatch to new built-in traits

2023-06-24 Thread Ken Matsui via Gcc-patches
On Tue, Jun 20, 2023 at 8:32 AM Patrick Palka wrote: > > On Thu, 15 Jun 2023, Ken Matsui via Libstdc++ wrote: > > > Hi, > > > > For those curious about the performance improvements of this patch, I > > conducted a benchmark that instantiates 256k specializations of > > is_object_v based on Patrick

Re: [PATCH] RISCV: Add -m(no)-omit-leaf-frame-pointer support.

2023-06-24 Thread Jeff Law via Gcc-patches
On 6/21/23 02:14, Wang, Yanzhang wrote: Hi Jeff, sorry for the late reply. The long branch handling is done at the assembler level. So the clobbering of $ra isn't visible to the compiler. Thus the compiler has to be extremely careful to not hold values in $ra because the assembler may clob

Re: [PATCH V1] RISC-V:Add float16 tuple type abi

2023-06-24 Thread Jeff Law via Gcc-patches
On 6/21/23 01:46, juzhe.zh...@rivai.ai wrote: LGTM. Thanks. OK from me as well. jeff

Re: [PATCH v2 1/2] c++: implement __is_volatile built-in trait

2023-06-24 Thread Ken Matsui via Gcc-patches
Here is the benchmark result for is_volatile: https://github.com/ken-matsui/gcc-benches/blob/main/is_volatile.md#sat-jun-24-074036-am-pdt-2023 Time: -2.42335% Peak Memory Usage: -1.07651% Total Memory Usage: -1.62369% On Sat, Jun 24, 2023 at 7:24 AM Ken Matsui wrote: > > This patch implements b

Re: [PATCH] GIMPLE_FOLD: Apply LEN_MASK_{LOAD, STORE} into GIMPLE_FOLD

2023-06-24 Thread Jeff Law via Gcc-patches
On 6/23/23 07:48, juzhe.zh...@rivai.ai wrote: From: Ju-Zhe Zhong Hi, since we are going to have LEN_MASK_{LOAD,STORE} into loopVectorizer. Currenly, 1. we can fold MASK_{LOAD,STORE} into MEM when mask is all ones. 2. we can fold LEN_{LOAD,STORE} into MEM when (len - bias) is VF. Now, I thi

RE: [PATCH] RISC-V: Refactor the integer ternary autovec pattern

2023-06-24 Thread Li, Pan2 via Gcc-patches
Committed, thanks Jeff. Pan -Original Message- From: Gcc-patches On Behalf Of Jeff Law via Gcc-patches Sent: Saturday, June 24, 2023 10:04 PM To: Juzhe-Zhong ; gcc-patches@gcc.gnu.org Cc: kito.ch...@sifive.com; pal...@rivosinc.com; rdapp@gmail.com Subject: Re: [PATCH] RISC-V: Refact

RE: [PATCH V3] RISC-V: Support RVV floating-point auto-vectorization

2023-06-24 Thread Li, Pan2 via Gcc-patches
Committed, thanks Jeff. Pan -Original Message- From: Gcc-patches On Behalf Of Jeff Law via Gcc-patches Sent: Saturday, June 24, 2023 10:06 PM To: Juzhe-Zhong ; gcc-patches@gcc.gnu.org Cc: kito.ch...@sifive.com; pal...@rivosinc.com; rdapp@gmail.com Subject: Re: [PATCH V3] RISC-V: Sup

Re: [PATCH v2] RISC-V: Implement autovec copysign.

2023-06-24 Thread Jeff Law via Gcc-patches
On 6/21/23 08:24, 钟居哲 wrote: LGTM. Likewise. OK for the trunk. jeff

Re: [PATCH][RFC] middle-end/110237 - wrong MEM_ATTRs for partial loads/stores

2023-06-24 Thread Jeff Law via Gcc-patches
On 6/22/23 00:39, Richard Biener wrote: I suspect there's no way to specify the desired semantics? OTOH code that looks at the MEM operand only and not the insn (which should have some UNSPEC wrapped) needs to be conservative, so maybe the alias code shouldn't assume that a (mem:V16SI ..)

[PATCH v2 2/2] libstdc++: use new built-in trait __is_volatile

2023-06-24 Thread Ken Matsui via Gcc-patches
This patch lets libstdc++ use new built-in trait __is_volatile. libstdc++-v3/ChangeLog: * include/std/type_traits (is_volatile): Use __is_volatile built-in trait. (is_volatile_v): Likewise. Signed-off-by: Ken Matsui --- libstdc++-v3/include/std/type_traits | 13

Re: [PATCH] Improve DSE to handle stores before __builtin_unreachable ()

2023-06-24 Thread Jeff Law via Gcc-patches
On 6/22/23 07:42, Jan Hubicka wrote: On 6/22/23 00:31, Richard Biener wrote: I think there's a difference in that __builtin_trap () is observable while __builtin_unreachable () is not and reaching __builtin_unreachable () invokes undefined behavior while reaching __builtin_trap () does not.

[PATCH v2 1/2] c++: implement __is_volatile built-in trait

2023-06-24 Thread Ken Matsui via Gcc-patches
This patch implements built-in trait for std::is_volatile. gcc/cp/ChangeLog: * cp-trait.def: Define __is_volatile. * constraint.cc (diagnose_trait_expr): Handle CPTK_IS_VOLATILE. * semantics.cc (trait_expr_value): Likewise. (finish_trait_expr): Likewise. gcc/tests

Re: [PATCH v2 1/2] c++: implement __is_array built-in trait

2023-06-24 Thread Ken Matsui via Gcc-patches
Here is the benchmark result for is_array: https://github.com/ken-matsui/gcc-benches/blob/main/is_array.md#sat-jun-24-070630-am-pdt-2023 Time: -15.511% Peak Memory Usage: +0.173923% Total Memory Usage: -6.2037% On Sat, Jun 24, 2023 at 6:54 AM Ken Matsui wrote: > > This patch implements built-in

Re: [PATCH] SSA ALIAS: Apply LEN_MASK_STORE to 'ref_maybe_used_by_call_p_1'

2023-06-24 Thread Jeff Law via Gcc-patches
On 6/23/23 17:20, 钟居哲 wrote: Not sure since I saw MASK_STORE/LEN_STORE didn't compute size. Also OK after a re-review on my part. The code sets the size to -1 after doing the ao_ref_init_from_ptr_and_size, meaning it's not a known size. jeff

Re: [PATCH] SSA ALIAS: Apply LEN_MASK_{LOAD, STORE} into SSA alias analysis

2023-06-24 Thread Jeff Law via Gcc-patches
On 6/23/23 17:21, 钟居哲 wrote: Not sure since I saw MASK_STORE/LEN_STORE didn't compute size. Yea, I think you're right. We take the size from the LHS. My mistake. This is fine for the trunk. jeff

Re: [PATCH V3] RISC-V: Support RVV floating-point auto-vectorization

2023-06-24 Thread Jeff Law via Gcc-patches
On 6/21/23 09:53, Juzhe-Zhong wrote: This patch adds RVV floating-point auto-vectorization. Also, fix attribute bug of floating-point ternary operations in vector.md. gcc/ChangeLog: * config/riscv/autovec.md (fma4): New pattern. (*fma): Ditto. (fnma4): Ditto.

Re: [PATCH] RISC-V: Refactor the integer ternary autovec pattern

2023-06-24 Thread Jeff Law via Gcc-patches
On 6/21/23 16:38, Juzhe-Zhong wrote: Long time ago, I encounter ICE when trying to set clobber register as Pmode and I forgot the reason. So, I clobber SI scratch and PUT_MODE to make it Pmode after reload which makes patterns look unreasonable. According to Jeff's comments, I tried it again

Re: [PATCH v2 1/3] c++: Track lifetimes in constant evaluation [PR70331, PR96630, PR98675]

2023-06-24 Thread Nathaniel Shead via Gcc-patches
On Fri, Jun 23, 2023 at 12:43:21PM -0400, Patrick Palka wrote: > On Wed, 29 Mar 2023, Nathaniel Shead via Gcc-patches wrote: > > > This adds rudimentary lifetime tracking in C++ constexpr contexts, > > allowing the compiler to report errors with using values after their > > backing has gone out of

[PATCH v2 2/2] libstdc++: use new built-in trait __is_array

2023-06-24 Thread Ken Matsui via Gcc-patches
This patch lets libstdc++ use new built-in trait __is_array. libstdc++-v3/ChangeLog: * include/std/type_traits (is_array): Use __is_array built-in trait. (is_array_v): Likewise. Signed-off-by: Ken Matsui --- libstdc++-v3/include/std/type_traits | 12 1 file changed

[PATCH v2 1/2] c++: implement __is_array built-in trait

2023-06-24 Thread Ken Matsui via Gcc-patches
This patch implements built-in trait for std::is_array. gcc/cp/ChangeLog: * cp-trait.def: Define __is_array. * constraint.cc (diagnose_trait_expr): Handle CPTK_IS_ARRAY. * semantics.cc (trait_expr_value): Likewise. (finish_trait_expr): Likewise. gcc/testsuite/Chan

Re: [PATCH v2 1/2] c++: implement __is_const built-in trait

2023-06-24 Thread Ken Matsui via Gcc-patches
Here is the benchmark result for is_const. https://github.com/ken-matsui/gcc-benches/blob/main/is_const.md#sat-jun-24-044815-am-pdt-2023 Time: -2.86467% Peak Memory Usage: -1.0654% Total Memory Usage: -1.62369% On Sat, Jun 24, 2023 at 6:41 AM Ken Matsui wrote: > > This patch implements built-in

[PATCH v2 2/2] libstdc++: use new built-in trait __is_const

2023-06-24 Thread Ken Matsui via Gcc-patches
This patch lets libstdc++ use new built-in trait __is_const. libstdc++-v3/ChangeLog: * include/std/type_traits (is_const): Use __is_const built-in trait. (is_const_v): Likewise. Signed-off-by: Ken Matsui --- libstdc++-v3/include/std/type_traits | 14 ++ 1 file chang

[PATCH v2 1/2] c++: implement __is_const built-in trait

2023-06-24 Thread Ken Matsui via Gcc-patches
This patch implements built-in trait for std::is_const. gcc/cp/ChangeLog: * cp-trait.def: Define __is_const. * constraint.cc (diagnose_trait_expr): Handle CPTK_IS_CONST. * semantics.cc (trait_expr_value): Likewise. (finish_trait_expr): Likewise. gcc/testsuite/Chan

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

2023-06-24 Thread Nathaniel Shead via Gcc-patches
On Fri, Jun 23, 2023 at 12:15:32PM -0400, Patrick Palka wrote: > On Sun, 30 Apr 2023, Nathaniel Shead via Gcc-patches wrote: > > > This patch ensures that any errors raised by finish_id_expression when > > parsing a decltype expression are properly reported, rather than > > potentially going ignor

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

2023-06-24 Thread Nathaniel Shead via Gcc-patches
On Fri, Jun 23, 2023 at 11:59:51AM -0400, Patrick Palka wrote: > Hi, > > On Sat, 22 Apr 2023, Nathaniel Shead via Gcc-patches wrote: > > > Bootstrapped and tested on x86_64-pc-linux-gnu. > > > > -- 8< -- > > > > This patch raises an error early when the decltype(auto) specifier is > > used as a

[Patch, fortran] PR49213 - [OOP] gfortran rejects structure constructor expression

2023-06-24 Thread Paul Richard Thomas via Gcc-patches
Hi All, I was looking through Neil Carlson's collection of gfortran bugs and was shocked to find this rather fundamental PR. At 12 years old, it is certainly a "golden oldie"! The patch is rather straightforward and seems to do the job of admitting derived, intrinsic and character expressions to

RE: [PATCH V2] LOOP IVOPTS: Apply LEN_MASK_{LOAD,STORE}

2023-06-24 Thread Li, Pan2 via Gcc-patches
Committed as passed bootstrap and regression test, thanks Jeff. Pan -Original Message- From: Gcc-patches On Behalf Of Jeff Law via Gcc-patches Sent: Saturday, June 24, 2023 9:29 AM To: juzhe.zh...@rivai.ai; gcc-patches@gcc.gnu.org Cc: rguent...@suse.de; richard.sandif...@arm.com Subject

Re: [PATCH 1/2] c++: implement __is_const built-in trait

2023-06-24 Thread Ken Matsui via Gcc-patches
Sure. Thank you. On Sat, Jun 24, 2023 at 5:14 AM Xi Ruoyao wrote: > Please use [PATCH v3 1/2] next time, now it's not easy to find the > latest version of the series (I'm not sure if the number "3" is > correct). > > On Sat, 2023-06-24 at 03:38 -0700, Ken Matsui via Gcc-patches wrote: > > This p

Re: [PATCH 1/2] c++: implement __is_const built-in trait

2023-06-24 Thread Xi Ruoyao via Gcc-patches
Please use [PATCH v3 1/2] next time, now it's not easy to find the latest version of the series (I'm not sure if the number "3" is correct). On Sat, 2023-06-24 at 03:38 -0700, Ken Matsui via Gcc-patches wrote: > This patch implements built-in trait for std::is_const. > > gcc/cp/ChangeLog: > >   

[PATCH 2/2] libstdc++: use new built-in trait __is_const

2023-06-24 Thread Ken Matsui via Gcc-patches
This patch lets libstdc++ use new built-in trait __is_const. libstdc++-v3/ChangeLog: * include/std/type_traits (is_const): Use __is_const built-in trait. (is_const_v): Likewise. Signed-off-by: Ken Matsui --- libstdc++-v3/include/std/type_traits | 14 ++ 1 file chang

[PATCH 1/2] c++: implement __is_const built-in trait

2023-06-24 Thread Ken Matsui via Gcc-patches
This patch implements built-in trait for std::is_const. gcc/cp/ChangeLog: * cp-trait.def: Define __is_const. * constraint.cc (diagnose_trait_expr): Handle CPTK_IS_CONST. * semantics.cc (trait_expr_value): Likewise. (finish_trait_expr): Likewise. gcc/testsuite/Chan

[PATCH 2/2] libstdc++: use new built-in trait __remove_pointer

2023-06-24 Thread Ken Matsui via Gcc-patches
This patch lets libstdc++ use new built-in trait __remove_pointer. libstdc++-v3/ChangeLog: * include/std/type_traits (remove_pointer): Use __remove_pointer built-in trait. Signed-off-by: Ken Matsui --- libstdc++-v3/include/std/type_traits | 8 +++- 1 file changed, 7 insertions(+),

[PATCH 1/2] c++: implement __remove_pointer built-in trait

2023-06-24 Thread Ken Matsui via Gcc-patches
This patch implements built-in trait for std::remove_pointer. gcc/cp/ChangeLog: * cp-trait.def: Define __remove_pointer. * semantics.cc (finish_trait_type): Handle CPTK_REMOVE_POINTER. gcc/testsuite/ChangeLog: * g++.dg/ext/has-builtin-1.C: Test existence of __remove_poin

Re: [PATCH 1/2] c++: implement __remove_pointer built-in trait

2023-06-24 Thread Ken Matsui via Gcc-patches
On Tue, Jun 20, 2023 at 8:22 AM Patrick Palka wrote: > > On Sat, 17 Jun 2023, Ken Matsui via Gcc-patches wrote: > > > Hi, > > > > I conducted a benchmark for remove_pointer as well as is_object. Just > > like the is_object benchmark, here is the benchmark code: > > > > https://github.com/ken-matsu