Re: [PATCH v2] RISC-V: Support RVV VFCVT.XU.F.V rounding mode intrinsic API

2023-08-16 Thread Kito Cheng via Gcc-patches
lgtm On Wed, Aug 16, 2023 at 2:21 PM Pan Li via Gcc-patches wrote: > > From: Pan Li > > This patch would like to support the rounding mode API for the > VFCVT.XU.F.V as the below samples. > > * __riscv_vfcvt_xu_f_v_u32m1_rm > * __riscv_vfcvt_xu_f_v_u32m1_rm_m > > Signed-off-by: Pan Li > > gcc/C

RE: [PATCH v2] RISC-V: Support RVV VFCVT.XU.F.V rounding mode intrinsic API

2023-08-16 Thread Li, Pan2 via Gcc-patches
Committed, thanks Kito. Pan -Original Message- From: Kito Cheng Sent: Wednesday, August 16, 2023 3:02 PM To: Li, Pan2 Cc: gcc-patches@gcc.gnu.org; juzhe.zh...@rivai.ai; Wang, Yanzhang Subject: Re: [PATCH v2] RISC-V: Support RVV VFCVT.XU.F.V rounding mode intrinsic API lgtm On Wed,

Re: [PATCH v2] RISC-V: Support RVV VFCVT.F.X.V and VFCVT.F.XU.V rounding mode intrinsic API

2023-08-16 Thread Kito Cheng via Gcc-patches
lgtm On Wed, Aug 16, 2023 at 2:51 PM wrote: > From: Pan Li > > This patch would like to support the rounding mode API for the > VFCVT.F.X.V and VFCVT.F.XU.V as the below samples. > > * __riscv_vfcvt_f_x_v_f32m1_rm > * __riscv_vfcvt_f_x_v_f32m1_rm_m > * __riscv_vfcvt_f_xu_v_f32m1_rm > * __riscv_

RE: [PATCH v2] RISC-V: Support RVV VFCVT.F.X.V and VFCVT.F.XU.V rounding mode intrinsic API

2023-08-16 Thread Li, Pan2 via Gcc-patches
Committed, thanks Kito. Pan From: Kito Cheng Sent: Wednesday, August 16, 2023 3:12 PM To: Li, Pan2 Cc: gcc-patches@gcc.gnu.org; juzhe.zh...@rivai.ai; Wang, Yanzhang Subject: Re: [PATCH v2] RISC-V: Support RVV VFCVT.F.X.V and VFCVT.F.XU.V rounding mode intrinsic API lgtm On Wed, Aug 16, 202

Re: [PATCH] Software mitigation: Disable gather generation in vectorization for GDS affected Intel Processors.

2023-08-16 Thread Hongtao Liu via Gcc-patches
On Fri, Aug 11, 2023 at 8:38 AM liuhongt wrote: > > For more details of GDS (Gather Data Sampling), refer to > https://www.intel.com/content/www/us/en/developer/articles/technical/software-security-guidance/advisory-guidance/gather-data-sampling.html > > After microcode update, there's performance

Re: [PATCH V2] Support -m[no-]gather -m[no-]scatter to enable/disable vectorization for all gather/scatter instructions

2023-08-16 Thread Hongtao Liu via Gcc-patches
On Mon, Aug 14, 2023 at 10:40 AM Hongtao Liu wrote: > > On Fri, Aug 11, 2023 at 2:02 PM liuhongt via Gcc-patches > wrote: > > > > Rename original use_gather to use_gather_8parts, Support > > -mtune-ctrl={,^}use_gather to set/clear tune features > > use_gather_{2parts, 4parts, 8parts}. Support the

[PATCH v2] RISC-V: Support RVV VFWCVT.X.F.V rounding mode intrinsic API

2023-08-16 Thread Pan Li via Gcc-patches
From: Pan Li This patch would like to support the rounding mode API for the VFWCVT.X.F.V as the below samples. * __riscv_vfwcvt_x_f_v_i64m2_rm * __riscv_vfwcvt_x_f_v_i64m2_rm_m Signed-off-by: Pan Li gcc/ChangeLog: * config/riscv/riscv-vector-builtins-bases.cc (BASE): New decl

Re: [PATCH v2] RISC-V: Support RVV VFWCVT.X.F.V rounding mode intrinsic API

2023-08-16 Thread Kito Cheng via Gcc-patches
lgtm On Wed, Aug 16, 2023 at 3:32 PM wrote: > From: Pan Li > > This patch would like to support the rounding mode API for the > VFWCVT.X.F.V as the below samples. > > * __riscv_vfwcvt_x_f_v_i64m2_rm > * __riscv_vfwcvt_x_f_v_i64m2_rm_m > > Signed-off-by: Pan Li > > gcc/ChangeLog: > > *

RE: [PATCH v2] RISC-V: Support RVV VFWCVT.X.F.V rounding mode intrinsic API

2023-08-16 Thread Li, Pan2 via Gcc-patches
Committed, thanks Kito. Pan From: Kito Cheng Sent: Wednesday, August 16, 2023 3:38 PM To: Li, Pan2 Cc: gcc-patches@gcc.gnu.org; juzhe.zh...@rivai.ai; Wang, Yanzhang Subject: Re: [PATCH v2] RISC-V: Support RVV VFWCVT.X.F.V rounding mode intrinsic API lgtm On Wed, Aug 16, 2023 at 3:32 PM mai

Re: [RFC] GCC Security policy

2023-08-16 Thread Alexander Monakov
On Tue, 15 Aug 2023, Paul Koning wrote: > Now I'm confused. I thought the whole point of what GCC is trying to, and > wants to document, is that it DOES preserve security properties. If the > source code is standards-compliant and contains algorithms free of security > holes, then the compiler

[PATCH v2] RISC-V: Support RVV VFWCVT.XU.F.V rounding mode intrinsic API

2023-08-16 Thread Pan Li via Gcc-patches
From: Pan Li This patch would like to support the rounding mode API for the VFWCVT.X.F.V as the below samples. * __riscv_vfwcvt_xu_f_v_u64m2_rm * __riscv_vfwcvt_xu_f_v_u64m2_rm_m Signed-off-by: Pan Li gcc/ChangeLog: * config/riscv/riscv-vector-builtins-bases.cc (BASE): New de

Re: [RFC] GCC Security policy

2023-08-16 Thread Alexander Monakov
On Tue, 15 Aug 2023, David Malcolm via Gcc-patches wrote: > I'd prefer to reword this, as libgccjit was a poor choice of name for > the library (sorry!), to make it clearer it can be used for both ahead- > of-time and just-in-time compilation, and that as used for compilation, > the host conside

Re: [PATCH 1/4][V4][RISC-V] support cm.push cm.pop cm.popret in zcmp

2023-08-16 Thread Kito Cheng via Gcc-patches
Hi Fei: Tried to use Jiawei's patch to test this patch and found some issue: > @@ -5430,13 +5632,15 @@ riscv_expand_prologue (void) >/* Save the registers. */ >if ((frame->mask | frame->fmask) != 0) > { > - HOST_WIDE_INT step1 = riscv_first_stack_step (frame, remaining_size);

Re: [RFC PATCH v2 1/2] RISC-V: __builtin_riscv_pause for all environment

2023-08-16 Thread Philipp Tomsich
On Wed, 16 Aug 2023 at 03:27, Jeff Law via Gcc-patches wrote: > > > > On 8/9/23 20:25, Tsukasa OI wrote: > > From: Tsukasa OI > > > > The "pause" RISC-V hint instruction requires the 'Zihintpause' extension > > (in the assembler). However, GCC emits "pause" unconditionally, making > > an assembl

Re: [PATCH 1/4][V4][RISC-V] support cm.push cm.pop cm.popret in zcmp

2023-08-16 Thread Kito Cheng via Gcc-patches
Another fail case for CFI: $ riscv64-unknown-elf-gcc _mulhc3.i -march=rv64imafd_zicsr_zifencei_zca_zcmp -mabi=lp64d -g -O2 -o _mulhc3.s typedef float a __attribute__((mode(HF))); b, c; f() { a a, d, e = a + d; if (g() && e) c = b; } 0x10e508a maybe_record_trace_start ../../../../r

[PATCH] RISC-V: Support simplify (-1-x) for vector.

2023-08-16 Thread yanzhang.wang--- via Gcc-patches
From: Yanzhang Wang The pattern is enabled for scalar but not for vector. The patch try to make it consistent and will convert below code, shortcut_for_riscv_vrsub_case_1_32: vl1re32.v v1,0(a1) vsetvli zero,a2,e32,m1,ta,ma vrsub.viv1,v1,-1 vs1r.v v1

Re: [RFC] [v2] Extend fold_vec_perm to handle VLA vectors

2023-08-16 Thread Prathamesh Kulkarni via Gcc-patches
On Tue, 15 Aug 2023 at 16:59, Prathamesh Kulkarni wrote: > > On Mon, 14 Aug 2023 at 18:23, Richard Sandiford > wrote: > > > > Prathamesh Kulkarni writes: > > > On Thu, 10 Aug 2023 at 21:27, Richard Sandiford > > > wrote: > > >> > > >> Prathamesh Kulkarni writes: > > >> >> static bool > > >> >>

Re: Re: [PATCH 1/4][V4][RISC-V] support cm.push cm.pop cm.popret in zcmp

2023-08-16 Thread Fei Gao
Hi Kito Thanks for reporting these 2 issues.  Let me check and feedback you soon.  BR Fei On 2023-08-16 16:38  Kito Cheng wrote: > >Another fail case for CFI: > >$ riscv64-unknown-elf-gcc _mulhc3.i >-march=rv64imafd_zicsr_zifencei_zca_zcmp -mabi=lp64d -g  -O2  -o >_mulhc3.s > >typedef float a _

Re: [RFC] GCC Security policy

2023-08-16 Thread Toon Moene
On 8/16/23 01:07, Alexander Monakov wrote: On Tue, 15 Aug 2023, Siddhesh Poyarekar wrote: Thanks, this is nicer (see notes below). My main concern is that we shouldn't pretend there's some method of verifying that arbitrary source code is "safe" to pass to an unsandboxed compiler, nor should w

Re: [PATCH] IFN: Fix vector extraction into promoted subreg.

2023-08-16 Thread Robin Dapp via Gcc-patches
> However: > > | #define vec_extract_direct { 3, 3, false } > > This looks wrong. The numbers are argument numbers (or -1 for a return > value). vec_extract only takes 2 arguments, so 3 looks to be out-of-range. > > | #define direct_vec_extract_optab_supported_p direct_optab_supported_p > > I

[PATCH v1] RISC-V: Fix one build error for template default arg

2023-08-16 Thread Pan Li via Gcc-patches
From: Pan Li In some build option combination, the default value may result in below error. This patch would like to fix it by passing a explict argument. riscv-vector-builtins-bases.cc:2495:24: error: invalid use of template-name \ ‘riscv_vector::vfcvt_f’ without an argument list Signed-off-

Re: [PATCH v1] RISC-V: Fix one build error for template default arg

2023-08-16 Thread Kito Cheng via Gcc-patches
ok On Wed, Aug 16, 2023 at 5:44 PM Pan Li via Gcc-patches wrote: > > From: Pan Li > > In some build option combination, the default value may result in > below error. This patch would like to fix it by passing a explict > argument. > > riscv-vector-builtins-bases.cc:2495:24: error: invalid use o

Re: [RFC] [v2] Extend fold_vec_perm to handle VLA vectors

2023-08-16 Thread Richard Sandiford via Gcc-patches
Prathamesh Kulkarni writes: >> Unfortunately, the patch regressed following tests on ppc64le and >> armhf respectively: >> gcc.target/powerpc/vec-perm-ctor.c scan-tree-dump-not optimized >> "VIEW_CONVERT_EXPR" >> gcc.dg/tree-ssa/forwprop-20.c scan-tree-dump-not forwprop1 "VEC_PERM_EXPR" >> >> This

Re: [PATCH v2] RISC-V: Support RVV VFWCVT.XU.F.V rounding mode intrinsic API

2023-08-16 Thread Kito Cheng via Gcc-patches
ok On Wed, Aug 16, 2023 at 4:10 PM Pan Li via Gcc-patches wrote: > > From: Pan Li > > This patch would like to support the rounding mode API for the > VFWCVT.X.F.V as the below samples. > > * __riscv_vfwcvt_xu_f_v_u64m2_rm > * __riscv_vfwcvt_xu_f_v_u64m2_rm_m > > Signed-off-by: Pan Li > > gcc/C

RE: [PATCH v1] RISC-V: Fix one build error for template default arg

2023-08-16 Thread Li, Pan2 via Gcc-patches
Committed, thanks Kito. Pan -Original Message- From: Kito Cheng Sent: Wednesday, August 16, 2023 5:49 PM To: Li, Pan2 Cc: gcc-patches@gcc.gnu.org; juzhe.zh...@rivai.ai; kito.ch...@sifive.com; Wang, Yanzhang Subject: Re: [PATCH v1] RISC-V: Fix one build error for template default arg

RE: [PATCH v2] RISC-V: Support RVV VFWCVT.XU.F.V rounding mode intrinsic API

2023-08-16 Thread Li, Pan2 via Gcc-patches
Committed, thanks Kito. Pan -Original Message- From: Kito Cheng Sent: Wednesday, August 16, 2023 5:54 PM To: Li, Pan2 Cc: gcc-patches@gcc.gnu.org; juzhe.zh...@rivai.ai; kito.ch...@sifive.com; Wang, Yanzhang Subject: Re: [PATCH v2] RISC-V: Support RVV VFWCVT.XU.F.V rounding mode intr

Re: [PATCH] IFN: Fix vector extraction into promoted subreg.

2023-08-16 Thread Richard Sandiford via Gcc-patches
Robin Dapp writes: >> However: >> >> | #define vec_extract_direct { 3, 3, false } >> >> This looks wrong. The numbers are argument numbers (or -1 for a return >> value). vec_extract only takes 2 arguments, so 3 looks to be out-of-range. >> >> | #define direct_vec_extract_optab_supported_p dir

Re: [PATCH v3] LoongArch:Implement 128-bit floating point functions in gcc.

2023-08-16 Thread chenxiaolong
Thanks for the tip! Similar functions (e.g. __builtin_fabsf128 (_Float128 a) are already supported by the compiler and can be handled correctly, but functions that can be implemented on the LoongArch architecture directly using the "bstrins" directive (e.g. fabsq, copysignq, etc.) are better optimi

Re: [PATCH v2][GCC] aarch64: Add support for Cortex-A720 CPU

2023-08-16 Thread Richard Sandiford via Gcc-patches
Richard Ball writes: > v2: Add missing PROFILE feature flag. > > This patch adds support for the Cortex-A720 CPU to GCC. > > No regressions on aarch64-none-elf. > > Ok for master? > > gcc/ChangeLog: > > * config/aarch64/aarch64-cores.def (AARCH64_CORE): Add Cortex- > A720 CPU. >

Re: [WIP RFC] Add support for keyword-based attributes

2023-08-16 Thread Richard Sandiford via Gcc-patches
Joseph Myers writes: > On Mon, 17 Jul 2023, Michael Matz via Gcc-patches wrote: > >> So, essentially you want unignorable attributes, right? Then implement >> exactly that: add one new keyword "__known_attribute__" (invent a better >> name, maybe :) ), semantics exactly as with __attribute__ (i

Re: [PATCH v2 1/2] libstdc++: Implement more maintainable header

2023-08-16 Thread Jonathan Wakely via Gcc-patches
On Sun, 13 Aug 2023 at 21:15, Arsen Arsenović via Libstdc++ wrote: > > This commit replaces the ad-hoc logic in with an AutoGen > database that (mostly) declaratively generates a version.h bit which > combines all of the FTM logic across all headers together. > > This generated header defines mac

Re: [PATCH v2 2/2] libstdc++: Replace all manual FTM definitions and use

2023-08-16 Thread Jonathan Wakely via Gcc-patches
On Sun, 13 Aug 2023 at 21:16, Arsen Arsenović via Libstdc++ wrote: > > libstdc++-v3/ChangeLog: > > * libsupc++/typeinfo: Switch to bits/version.h for > __cpp_lib_constexpr_typeinfo. > * libsupc++/new: Switch to bits/version.h for > __cpp_lib_{launder,hardware_interf

Re: [PATCH] libstdc++ Add cstdarg to freestanding

2023-08-16 Thread Jonathan Wakely via Gcc-patches
On Fri, 21 Jul 2023 at 22:23, Paul M. Bendixen via Libstdc++ wrote: > > P1642 includes the header cstdarg to the freestanding implementation. > This was probably left out by accident, this patch puts it in. > Since this is one of the headers that go in whole cloth, there should be no > further act

Re: [RFC] [v2] Extend fold_vec_perm to handle VLA vectors

2023-08-16 Thread Prathamesh Kulkarni via Gcc-patches
On Wed, 16 Aug 2023 at 15:21, Richard Sandiford wrote: > > Prathamesh Kulkarni writes: > >> Unfortunately, the patch regressed following tests on ppc64le and > >> armhf respectively: > >> gcc.target/powerpc/vec-perm-ctor.c scan-tree-dump-not optimized > >> "VIEW_CONVERT_EXPR" > >> gcc.dg/tree-ssa

Re: [RFC] GCC Security policy

2023-08-16 Thread Siddhesh Poyarekar
On 2023-08-16 04:25, Alexander Monakov wrote: On Tue, 15 Aug 2023, David Malcolm via Gcc-patches wrote: I'd prefer to reword this, as libgccjit was a poor choice of name for the library (sorry!), to make it clearer it can be used for both ahead- of-time and just-in-time compilation, and that a

Re: [RFC] GCC Security policy

2023-08-16 Thread Alexander Monakov
> > Unfortunately the lines that follow: > > > >> either sanitized by an external program to allow only trusted, > >> safe compilation and execution in the context of the application, > > > > again make a reference to a purely theoretical "external program" that > > is not going to ex

Re: [RFC] GCC Security policy

2023-08-16 Thread Siddhesh Poyarekar
On 2023-08-15 19:07, Alexander Monakov wrote: On Tue, 15 Aug 2023, Siddhesh Poyarekar wrote: Thanks, this is nicer (see notes below). My main concern is that we shouldn't pretend there's some method of verifying that arbitrary source code is "safe" to pass to an unsandboxed compiler, nor shoul

[PATCH v1] RISC-V: Support RVV VFNCVT.X.F.W rounding mode intrinsic API

2023-08-16 Thread Pan Li via Gcc-patches
From: Pan Li This patch would like to support the rounding mode API for the VFNCVT.X.F.W as the below samples. * __riscv_vfncvt_x_f_w_i16mf2_rm * __riscv_vfncvt_x_f_w_i16mf2_rm_m Signed-off-by: Pan Li gcc/ChangeLog: * config/riscv/riscv-vector-builtins-bases.cc (class vfncvt_

Re: [RFC] GCC Security policy

2023-08-16 Thread Paul Koning via Gcc-patches
> On Aug 16, 2023, at 3:53 AM, Alexander Monakov wrote: > >> ... >> Is "timing-safety" a security property? Not the way I understand that >> term. It sounds like another way to say that the code meets real time >> constraints or requirements. > > I meant in the sense of not admitting timing

[PATCH] gimple_fold: Support COND_LEN_FNMA/COND_LEN_FMS/COND_LEN_FNMS gimple fold

2023-08-16 Thread Juzhe-Zhong
Hi, Richard and Richi. Currently, GCC support COND_LEN_FMA for floating-point **NO** -ffast-math. It's supported in tree-ssa-math-opts.cc. However, GCC failed to support COND_LEN_FNMA/COND_LEN_FMS/COND_LEN_FNMS. Consider this following case: #define TEST_TYPE(TYPE)

Re: [PATCH v3] LoongArch:Implement 128-bit floating point functions in gcc.

2023-08-16 Thread Joseph Myers
On Wed, 16 Aug 2023, chenxiaolong wrote: > Thanks for the tip! Similar functions (e.g. __builtin_fabsf128 > (_Float128 a) are already supported by the compiler and can be handled > correctly, but functions that can be implemented on the LoongArch > architecture directly using the "bstrins" directi

Re: [PATCH v2 2/2] libstdc++: Replace all manual FTM definitions and use

2023-08-16 Thread Arsen Arsenović via Gcc-patches
Jonathan Wakely writes: > [..snip..] > Thanks for adding the comments like "// C++ < 20". > > I think in the comment on the #endif can be just __cpp_lib_any > rather than defined(__cpp_lib_any). Similarly for > __cpp_lib_atomic_float in . Oh, and __cpp_lib_atomic_ref. And > in , and several oth

[PATCH] RISC-V: Add COND_LEN_FNMA/COND_LEN_FMS/COND_LEN_FNMS testcases

2023-08-16 Thread Juzhe-Zhong
This patch is depending on middle-end patch: https://gcc.gnu.org/pipermail/gcc-patches/2023-August/627621.html We already had COND_LEN_FNMA/COND_LEN_FMS/COND_FNMS patterns. Remove TARGET_PREFERRED_ELSE_VALUE since it forbid the COND_LEN_FMS/COND_LEN_FNMS STMT fold. gcc/ChangeLog: * con

Re: [WIP RFC] Add support for keyword-based attributes

2023-08-16 Thread Joseph Myers
On Wed, 16 Aug 2023, Richard Sandiford via Gcc-patches wrote: > Would it be OK to add support for: > > [[__extension__ ...]] > > to suppress the pedwarn about using [[]] prior to C2X? Then we can That seems like a plausible feature to add. -- Joseph S. Myers jos...@codesourcery.com

[WIP RFC v2] analyzer: Add support of placement new and improved operator new [PR105948]

2023-08-16 Thread Benjamin Priour via Gcc-patches
From: benjamin priour Hi, (s/we/the analyzer/) I've been continuing my patch of supporting operator new variants in the analyzer, and have added a few more test cases. > > If "y" is null then the allocation failed and dereferencing "y" will > > cause > > a segfault, not a "use-of-u

Re: [PATCH] RISC-V: Fix reduc_strict_run-1 test case.

2023-08-16 Thread Robin Dapp via Gcc-patches
> But if it's a float16 precision issue then I would have expected both > the computations for the lhs and rhs values to have suffered > similarly. Yeah, right. I didn't look closely enough. The problem is not the reduction but the additional return-value conversion that is omitted when calculat

Re: [PATCH] libstdc++ Add cstdarg to freestanding

2023-08-16 Thread Arsen Arsenović via Gcc-patches
Jonathan Wakely writes: > On Fri, 21 Jul 2023 at 22:23, Paul M. Bendixen via Libstdc++ > wrote: >> >> P1642 includes the header cstdarg to the freestanding implementation. >> This was probably left out by accident, this patch puts it in. >> Since this is one of the headers that go in whole clot

Re: [RFC] GCC Security policy

2023-08-16 Thread Alexander Monakov
On Wed, 16 Aug 2023, Siddhesh Poyarekar wrote: > No I understood the distinction you're trying to make, I just wanted to point > out that the effect isn't all that different. The intent of the wording is > not to prescribe a solution, but to describe what the compiler cannot do and > hence, use

Re: [RFC] GCC Security policy

2023-08-16 Thread Siddhesh Poyarekar
On 2023-08-16 11:06, Alexander Monakov wrote: No I understood the distinction you're trying to make, I just wanted to point out that the effect isn't all that different. The intent of the wording is not to prescribe a solution, but to describe what the compiler cannot do and hence, users must fi

Another bug for __builtin_object_size? (Or expected behavior)

2023-08-16 Thread Qing Zhao via Gcc-patches
Jakub and Sid, During my study, I found an interesting behavior for the following small testing case: #include #include struct fixed { size_t foo; char b; char array[10]; } q = {}; #define noinline __attribute__((__noinline__)) static void noinline bar () { struct fixed *p = &q;

Re: [RFC] GCC Security policy

2023-08-16 Thread Alexander Monakov
On Wed, 16 Aug 2023, Siddhesh Poyarekar wrote: > > Yeah, indicating scenarios that fall outside of intended guarantees should > > be helpful. I feel the exact text quoted above will be hard to decipher > > without knowing the discussion that led to it. Some sort of supplementary > > section with

Re: [PATCH] libstdc++: Implement P2770R0 changes to join_view / join_with_view

2023-08-16 Thread Patrick Palka via Gcc-patches
On Mon, Apr 17, 2023 at 9:39 AM Patrick Palka wrote: > > This C++23 paper fixes a bug in these views when adapting a certain kind > of non-forward range, and we treat it as a DR against C++20. > > Tested on x86_64-pc-linux-gnu, does this look OK for GCC 13? This > is an ABI change for join_view s

Re: [PATCH 1/2] libstdc++: Convert _RangeAdaptorClosure into a CRTP class [PR108827]

2023-08-16 Thread Patrick Palka via Gcc-patches
On Sun, Apr 16, 2023 at 11:24 PM Patrick Palka wrote: > > On Fri, 14 Apr 2023, Patrick Palka wrote: > > > Using the CRTP idiom for this base class avoids bloating the size of a > > pipeline when adding distinct empty range adaptor closure objects to it, > > as detailed in section 4.1 of P2387R3. >

Re: [PATCH] libstdc++: Make __max_size_type and __max_diff_type structural

2023-08-16 Thread Patrick Palka via Gcc-patches
On Mon, Apr 24, 2023 at 12:23 PM Patrick Palka wrote: > > This patch makes these integer-class type structural types by changing > their private data members into public ones, which allows them to be > used as NTTP types. I'm not sure if this is required by the standard > but it seems handy. > >

[pushed][LRA]: Spill pseudos assigned to fp when fp->sp elimination became impossible

2023-08-16 Thread Vladimir Makarov via Gcc-patches
The attached patch fixes recently found wrong insn removal in LRA port for AVR. The patch was successfully tested and bootstrapped on x86-64 and aarch64. commit 748a77558ff37761faa234e19327ad1decaace33 Author: Vladimir N. Makarov Date: Wed Aug 16 09:13:54 2023 -0400 [LRA]: Spill pseudo

[committed] libstdc++: Fix comment naming upstream PSTL test file

2023-08-16 Thread Jonathan Wakely via Gcc-patches
Pushed to trunk. -- >8 -- These tests were derived from set.pass.cpp not set.pass.cc, specifically pstl/test/std/algorithms/alg.sorting/alg.set.operations/set.pass.cpp in the LLVM repo. libstdc++-v3/ChangeLog: * testsuite/25_algorithms/pstl/alg_sorting/set_difference.cc: Fix nam

[PATCH] libgccjit: Add support for `restrict` attribute on function parameters

2023-08-16 Thread Guillaume Gomez via Gcc-patches
Hi, This patch adds the possibility to specify the __restrict__ attribute for function parameters. It is used by the Rust GCC backend. Thanks in advance for the review. From 8cafadb8409094c7fc66a1073397942a60cb27b3 Mon Sep 17 00:00:00 2001 From: Guillaume Gomez Date: Fri, 11 Aug 2023 22:48:11 +0

Re: [PATCH] libstdc++ Add cstdarg to freestanding

2023-08-16 Thread Paul M. Bendixen via Gcc-patches
Yes, the other files are in another committee proposal, and I'm working my way through the proposals one by one. Thank you for the feedback, I'll update and resend /Paul Den ons. 16. aug. 2023 kl. 15.51 skrev Arsen Arsenović : > > Jonathan Wakely writes: > > > On Fri, 21 Jul 2023 at 22:23, Paul

Re: [PATCH] libstdc++: Implement P2770R0 changes to join_view / join_with_view

2023-08-16 Thread Jonathan Wakely via Gcc-patches
On Wed, 16 Aug 2023 at 17:05, Patrick Palka via Libstdc++ wrote: > > On Mon, Apr 17, 2023 at 9:39 AM Patrick Palka wrote: > > > > This C++23 paper fixes a bug in these views when adapting a certain kind > > of non-forward range, and we treat it as a DR against C++20. > > > > Tested on x86_64-pc-l

Re: [PATCH] libstdc++: Make __max_size_type and __max_diff_type structural

2023-08-16 Thread Jonathan Wakely via Gcc-patches
On Wed, 16 Aug 2023 at 17:07, Patrick Palka via Libstdc++ wrote: > > On Mon, Apr 24, 2023 at 12:23 PM Patrick Palka wrote: > > > > This patch makes these integer-class type structural types by changing > > their private data members into public ones, which allows them to be > > used as NTTP types

Re: [PATCH 1/2] libstdc++: Convert _RangeAdaptorClosure into a CRTP class [PR108827]

2023-08-16 Thread Jonathan Wakely via Gcc-patches
On Wed, 16 Aug 2023 at 17:06, Patrick Palka via Libstdc++ wrote: > > On Sun, Apr 16, 2023 at 11:24 PM Patrick Palka wrote: > > > > On Fri, 14 Apr 2023, Patrick Palka wrote: > > > > > Using the CRTP idiom for this base class avoids bloating the size of a > > > pipeline when adding distinct empty r

Re: [PATCH] libstdc++: fix memory clobbering in std::vector [PR110879]

2023-08-16 Thread Jonathan Wakely via Gcc-patches
On 09/08/23 01:34 +0300, Vladimir Palevich wrote: Because of the recent change in _M_realloc_insert and _M_default_append, call to deallocate was ordered after assignment to class members of std::vector (in the guard destructor), which is causing said members to be call-clobbered. This is prevent

Re: [PATCH] config-list.mk Darwin: Use --with-gnu-as

2023-08-16 Thread Jan-Benedict Glaw
Hi Rainer! On Tue, 2023-08-15 21:49:37 +0200, Rainer Orth wrote: > > config-list.mk Darwin: Use --with-gnu-as for mass-building tests > > > > As `config-list.mk` is probably mostly used on Linux system, where > > Apple's tools aren't around. Let's use --with-gnu-as instead to have > > an useable

[committed] libstdc++: Update __cplusplus value for C++23 in version.def

2023-08-16 Thread Jonathan Wakely via Gcc-patches
Tested x86_64-linux, pushed to trunk. -- >8 -- libstdc++-v3/ChangeLog: * include/bits/version.def (stds): Update value for C++23. * include/bits/version.h: Regenerate. --- libstdc++-v3/include/bits/version.def | 2 +- libstdc++-v3/include/bits/version.h | 72 +

[committed] libstdc++: Fix std::basic_string::resize_and_overwrite

2023-08-16 Thread Jonathan Wakely via Gcc-patches
Tested x86_64-linux, pushed to trunk. This should be backported to gcc-12 and gcc-13 too (without the std::format test changes). -- >8 -- The callable used for resize_and_overwrite was being passed the string's expanded capacity, which might be greater than the new size being requested. This is n

Re: RISC-V: Added support for CRC.

2023-08-16 Thread Alexander Monakov
On Tue, 15 Aug 2023, Jeff Law wrote: > Because if the compiler can optimize it automatically, then the projects have > to do literally nothing to take advantage of it. They just compile normally > and their bitwise CRC gets optimized down to either a table lookup or a clmul > variant. That's t

[PATCH] build: Allow for Xcode 15 ld -v output

2023-08-16 Thread Rainer Orth
Since Xcode 15 beta 6, ld -v output differs from previous versions: * macOS 13/Xcode 14: @(#)PROGRAM:ld PROJECT:ld64-857.1 * macOS 14/Xcode 15: @(#)PROGRAM:ld PROJECT:dyld-1015.1 configure cannot handle the new form, so LD64_VERSION isn't set. This patch fixes this. The autoconf manual

[PATCH] fixincludes: Update darwin_flt_eval_method for macOS 14

2023-08-16 Thread Rainer Orth
On macOS 14, a guard in changed: -- MacOSX13.3.sdk/usr/include/math.h2023-04-19 01:54:44 +++ MacOSX14.0.sdk/usr/include/math.h 2023-08-01 08:42:43 @@ -22,0 +23 @@ + @@ -43 +44 @@ -#if __FLT_EVAL_METHOD__ == 0 +#if __FLT_EVAL_METHOD__ == 0 || __FLT_EVAL_METHOD__ == -1 @@ -49 +50 @@ -#elif __

Re: [PATCH] build: Allow for Xcode 15 ld -v output

2023-08-16 Thread Iain Sandoe
Hi Rainer, > On 16 Aug 2023, at 20:13, Rainer Orth wrote: > > Since Xcode 15 beta 6, ld -v output differs from previous versions: > > * macOS 13/Xcode 14: > > @(#)PROGRAM:ld PROJECT:ld64-857.1 > > * macOS 14/Xcode 15: > > @(#)PROGRAM:ld PROJECT:dyld-1015.1 > > configure cannot handle th

Re: [PATCH] fixincludes: Update darwin_flt_eval_method for macOS 14

2023-08-16 Thread Iain Sandoe
Hi Rainer, > On 16 Aug 2023, at 20:20, Rainer Orth wrote: > > On macOS 14, a guard in changed: > > -- MacOSX13.3.sdk/usr/include/math.h 2023-04-19 01:54:44 > +++ MacOSX14.0.sdk/usr/include/math.h 2023-08-01 08:42:43 > @@ -22,0 +23 @@ > + > @@ -43 +44 @@ > -#if __FLT_EVAL_METHOD__ == 0 > +#if

Re: [PATCH] build: Allow for Xcode 15 ld -v output

2023-08-16 Thread Rainer Orth
Hi Iain, > OK, thanks > (I do not yet have an xcode-15 or darwin23 setup) Xcode 15 beta claims to also support macOS 13/Darwin 22, though I haven't tried this. > After some bake time, this will need backporting to open branches, to avoid > those also failing in the same way, Agreed: those inc

Re: [PATCH] fixincludes: Update darwin_flt_eval_method for macOS 14

2023-08-16 Thread Bruce Korb via Gcc-patches
Looks reasonable to me! On 8/16/23 12:20, Rainer Orth wrote: On macOS 14, a guard in changed: -- MacOSX13.3.sdk/usr/include/math.h2023-04-19 01:54:44 +++ MacOSX14.0.sdk/usr/include/math.h 2023-08-01 08:42:43 @@ -22,0 +23 @@ + @@ -43 +44 @@ -#if __FLT_EVAL_METHOD__ == 0 +#if __FLT_EVAL_ME

Re: [PATCH v3][RFC] c-family: Implement __has_feature and __has_extension [PR60512]

2023-08-16 Thread Iain Sandoe
Hi Alex, > On 3 Aug 2023, at 10:21, Alex Coplan wrote: > > This patch implements clang's __has_feature and __has_extension in GCC. > This is a v3 which addresses feedback for the v2 patch posted here: > > https://gcc.gnu.org/pipermail/gcc-patches/2023-August/626058.html > > Main changes sinc

Re: RISC-V: Added support for CRC.

2023-08-16 Thread Philipp Tomsich
On Wed, 16 Aug 2023 at 21:10, Alexander Monakov wrote: > > > On Tue, 15 Aug 2023, Jeff Law wrote: > > > Because if the compiler can optimize it automatically, then the projects > > have > > to do literally nothing to take advantage of it. They just compile normally > > and their bitwise CRC gets

Re: [PATCH] libgccjit: Add support for `restrict` attribute on function parameters

2023-08-16 Thread Guillaume Gomez via Gcc-patches
My apologies, forgot to run the commit checkers. Here's the commit with the errors fixed. Le mer. 16 août 2023 à 18:32, Guillaume Gomez a écrit : > > Hi, > > This patch adds the possibility to specify the __restrict__ attribute > for function parameters. It is used by the Rust GCC backend. > > Th

Re: Another bug for __builtin_object_size? (Or expected behavior)

2023-08-16 Thread Qing Zhao via Gcc-patches
FYI, I filed a new PR https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111040 to record this issue. Qing > On Aug 16, 2023, at 11:59 AM, Qing Zhao via Gcc-patches > wrote: > > Jakub and Sid, > > During my study, I found an interesting behavior for the following small > testing case: > > #includ

[PATCH,committed] Fortran: fix memleak for character,value dummy of bind(c) procedure [PR110360]

2023-08-16 Thread Harald Anlauf via Gcc-patches
Dear all, the attached simple patch fixes a memleak in the frontend when a character literal is passed to a character,value dummy of a bind(c) procedure, by relying on gfc_replace_expr to do the cleanup. (This can be tested e.g. with gfortran.dg/bind_c_usage_13.f03 and running f951 under valgrind)

[PATCH] Drop unused enum vrp_mode.

2023-08-16 Thread Sergei Trofimovich via Gcc-patches
From: Sergei Trofimovich Follow removal of EVRP and clean up unused defines. gcc/ * flag-types.h (vrp_mode): Remove unused. --- gcc/flag-types.h | 7 --- 1 file changed, 7 deletions(-) diff --git a/gcc/flag-types.h b/gcc/flag-types.h index 36305de589e..7466c1106f2 100644 --- a/gcc/

Re: RISC-V: Added support for CRC.

2023-08-16 Thread Paul Koning via Gcc-patches
> On Aug 16, 2023, at 3:42 PM, Philipp Tomsich wrote: > > On Wed, 16 Aug 2023 at 21:10, Alexander Monakov wrote: >> >> >> On Tue, 15 Aug 2023, Jeff Law wrote: >> >>> Because if the compiler can optimize it automatically, then the projects >>> have >>> to do literally nothing to take advan

[PING] Re: [PATCH v2] Re: [WIP] Have -Wpointer-sign be enabled by -Wextra, too [PR109836]

2023-08-16 Thread Eric Gallager via Gcc-patches
PING On Tue, Aug 8, 2023 at 8:17 PM Eric Gallager wrote: > > On Tue, May 30, 2023 at 5:42 PM Eric Gallager wrote: > > > > PR109836 is a request to have -Wpointer-sign enabled by default. There > > were points of disagreement raised in the bug report, so I figured > > that maybe as a compromise,

Re: [PATCH v2 1/2] libstdc++: Implement more maintainable header

2023-08-16 Thread David Edelsohn via Gcc-patches
Hi, Arsen This patch broke bootstrap because it has introduced a new GCC build requirement for autogen that is not a previous requirement to build GCC. Previously the repository has included post-processed files. +# AutoGen . +.PHONY: update-version +update-version: + cd ${bits_srcdir} && \

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

2023-08-16 Thread Qing Zhao via Gcc-patches
Hi, After some more studying and consideration, the following is my thoughts: For a structure with FMA annotated with counted_by attribute: (the following small example) struct annotated { size_t foo; char b; char array[] __attribute__((counted_by (foo))); }; #def

Re: [PATCH v2 1/2] libstdc++: Implement more maintainable header

2023-08-16 Thread Jonathan Wakely via Gcc-patches
On Wed, 16 Aug 2023 at 22:39, David Edelsohn wrote: > > Hi, Arsen > > This patch broke bootstrap because it has introduced a new GCC build > requirement for autogen that is not a previous requirement to build GCC. > Previously the repository has included post-processed files. The repo does inc

Re: [PATCH v2 1/2] libstdc++: Implement more maintainable header

2023-08-16 Thread Jonathan Wakely via Gcc-patches
On Wed, 16 Aug 2023 at 22:56, Jonathan Wakely wrote: > > On Wed, 16 Aug 2023 at 22:39, David Edelsohn wrote: > > > > Hi, Arsen > > > > This patch broke bootstrap because it has introduced a new GCC build > > requirement for autogen that is not a previous requirement to build GCC. > > Previousl

Re: [WIP RFC v2] analyzer: Add support of placement new and improved operator new [PR105948]

2023-08-16 Thread David Malcolm via Gcc-patches
On Wed, 2023-08-16 at 14:19 +0200, priour...@gmail.com wrote: > From: benjamin priour > > Hi, > (s/we/the analyzer/) Hi Benjamin, thanks for the updated patch. > > I've been continuing my patch of supporting operator new variants > in the analyzer, and have added a few more test cases. > > >

[PATCH] Add libstdc++-v3/include/bits/version.h to gcc_update touch part

2023-08-16 Thread Andrew Pinski via Gcc-patches
This adds libstdc++-v3/include/bits/version.h so it has the correct timestamp. Committed as obvious after running contrib/gcc_update --touch contrib/ChangeLog: * gcc_update: Add libstdc++-v3/include/bits/version.h. --- contrib/gcc_update | 1 + 1 file changed, 1 insertion(+) diff --git

Re: [PATCH v2 1/2] libstdc++: Implement more maintainable header

2023-08-16 Thread David Edelsohn via Gcc-patches
Was the dependency added to the dependencies in contrib/gcc_update? Otherwise the timestamp can get out of sync in a Git checkout. Thanks, David On Wed, Aug 16, 2023 at 6:20 PM Jonathan Wakely wrote: > On Wed, 16 Aug 2023 at 22:56, Jonathan Wakely wrote: > > > > On Wed, 16 Aug 2023 at 22:39,

Re: [PATCH v2 1/2] libstdc++: Implement more maintainable header

2023-08-16 Thread Andrew Pinski via Gcc-patches
On Wed, Aug 16, 2023 at 3:36 PM David Edelsohn via Gcc-patches wrote: > > Was the dependency added to the dependencies in contrib/gcc_update? > Otherwise the timestamp can get out of sync in a Git checkout. I checked in https://gcc.gnu.org/pipermail/gcc-patches/2023-August/627667.html which just

Re: [PATCH] libstdc++: fix memory clobbering in std::vector [PR110879]

2023-08-16 Thread Jonathan Wakely via Gcc-patches
On 09/08/23 01:34 +0300, Vladimir Palevich wrote: Because of the recent change in _M_realloc_insert and _M_default_append, call to deallocate was ordered after assignment to class members of std::vector (in the guard destructor), which is causing said members to be call-clobbered. This is prevent

Re: [PATCH] Drop unused enum vrp_mode.

2023-08-16 Thread Jeff Law via Gcc-patches
On 8/16/23 14:23, Sergei Trofimovich via Gcc-patches wrote: From: Sergei Trofimovich Follow removal of EVRP and clean up unused defines. gcc/ * flag-types.h (vrp_mode): Remove unused. OK jeff

Re: [PATCH] RISC-V: Fix reduc_strict_run-1 test case.

2023-08-16 Thread Jeff Law via Gcc-patches
On 8/16/23 07:50, Robin Dapp wrote: But if it's a float16 precision issue then I would have expected both the computations for the lhs and rhs values to have suffered similarly. Yeah, right. I didn't look closely enough. The problem is not the reduction but the additional return-value conv

Re: [PATCH] libgccjit: Add support for `restrict` attribute on function parameters

2023-08-16 Thread David Malcolm via Gcc-patches
On Wed, 2023-08-16 at 22:06 +0200, Guillaume Gomez via Jit wrote: > My apologies, forgot to run the commit checkers. Here's the commit > with the errors fixed. > > Le mer. 16 août 2023 à 18:32, Guillaume Gomez > a écrit : > > > > Hi, Hi Guillaume, thanks for the patch. > > > > This patch adds

[PATCH] RISC-V: Add rotate immediate regression test

2023-08-16 Thread Patrick O'Neill
This adds new regression tests to ensure half-register rotations are correctly optimized into rori instructions. gcc/testsuite/ChangeLog: * gcc.target/riscv/zbb-rol-ror-04.c: Add half-register rotation cases. * gcc.target/riscv/zbb-rol-ror-05.c: Add half-register rotation

Re: [PATCH] RISC-V: Add rotate immediate regression test

2023-08-16 Thread Andrew Pinski via Gcc-patches
On Wed, Aug 16, 2023 at 4:15 PM Patrick O'Neill wrote: > > This adds new regression tests to ensure half-register rotations are > correctly optimized into rori instructions. > > gcc/testsuite/ChangeLog: > > * gcc.target/riscv/zbb-rol-ror-04.c: Add half-register rotation > cases. >

Re: [PATCH] RISC-V: Fix reduc_strict_run-1 test case.

2023-08-16 Thread Palmer Dabbelt
On Wed, 16 Aug 2023 15:59:13 PDT (-0700), jeffreya...@gmail.com wrote: On 8/16/23 07:50, Robin Dapp wrote: But if it's a float16 precision issue then I would have expected both the computations for the lhs and rhs values to have suffered similarly. Yeah, right. I didn't look closely enough.

[PATCH ver 2] rs6000, add overloaded DFP quantize support

2023-08-16 Thread Carl Love via Gcc-patches
GCC maintainers: Version 2, renamed the built-in instances. Changed the name of the overloaded built-in. Added the missing documentation for the new built-ins. Fixed typos. Changed name of the test. Updated the effective target for the test. Retested the patch on Power 10LE and Power 8 and

[PATCH v2] RISCV: Add rotate immediate regression test

2023-08-16 Thread Patrick O'Neill
This adds new regression tests to ensure half-register rotations are correctly optimized into rori instructions. gcc/testsuite/ChangeLog: * gcc.target/riscv/zbb-rol-ror-08.c: New test. * gcc.target/riscv/zbb-rol-ror-09.c: New test. Co-authored-by: Charlie Jenkins Signed-off-by:

[PATCH v1] RISC-V: Support RVV VFNCVT.XU.F.W rounding mode intrinsic API

2023-08-16 Thread Pan Li via Gcc-patches
From: Pan Li This patch would like to support the rounding mode API for the VFNCVT.XU.F.W as the below samples. * __riscv_vfncvt_xu_f_w_u16mf2_rm * __riscv_vfncvt_xu_f_w_u16mf2_rm_m Signed-off-by: Pan Li gcc/ChangeLog: * config/riscv/riscv-vector-builtins-bases.cc (vfncvt_xu_

Re: [PATCH v1] RISC-V: Support RVV VFNCVT.XU.F.W rounding mode intrinsic API

2023-08-16 Thread Kito Cheng via Gcc-patches
LGTM On Thu, Aug 17, 2023 at 9:23 AM Pan Li via Gcc-patches wrote: > > From: Pan Li > > This patch would like to support the rounding mode API for the > VFNCVT.XU.F.W as the below samples. > > * __riscv_vfncvt_xu_f_w_u16mf2_rm > * __riscv_vfncvt_xu_f_w_u16mf2_rm_m > > Signed-off-by: Pan Li > >

Re: [PATCH] Add support for vector conitional not

2023-08-16 Thread Andrew Pinski via Gcc-patches
On Mon, Aug 14, 2023 at 2:54 PM Andrew Pinski wrote: > > On Mon, Aug 14, 2023 at 2:37 PM Richard Sandiford via Gcc-patches > wrote: > > > > Andrew Pinski via Gcc-patches writes: > > > Like the support conditional neg (r12-4470-g20dcda98ed376cb61c74b2c71), > > > this just adds conditional not too

  1   2   >