[committed] libstdc++: std::stoi etc. do not need C99 support [PR110653]

2023-07-13 Thread Jonathan Wakely via Gcc-patches
Tested powerpc64le-linux. Pushed to trunk. -- >8 -- std::stoi, std::stol, std::stoul, and std::stod only depend on C89 functions, so don't need to be guarded by _GLIBCXX_USE_C99_STDLIB std::stoll and std::stoull don't need C99 strtoll and strtoull if sizeof(long) == sizeof(long long).

Re: [Patch] libgomp: Use libnuma for OpenMP's partition=nearest allocation trait

2023-07-13 Thread Prathamesh Kulkarni via Gcc-patches
On Wed, 12 Jul 2023 at 17:35, Tobias Burnus wrote: > > Now committed as r14-2462-g450b05ce54d3f0. Hi Tobias, The newly added tests in above commit -- alloc-11.c and alloc-12.c seem to fail during execution on armv8l-unknown-linux-gnueabihf: Running libgomp:libgomp.c++/c++.exp ... FAIL:

[PATCH] fix pdp11_expand_epilogue (PR target/107841)

2023-07-13 Thread Mikael Pettersson via Gcc-patches
If the stack frame only contains an alloca area, then pdp11_expand_epilogue fails to deallocate it, resulting in callee-saved registers and the return address being restored from the wrong stack slots. Fixed by adding || cfun->calls_alloca to the condition for deallocating the frame. Tested with

[PATCH v1] RISC-V: Support basic floating-point dynamic rounding mode

2023-07-13 Thread Pan Li via Gcc-patches
From: Pan Li This patch would like to support the basic floating-point dynamic rounding modes for the RVV. We implement the dynamic rounding mode by below steps. 1. Set entry to DYN and exit to DYN_EXIT. 2. Add one rtl variable into machine_function for backup/restore. 3. Backup frm value when

RE: [x86 PATCH] Fix FAIL of gcc.target/i386/pr91681-1.c

2023-07-13 Thread Jiang, Haochen via Gcc-patches
> The recent change in TImode parameter passing on x86_64 results in the FAIL > of pr91681-1.c. The issue is that with the extra flexibility, the combine > pass is > now spoilt for choice between using either the > *add3_doubleword_concat or the *add3_doubleword_zext > patterns, when one operand

Re: [PATCH] RISC-V: Remove the redundant expressions in the and3.

2023-07-13 Thread Jeff Law via Gcc-patches
On 7/13/23 20:44, Palmer Dabbelt wrote: On Thu, 13 Jul 2023 19:41:08 PDT (-0700), gcc-patches@gcc.gnu.org wrote: Expanding without DONE or FAIL will leave the pattern as well, so this patch is fine IMO, so this patch LGTM, but anyway I will test this and commit if passed :) Ah, thanks, I

[SH][committed] Fix PR 101469

2023-07-13 Thread Oleg Endo
Hi, The attached patch fixes PR 101469. Tested by the original reporter Rin Okuyama on NetBSD with GCC 10.5. Applied to master, GCC 11, GCC 12, GCC 13 after 'make all' sanity check. Cheers, Oleg gcc/ChangeLog: PR target/101469 * config/sh/sh.md (peephole2): Handle case where

Re: [PATCH] RISC-V: Remove the redundant expressions in the and3.

2023-07-13 Thread Palmer Dabbelt
On Thu, 13 Jul 2023 19:41:08 PDT (-0700), gcc-patches@gcc.gnu.org wrote: Expanding without DONE or FAIL will leave the pattern as well, so this patch is fine IMO, so this patch LGTM, but anyway I will test this and commit if passed :) Ah, thanks, I guess I didn't know that. This is probably

Re: [PATCH] RISC-V: Remove the redundant expressions in the and3.

2023-07-13 Thread Jeff Law via Gcc-patches
On 7/13/23 20:41, Kito Cheng via Gcc-patches wrote: Expanding without DONE or FAIL will leave the pattern as well, so this patch is fine IMO, so this patch LGTM, but anyway I will test this and commit if passed :) THanks. I looked fine to me, but I wasn't going to have the time to

Re: [PATCH] RISC-V: Remove the redundant expressions in the and3.

2023-07-13 Thread Palmer Dabbelt
On Thu, 13 Jul 2023 19:02:05 PDT (-0700), li...@eswincomputing.com wrote: When generating the gen_and3 function based on the and3 template, it produces the expression emit_insn (gen_rtx_SET (operand0, gen_rtx_AND (, operand1, operand2)));, which is identical to the portion I removed in this

[PATCH] Initial Lunar Lake, Arrow Lake and Arrow Lake S Support

2023-07-13 Thread Mo, Zewei via Gcc-patches
Hi all, This patch is to add initial support for Lunar Lake, Arrow Lake and Arrow Lake S for GCC. This link of related information is listed below: https://www.intel.com/content/www/us/en/develop/download/intel-architecture-instruction-set-extensions-programming-reference.html This has been

Re: [PATCH] RISC-V: Remove the redundant expressions in the and3.

2023-07-13 Thread Kito Cheng via Gcc-patches
Expanding without DONE or FAIL will leave the pattern as well, so this patch is fine IMO, so this patch LGTM, but anyway I will test this and commit if passed :) On Fri, Jul 14, 2023 at 10:34 AM Palmer Dabbelt wrote: > > On Thu, 13 Jul 2023 19:02:05 PDT (-0700), li...@eswincomputing.com wrote: >

[PATCH] RISC-V: Remove the redundant expressions in the and3.

2023-07-13 Thread Die Li
When generating the gen_and3 function based on the and3 template, it produces the expression emit_insn (gen_rtx_SET (operand0, gen_rtx_AND (, operand1, operand2)));, which is identical to the portion I removed in this patch. Therefore, the redundant portion can be deleted. Signed-off-by: Die Li

[PATCH] Implement Bit-field lowering

2023-07-13 Thread naveenh--- via Gcc-patches
From: Naveen H S This patch adds lowering bit-field and opposite endian accesses pass. The patch addresses many issues in:- https://gcc.gnu.org/bugzilla/show_bug.cgi?id=19466 2023-07-14 Andrew Pinski Co-authored-by: Naveen H S gcc/ChangeLog: * Makefile.in (OBJS): Add

[PATCH V2] RISC-V: Enable COND_LEN_FMA auto-vectorization

2023-07-13 Thread Juzhe-Zhong
Add comments as Robin's suggestion in scatter_store_run-7.c Enable COND_LEN_FMA auto-vectorization for floating-point FMA auto-vectorization **NO** ffast-math. Since the middle-end support has been approved and I will merge it after I finished bootstrap && regression on X86.

Re: Re: [PATCH] RISC-V: Enable COND_LEN_FMA auto-vectorization

2023-07-13 Thread 钟居哲
Ok. Comments added: in V2: https://gcc.gnu.org/pipermail/gcc-patches/2023-July/624476.html juzhe.zh...@rivai.ai From: Robin Dapp Date: 2023-07-13 23:25 To: juzhe.zhong; Kito Cheng CC: rdapp.gcc; gcc-patches; jeffreyalaw; kito.cheng; palmer; palmer Subject: Re: [PATCH] RISC-V: Enable

[r14-2462 Regression] FAIL: libgomp.c++/../libgomp.c-c++-common/alloc-12.c execution test on Linux/x86_64

2023-07-13 Thread Jiang, Haochen via Gcc-patches
On Linux/x86_64, 450b05ce54d3f08c583c3b5341233ce0df99725b is the first bad commit commit 450b05ce54d3f08c583c3b5341233ce0df99725b Author: Tobias Burnus Date: Wed Jul 12 13:50:21 2023 +0200 libgomp: Use libnuma for OpenMP's partition=nearest allocation trait caused with GCC configured

Re: [PATCH v3] Implement new RTL optimizations pass: fold-mem-offsets.

2023-07-13 Thread Jeff Law via Gcc-patches
On 7/13/23 09:05, Manolis Tsamis wrote: In this version I have made f-m-o able to also eliminate constant moves in addition to the add constant instructions. This increases the number of simplified/eliminated instructions and is a good addition for RISC style ISAs where these are more common.

Re: [V1][PATCH 0/3] New attribute "element_count" to annotate bounds for C99 FAM(PR108896)

2023-07-13 Thread Kees Cook via Gcc-patches
On Thu, Jul 06, 2023 at 06:56:21PM +, Qing Zhao wrote: > Hi, Kees, > > I have updated my V1 patch with the following changes: > A. changed the name to "counted_by" > B. changed the argument from a string to an identifier > C. updated the documentation and testing cases accordingly. Sounds

[PATCH v6 1/2] c++, libstdc++: Implement __is_pointer built-in trait

2023-07-13 Thread Ken Matsui via Gcc-patches
This patch implements built-in trait for std::is_pointer. gcc/cp/ChangeLog: * cp-trait.def: Define __is_pointer. * constraint.cc (diagnose_trait_expr): Handle CPTK_IS_POINTER. * semantics.cc (trait_expr_value): Likewise. (finish_trait_expr): Likewise.

Re: [PATCH] c++: redundant targ coercion for var/alias tmpls

2023-07-13 Thread Jason Merrill via Gcc-patches
On 7/13/23 11:48, Patrick Palka wrote: On Wed, 28 Jun 2023, Patrick Palka wrote: On Wed, Jun 28, 2023 at 11:50 AM Jason Merrill wrote: On 6/23/23 12:23, Patrick Palka wrote: On Fri, 23 Jun 2023, Jason Merrill wrote: On 6/21/23 13:19, Patrick Palka wrote: When stepping through the

[PATCH v6 2/2] libstdc++: Use new built-in trait __is_pointer

2023-07-13 Thread Ken Matsui via Gcc-patches
This patch lets libstdc++ use new built-in trait __is_pointer. libstdc++-v3/ChangeLog: * include/bits/cpp_type_traits.h (__is_ptr): Use __is_pointer built-in trait. * include/std/type_traits (is_pointer): Likewise. Optimize its implementation.

[pushed] Darwin: Use -platform_version when available [PR110624].

2023-07-13 Thread Iain Sandoe via Gcc-patches
tested on i688, x86_64 Darwin versions with/without support for the platform_version flag. Checked by Rainer on macOS14. Pushed to trunk thanks, Iain --- 8< --- Later versions of the static linker support a more flexible flag to describe the OS, OS version and SDK used to build the code. This

Re: [PATCH 0/3] Fix argument evaluation order [PR92178]

2023-07-13 Thread Harald Anlauf via Gcc-patches
Hi Mikael, Am 11.07.23 um 12:32 schrieb Mikael Morin via Gcc-patches: Hello, this is a followup to Harald's recent work [1] on the evaluation order of arguments, when one of them is passed to an intent(out) allocatable dummy and is deallocated before the call. This extends Harald's fix to

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

2023-07-13 Thread Ken Matsui via Gcc-patches
On Thu, Jul 13, 2023 at 2:22 AM Jonathan Wakely wrote: > > On Wed, 12 Jul 2023 at 21:42, Ken Matsui wrote: > > > > On Wed, Jul 12, 2023 at 3:01 AM Jonathan Wakely wrote: > > > > > > On Mon, 10 Jul 2023 at 06:51, Ken Matsui via Libstdc++ > > > wrote: > > > > > > > > Hi, > > > > > > > > Here is

Re: [PATCH] fix pdp11_expand_epilogue (PR target/107841)

2023-07-13 Thread Paul Koning via Gcc-patches
> On Jul 13, 2023, at 12:47 PM, Mikael Pettersson wrote: > > If the stack frame only contains an alloca area, then > pdp11_expand_epilogue fails to deallocate it, resulting > in callee-saved registers and the return address being > restored from the wrong stack slots. Fixed by adding > ||

Re: [PATCH V4, rs6000] Disable generation of scalar modulo instructions

2023-07-13 Thread Pat Haugen via Gcc-patches
Ping. On 6/30/23 2:26 PM, Pat Haugen via Gcc-patches wrote: Updated from prior version to address latest review comment (simplify umod3). Disable generation of scalar modulo instructions. It was recently discovered that the scalar modulo instructions can suffer noticeable performance issues

Re: [PATCH 12/19]middle-end: implement loop peeling and IV updates for early break.

2023-07-13 Thread Richard Biener via Gcc-patches
On Wed, 28 Jun 2023, Tamar Christina wrote: > Hi All, > > This patch updates the peeling code to maintain LCSSA during peeling. > The rewrite also naturally takes into account multiple exits and so it didn't > make sense to split them off. > > For the purposes of peeling the only change for

Re: [PATCH] fix pdp11_expand_epilogue (PR target/107841)

2023-07-13 Thread Paul Koning via Gcc-patches
> On Jul 13, 2023, at 12:47 PM, Mikael Pettersson wrote: > > If the stack frame only contains an alloca area, then > pdp11_expand_epilogue fails to deallocate it, resulting > in callee-saved registers and the return address being > restored from the wrong stack slots. Fixed by adding > ||

Re: [PATCH] fix pdp11_expand_epilogue (PR target/107841)

2023-07-13 Thread Jeff Law via Gcc-patches
On 7/13/23 11:46, Paul Koning via Gcc-patches wrote: On Jul 13, 2023, at 12:47 PM, Mikael Pettersson wrote: If the stack frame only contains an alloca area, then pdp11_expand_epilogue fails to deallocate it, resulting in callee-saved registers and the return address being restored from

[PATCH v2] c++: wrong error with static constexpr var in tmpl [PR109876]

2023-07-13 Thread Marek Polacek via Gcc-patches
On Fri, May 26, 2023 at 09:47:10PM -0400, Jason Merrill wrote: > On 5/26/23 19:18, Marek Polacek wrote: > > Since r8-509, we'll no longer create a static temporary var for > > the initializer '{ 1, 2 }' for num in the attached test because > > the code in finish_compound_literal is now guarded by

RE: [PATCH 12/19]middle-end: implement loop peeling and IV updates for early break.

2023-07-13 Thread Tamar Christina via Gcc-patches
> -Original Message- > From: Richard Biener > Sent: Thursday, July 13, 2023 6:31 PM > To: Tamar Christina > Cc: gcc-patches@gcc.gnu.org; nd ; j...@ventanamicro.com > Subject: Re: [PATCH 12/19]middle-end: implement loop peeling and IV > updates for early break. > > On Wed, 28 Jun 2023,

Re: [PATCH] m2, build: Use LDLFAGS for mklink

2023-07-13 Thread Gaius Mulley via Gcc-patches
Rainer Orth writes: > When trying to bootstrap current trunk on macOS 14.0 beta 3 with Xcode > 15 beta 4, the build failed running mklink in stage 2: > > unset CC ; m2/boot-bin/mklink -s --langc++ --exit --name m2/mc-boot/main.cc > /vol/gcc/src/hg/master/darwin/gcc/m2/init/mcinit > dyld[55825]:

Re: [x86 PATCH] PR target/110588: Add *bt_setncqi_2 to generate btl

2023-07-13 Thread Uros Bizjak via Gcc-patches
On Thu, Jul 13, 2023 at 7:10 PM Roger Sayle wrote: > > > This patch resolves PR target/110588 to catch another case in combine > where the i386 backend should be generating a btl instruction. This adds > another define_insn_and_split to recognize the RTL representation for this > case. > > I

[PATCH] c++: copy elision of object arg in static memfn call [PR110441]

2023-07-13 Thread Patrick Palka via Gcc-patches
Bootstrapped and regtested on x86_64-pc-linux-gnu, does this look OK for trunk? -- >8 -- Here the call A().f() is represented as a COMPOUND_EXPR whose first operand is the otherwise unused object argument A() and second operand is the call result (both are TARGET_EXPRs). Within the return

<    1   2