Re: [PATCH] x86: Replace ne:CCC/ne:CCO with UNSPEC_CC_NE in neg patterns

2022-10-27 Thread Hongtao Liu via Gcc-patches
On Thu, Oct 27, 2022 at 2:59 AM H.J. Lu via Gcc-patches wrote: > > In i386.md, neg patterns which set MODE_CC register like > > (set (reg:CCC FLAGS_REG) > (ne:CCC (match_operand:SWI48 1 "general_reg_operand") (const_int 0))) > > can lead to errors when operand 1 is a constant value. If

Re: [PATCH] riscv/RTEMS: Add RISCV_GCOV_TYPE_SIZE

2022-10-27 Thread Sebastian Huber
On 28/10/2022 01:05, Palmer Dabbelt wrote: On Thu, 27 Oct 2022 15:56:17 PDT (-0700), gcc-patches@gcc.gnu.org wrote: On 10/26/22 01:49, Sebastian Huber wrote: The RV32A extension does not support 64-bit atomic operations.  For RTEMS, use a 32-bit gcov type for RV32. gcc/ChangeLog: *

Re: [PATCH v2] RISC-V: Libitm add RISC-V support.

2022-10-27 Thread Xi Ruoyao via Gcc-patches
On Thu, 2022-10-27 at 17:44 -0700, Palmer Dabbelt wrote: > though I don't have an opinion on whether libitm should be taking ports > to new targets, I'd never even heard of it before. I asked this question to myself when I reviewed LoongArch libitm port. But I remember one maintainer of Deepin

Re: [PATCH] [x86] Enable V4BFmode and V2BFmode.

2022-10-27 Thread Hongtao Liu via Gcc-patches
I'm going to check in this patch. On Wed, Oct 26, 2022 at 10:30 AM liuhongt wrote: > > Enable V4BFmode and V2BFmode with the same ABI as V4HFmode and > V2HFmode. No real operation is supported for them except for movement. > This should solve PR target/107261. > > Also I notice there's

Re: [PATCH v2] RISC-V: Libitm add RISC-V support.

2022-10-27 Thread Palmer Dabbelt
On Thu, 27 Oct 2022 16:05:19 PDT (-0700), gcc-patches@gcc.gnu.org wrote: > > On 10/27/22 06:49, Xiongchuan Tan via Gcc-patches wrote: >> libitm/ChangeLog: >> >> * configure.tgt: Add riscv support. >> * config/riscv/asm.h: New file. >> * config/riscv/sjlj.S: New file. >>

[committed] c: C2x enums with fixed underlying type [PR61469]

2022-10-27 Thread Joseph Myers
C2x adds support for enums with a fixed underlying type specified ("enum e : long long;" and similar). Implement this in the C front end. The same representation is used for these types as in C++, with two macros moved from cp-tree.h to c-common.h. Such enums can have bool as the underlying

Re: [PATCH] libgo: use _off_t for mmap offset argument

2022-10-27 Thread Ian Lance Taylor via Gcc-patches
On Sat, Oct 22, 2022 at 6:45 AM Sören Tempel wrote: > > PING. > > soe...@soeren-tempel.net wrote: > > From: Sören Tempel > > > > On glibc-based systems, off_t is a 32-bit type on 32-bit systems and a > > 64-bit type on 64-bit systems by default. However, on systems using musl > > libc off_t is

[PATCH v2 1/3] libcpp: reject codepoints above 0x10FFFF

2022-10-27 Thread Ben Boeckel via Gcc-patches
Unicode does not support such values because they are unrepresentable in UTF-16. Signed-off-by: Ben Boeckel --- libcpp/ChangeLog | 6 ++ libcpp/charset.cc | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/libcpp/ChangeLog b/libcpp/ChangeLog index

[PATCH v2 3/3] p1689r5: initial support

2022-10-27 Thread Ben Boeckel via Gcc-patches
This patch implements support for [P1689R5][] to communicate to a build system the C++20 module dependencies to build systems so that they may build `.gcm` files in the proper order. Support is communicated through the following three new flags: - `-fdeps-format=` specifies the format for the

[PATCH v2 2/3] libcpp: add a function to determine UTF-8 validity of a C string

2022-10-27 Thread Ben Boeckel via Gcc-patches
This simplifies the interface for other UTF-8 validity detections when a simple "yes" or "no" answer is sufficient. Signed-off-by: Ben Boeckel --- libcpp/ChangeLog | 6 ++ libcpp/charset.cc | 18 ++ libcpp/internal.h | 2 ++ 3 files changed, 26 insertions(+) diff --git

[PATCH v2 0/1] RFC: P1689R5 support

2022-10-27 Thread Ben Boeckel via Gcc-patches
Hi, This patch adds initial support for ISO C++'s [P1689R5][], a format for describing C++ module requirements and provisions based on the source code. This is required because compiling C++ with modules is not embarrassingly parallel and need to be ordered to ensure that `import some_module;`

Re: Document 'distclean-stage[N]'

2022-10-27 Thread Jeff Law via Gcc-patches
On 10/26/22 06:10, Thomas Schwinge wrote: Hi! OK to push the attached patch to "Document 'distclean-stage[N]'"? OK jeff

Re: [PATCH v2] RISC-V: Libitm add RISC-V support.

2022-10-27 Thread Jeff Law via Gcc-patches
On 10/27/22 06:49, Xiongchuan Tan via Gcc-patches wrote: libitm/ChangeLog: * configure.tgt: Add riscv support. * config/riscv/asm.h: New file. * config/riscv/sjlj.S: New file. * config/riscv/target.h: New file. --- v2: Change HW_CACHELINE_SIZE to 64 (in

Re: [PATCH] riscv/RTEMS: Add RISCV_GCOV_TYPE_SIZE

2022-10-27 Thread Palmer Dabbelt
On Thu, 27 Oct 2022 15:56:17 PDT (-0700), gcc-patches@gcc.gnu.org wrote: On 10/26/22 01:49, Sebastian Huber wrote: The RV32A extension does not support 64-bit atomic operations. For RTEMS, use a 32-bit gcov type for RV32. gcc/ChangeLog: * config/riscv/riscv.cc

Re: [PATCH 1/2] ivopts: Revert computation of address cost complexity.

2022-10-27 Thread Jeff Law via Gcc-patches
On 10/21/22 07:52, Dimitrije Milosevic wrote: From: Dimitrije Milošević This patch reverts the computation of address cost complexity to the legacy one. After f9f69dd, complexity is calculated using the valid_mem_ref_p target hook. Architectures like Mips only allow BASE + OFFSET addressing

Re: [PATCH] Convert flag_finite_math_only uses in frange to HONOR_*.

2022-10-27 Thread Jeff Law via Gcc-patches
On 10/25/22 14:59, Aldy Hernandez via Gcc-patches wrote: [As Richi, and probably Jakub, have mentioned in the past...] As mentioned earlier, we should be using HONOR_* on types rather than flag_finite_math_only. Will commit pending tests. gcc/ChangeLog: * value-range.cc

Re: [PATCH] riscv/RTEMS: Add RISCV_GCOV_TYPE_SIZE

2022-10-27 Thread Jeff Law via Gcc-patches
On 10/26/22 01:49, Sebastian Huber wrote: The RV32A extension does not support 64-bit atomic operations. For RTEMS, use a 32-bit gcov type for RV32. gcc/ChangeLog: * config/riscv/riscv.cc (riscv_gcov_type_size): New. (TARGET_GCOV_TYPE_SIZE): Likewise. *

Re: [PATCH] docs: document sanitizers can trigger warnings

2022-10-27 Thread Jeff Law via Gcc-patches
On 10/26/22 05:09, Martin Liška wrote: PR sanitizer/107298 gcc/ChangeLog: * doc/invoke.texi: Document sanitizers can trigger warnings. OK jeff

Re: [PATCH] RISC-V: Change constexpr back to CONSTEXPR

2022-10-27 Thread Jeff Law via Gcc-patches
On 10/27/22 08:41, juzhe.zh...@rivai.ai wrote: From: Ju-Zhe Zhong According to https://github.com/gcc-mirror/gcc/commit/f95d3d5de72a1c43e8d529bad3ef59afc3214705. Since GCC 4.8.6 doesn't support constexpr, we should change it back to CONSTEXPR. gcc/ChangeLog: *

Re: [PATCH] [PR tree-optimization/107394] Canonicalize global franges as they are read back.

2022-10-27 Thread Jeff Law via Gcc-patches
On 10/25/22 15:01, Aldy Hernandez via Gcc-patches wrote: [Richi/Jakub/FP experts, does this sound like the right solution, or am I missing some subtle IPA/inlining issue?] The problem here is that we're inlining a global range with NANs into a function that has been tagged with

Re: [PATCH] RISC-V: Add Zawrs ISA extension support

2022-10-27 Thread Palmer Dabbelt
On Thu, 27 Oct 2022 11:23:17 PDT (-0700), christoph.muell...@vrull.eu wrote: On Thu, Oct 27, 2022 at 8:11 PM Christoph Muellner < christoph.muell...@vrull.eu> wrote: From: Christoph Muellner This patch adds support for the Zawrs ISA extension. The patch depends on the corresponding Binutils

Re: [PATCH v3] Re: OpenMP: Generate SIMD clones for functions with "declare target"

2022-10-27 Thread Sandra Loosemore
On 10/27/22 04:09, Thomas Schwinge wrote: Hi! On 2022-10-26T20:27:19-0600, Sandra Loosemore wrote: One of my test cases examines the .s output to make sure that the clones are emitted as local symbols and not global. I have not been able to find the symbol linkage information in any of the

Re: [PATCH] libstdc++: Implement ranges::cartesian_product_view from P2374R4

2022-10-27 Thread Patrick Palka via Gcc-patches
On Thu, 27 Oct 2022, Patrick Palka wrote: > This also implements the proposed resolutions of the tentatively ready > LWG issues 3760 and 3761. > > I'm not sure how/if we should implement the recommended practice of: > > difference_type should be the smallest signed-integer-like type that >

Re: [PATCH] RISC-V: Add Zawrs ISA extension support

2022-10-27 Thread Christoph Müllner
On Thu, Oct 27, 2022 at 8:11 PM Christoph Muellner < christoph.muell...@vrull.eu> wrote: > From: Christoph Muellner > > This patch adds support for the Zawrs ISA extension. > The patch depends on the corresponding Binutils patch > to be usable (see [1]) > > The specification can be found here: >

Re: [PATCH] lto-dump: modernize a bit

2022-10-27 Thread Richard Biener via Gcc-patches
> Am 27.10.2022 um 10:43 schrieb Martin Liška : > > Hi. > > Ready to be installed? Ok Richard > Thanks, > Martin > > gcc/lto/ChangeLog: > >* lto-dump.cc (dump_list): Remove trailing return. >(dump_symbol): Likewise. >(dump_body): Filter name based on mangled name. >

Re: [PATCH] Use simple_dce_from_worklist with match_simplify_replacement.

2022-10-27 Thread Richard Biener via Gcc-patches
> Am 27.10.2022 um 17:11 schrieb apinski--- via Gcc-patches > : > > From: Andrew Pinski > > This is a simple patch to do some DCE after a successful > match and simplify replacement in PHI-OPT. match and simplify > likes to generate some extra statements which should be cleaned > up. > >

[PATCH] RISC-V: Add Zawrs ISA extension support

2022-10-27 Thread Christoph Muellner
From: Christoph Muellner This patch adds support for the Zawrs ISA extension. The patch depends on the corresponding Binutils patch to be usable (see [1]) The specification can be found here: https://github.com/riscv/riscv-zawrs/blob/main/zawrs.adoc Note, that the Zawrs extension is not frozen

[PATCH] c++: libcpp: Support raw strings with newlines in directives [PR55971]

2022-10-27 Thread Lewis Hyatt via Gcc-patches
Hello- May I please ask for a review of this patch from June? I realize it's a 10-year-old PR that doesn't seem to be bothering people much, but I still feel like it's an unfortunate gap in C++11 support that is not hard to fix. Original submission is here:

[PATCH] libstdc++: Implement ranges::cartesian_product_view from P2374R4

2022-10-27 Thread Patrick Palka via Gcc-patches
This also implements the proposed resolutions of the tentatively ready LWG issues 3760 and 3761. I'm not sure how/if we should implement the recommended practice of: difference_type should be the smallest signed-integer-like type that is sufficiently wide to store the product of the maximum

c++: Templated lambda mangling

2022-10-27 Thread Nathan Sidwell via Gcc-patches
(Explicitly) Templated lambdas have a different signature to implicitly templated lambdas -- '[] (T) {}' is not the same as '[](auto) {}'. This should be reflected in the mangling. The ABI captures this as https://github.com/itanium-cxx-abi/cxx-abi/issues/31, and clang has implemented such

[PATCH] c++: -Wdangling-reference and system headers

2022-10-27 Thread Marek Polacek via Gcc-patches
I got this testcase: auto f() -> std::optional; for (char c : f().value()) { } which has a dangling reference: std::optional::value returns a reference to the contained value, but here it's the f() temporary. We warn, which is great, but only with -Wsystem-headers, because the function comes

[PATCH] Use simple_dce_from_worklist with match_simplify_replacement.

2022-10-27 Thread apinski--- via Gcc-patches
From: Andrew Pinski This is a simple patch to do some DCE after a successful match and simplify replacement in PHI-OPT. match and simplify likes to generate some extra statements which should be cleaned up. OK? Bootstrapped and tested on x86_64-linux with no regressions. Thanks, Andrew Pinski

[PATCH] RISC-V: Change constexpr back to CONSTEXPR

2022-10-27 Thread juzhe . zhong
From: Ju-Zhe Zhong According to https://github.com/gcc-mirror/gcc/commit/f95d3d5de72a1c43e8d529bad3ef59afc3214705. Since GCC 4.8.6 doesn't support constexpr, we should change it back to CONSTEXPR. gcc/ChangeLog: * config/riscv/riscv-vector-builtins-bases.cc: Change constexpr back to

Re: [PATCH zero-call-used-regs] Add leafy mode for zero-call-used-regs

2022-10-27 Thread Qing Zhao via Gcc-patches
> On Oct 26, 2022, at 5:29 PM, Alexandre Oliva wrote: > > On Oct 25, 2022, Qing Zhao wrote: > >>> 'all' for leaf functions is likely wasteful. If no other functions are >>> called, one can determine exactly which registers might carry >>> information out and thus need zeroing, and 'used' is

[pushed] aarch64: Reinstate some uses of CONSTEXPR

2022-10-27 Thread Richard Sandiford via Gcc-patches
In 9482a5e4eac8d696129ec2854b331e1bb5dbab42 I'd replaced uses of CONSTEXPR with direct uses of constexpr. However, it turns out that we still have CONSTEXPR for a reason: GCC 4.8 doesn't implement constexpr properly, and for example rejects things like: extern const int x; constexpr int x =

Re: [OG12 commit] vect: WORKAROUND vectorizer bug

2022-10-27 Thread Andrew Stubbs
On 24/10/2022 19:06, Richard Biener wrote: Am 24.10.2022 um 18:51 schrieb Andrew Stubbs : I've committed this to the OG12 branch to remove some test failures. We probably ought to have something on mainline also, but a proper fix would be better. Without this. the

[PATCH v2] RISC-V: Libitm add RISC-V support.

2022-10-27 Thread Xiongchuan Tan via Gcc-patches
libitm/ChangeLog: * configure.tgt: Add riscv support. * config/riscv/asm.h: New file. * config/riscv/sjlj.S: New file. * config/riscv/target.h: New file. --- v2: Change HW_CACHELINE_SIZE to 64 (in accordance with the RVA profiles, see

Re: [PATCH] [x86] Fix incorrect digit constraint

2022-10-27 Thread Uros Bizjak via Gcc-patches
On Thu, Oct 27, 2022 at 12:55 PM liuhongt wrote: > > Matching constraints are used in these circumstances. More precisely, > the two operands that match must include one input-only operand and > one output-only operand. Moreover, the digit must be a smaller number > than the number of the operand

Re: [PATCH] RISC-V: Libitm add RISC-V support.

2022-10-27 Thread Andrew Waterman
I'm surprised by the hard-coded 128-byte cache line size. If we need to hard-code a value, it should be 64 (in accordance with the RVA profiles, see https://github.com/riscv/riscv-profiles/blob/main/profiles.adoc), but ideally this would be queried dynamically. On Thu, Oct 27, 2022 at 3:51 AM

[PATCH] [x86] Fix incorrect digit constraint

2022-10-27 Thread liuhongt via Gcc-patches
Matching constraints are used in these circumstances. More precisely, the two operands that match must include one input-only operand and one output-only operand. Moreover, the digit must be a smaller number than the number of the operand that uses it in the constraint. In pr107057, the 2

[PATCH] RISC-V: Libitm add RISC-V support.

2022-10-27 Thread Xiongchuan Tan via Gcc-patches
libitm/ChangeLog: * configure.tgt: Add riscv support. * config/riscv/asm.h: New file. * config/riscv/sjlj.S: New file. * config/riscv/target.h: New file. --- libitm/config/riscv/asm.h| 52 + libitm/config/riscv/sjlj.S | 144

Re: Ping [PATCH] Add condition coverage profiling

2022-10-27 Thread Martin Liška
On 10/25/22 08:33, Jørgen Kvalsvik wrote: Gentle ping. I have a tuned the summary output slightly (decisions covered -> condition outcomes covered) already. Sorry for a small delay, I'm working on it. One general issue I noticed is you use an invalid coding style, where you use 4 spaces for

Re: [PATCH] c++: Fix ICE on g++.dg/modules/adl-3_c.C [PR107379]

2022-10-27 Thread Nathan Sidwell via Gcc-patches
On 10/27/22 04:17, Jakub Jelinek wrote: Hi! As mentioned in the PR, apparently my r13-2887 P1467R9 changes regressed these tests on powerpc64le-linux with IEEE quad by default. I believe my changes just uncovered a latent bug. The problem is that push_namespace calls find_namespace_slot, which

Re: [PATCH v3] Re: OpenMP: Generate SIMD clones for functions with "declare target"

2022-10-27 Thread Thomas Schwinge
Hi! On 2022-10-26T20:27:19-0600, Sandra Loosemore wrote: > On 10/20/22 08:07, Jakub Jelinek wrote: >> Thus, IMHO it is exactly the pass_omp_simd_clone pass where you want to >> implement this auto-simdization discovery, guarded with >> #ifdef ACCEL_COMPILER and the new option (which means it

Re: [PATCH] [x86_64] Zhaoxin lujiazui enablement

2022-10-27 Thread Martin Liška
On 10/27/22 11:09, Mayshao-oc wrote: Hi Martin:     Thanks for your patch,  I comment the questions below. Hi. :) Hello. I noticed this patch set which is kind of related to https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107364

Re: [PATCH] [x86_64] Zhaoxin lujiazui enablement

2022-10-27 Thread Mayshao-oc
>> >> Hi Martin: >> Thanks for your patch, I comment the questions below. >Hi. >:) >> >>> Hello. >> >>> I noticed this patch set which is kind of related to >>> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107364. >> >>> And I have a couple of questions: >> >>>1) I noticed you drop

[PATCH] lto-dump: modernize a bit

2022-10-27 Thread Martin Liška
Hi. Ready to be installed? Thanks, Martin gcc/lto/ChangeLog: * lto-dump.cc (dump_list): Remove trailing return. (dump_symbol): Likewise. (dump_body): Filter name based on mangled name. (dump_tool_help): Use GIMPLE wording. (lto_main): Update wording. ---

[PATCH (pushed)] lto: do not load LTO stream for aliases [PR107418]

2022-10-27 Thread Martin Liška
It's the similar condition we use in lto-dump. Pushed as obvious. MArtin PR lto/107418 gcc/lto/ChangeLog: * lto-dump.cc (lto_main): Do not load LTO stream for aliases. --- gcc/lto/lto-dump.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git

[PATCH] c++: Fix ICE on g++.dg/modules/adl-3_c.C [PR107379]

2022-10-27 Thread Jakub Jelinek via Gcc-patches
Hi! As mentioned in the PR, apparently my r13-2887 P1467R9 changes regressed these tests on powerpc64le-linux with IEEE quad by default. I believe my changes just uncovered a latent bug. The problem is that push_namespace calls find_namespace_slot, which does: tree *slot =

Re: [PATCH Rust front-end v3 40/46] gccrs: Add GCC Rust front-end Make-lang.in

2022-10-27 Thread Arthur Cohen
(...snip...) +RUST_SELFTEST_FLAGS = -xrs $(SELFTEST_FLAGS) I've noticed that this patch contains a typo which prevents self-tests from running properly. This should be `-xrust`, not `-xrs`. I assume there will be some other review comments, so that will be fixed in a v4 of the patches.

Re: [PATCH Rust front-end v3 35/46] gccrs: Add metadata ouptput pass

2022-10-27 Thread Arthur Cohen
On 10/26/22 23:04, David Malcolm wrote: %{On Wed, 2022-10-26 at 10:18 +0200, arthur.co...@embecosm.com wrote: From: Philip Herron Extern crates statements to tell the front-end to look for another library. The mechanism here is heavily inspired from gccgo, so when we compile a library for

[PATCH] libstdc++: std::to_chars std::{,b}float16_t support

2022-10-27 Thread Jakub Jelinek via Gcc-patches
Hi! The following patch on top of https://gcc.gnu.org/pipermail/libstdc++/2022-October/054849.html adds std::{,b}float16_t support for std::to_chars. When precision is specified (or for std::bfloat16_t for hex mode even if not), I believe we can just use the std::to_chars float (when float is

Re: [PATCH] IRA: Make sure array is big enough

2022-10-27 Thread Torbjorn SVENSSON via Gcc-patches
On 2022-10-26 22:26, Vladimir Makarov wrote: On 2022-10-25 06:01, Torbjörn SVENSSON wrote: In commit 081c96621da, the call to resize_reg_info() was moved before the call to remove_scratches() and the latter one can increase the number of regs and that would cause an out of bounds usage on

Re: [PATCH] testsuite: Adjust vect-bitfield-read-* with vect_shift and vect_long_long [PR107240]

2022-10-27 Thread Richard Biener via Gcc-patches
> Am 27.10.2022 um 09:10 schrieb Kewen.Lin : > > Hi, > > The test cases vect-bitfield-read-* requires vector shift > target support, they need one explicit vect_shift effective > target requirement checking. Besides, the vectype for struct > in test cases vect-bitfield-read-{2,4} is vector

[PATCH] testsuite: Adjust vect-bitfield-read-* with vect_shift and vect_long_long [PR107240]

2022-10-27 Thread Kewen.Lin via Gcc-patches
Hi, The test cases vect-bitfield-read-* requires vector shift target support, they need one explicit vect_shift effective target requirement checking. Besides, the vectype for struct in test cases vect-bitfield-read-{2,4} is vector of long long, we need to check effective target vect_long_long

Re: [PATCH] x86: Replace ne:CCC/ne:CCO with UNSPEC_CC_NE in neg patterns

2022-10-27 Thread Uros Bizjak via Gcc-patches
On Wed, Oct 26, 2022 at 8:59 PM H.J. Lu wrote: > > In i386.md, neg patterns which set MODE_CC register like > > (set (reg:CCC FLAGS_REG) > (ne:CCC (match_operand:SWI48 1 "general_reg_operand") (const_int 0))) > > can lead to errors when operand 1 is a constant value. If FLAGS_REG in > >