[RFC][Patch] vect: verify that nelt is greater than one

2023-03-22 Thread Kevin Lee
This is a patch related to https://gcc.gnu.org/pipermail/gcc-patches/2023-March/613977.html, aiming for gcc14. Since the RISC-V target has vector modes (e.g. VNx1DImode) with nelt smaller than 2, npat has to match with the nelt to create proper vec_perm_indices. I tested on x86_64-linux-gnu an

Re: [PATCH] [testsuite] test for weak_undefined support and add options

2023-03-22 Thread Alexandre Oliva via Gcc-patches
On Mar 18, 2023, Mike Stump wrote: > On Mar 15, 2023, at 11:40 PM, Alexandre Oliva wrote: >> >> On Mar 15, 2023, Alexandre Oliva wrote: >> >>> Regstrapped on ppc64-linux-gnu. Also tested (with gcc-12) on multiple >>> *-vxworks7r2 targets (arm, aarch64, ppc64, x86, x86_64). Ok to install? >>

Re: [PATCH] RISC-V: Fix ICE of RVV compare intrinsic

2023-03-22 Thread Kito Cheng via Gcc-patches
committed as https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=6f6eba35b9f06d35ff7bea81969fe905a5584bdc On Fri, Mar 10, 2023 at 4:09 PM wrote: > > From: Ju-Zhe Zhong > > vfrsub_vf_m.cpp: In function 'int main()': > vfrsub_vf_m.cpp:5:43: error: invalid argument to built-in function >5 | vbool3

Re: Re: [PATCH] RISC-V: Fix bugs of ternary integer and floating-point ternary intrinsics.

2023-03-22 Thread Kito Cheng via Gcc-patches
committed as https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=0e2715176df3787d1470d7b9bde26b1b5e16e1e2 On Mon, Mar 20, 2023 at 8:51 AM juzhe.zh...@rivai.ai wrote: > > The last patch. Kito is still keep testing with pressure tests. > > > > juzhe.zh...@rivai.ai > > From: Jeff Law > Date: 2023-03-20 0

Re: [PATCH] RISC-V: Fix RVV ICE && runtine fail

2023-03-22 Thread Kito Cheng via Gcc-patches
committd as https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=a481eed8fd01837cdf011ea9a17853505080a888 with comment tweaks On Mon, Mar 20, 2023 at 12:30 PM wrote: > > From: Ju-Zhe Zhong > > gcc/ChangeLog: > > * config/riscv/riscv-vsetvl.cc (eliminate_insn): Fix bugs. > (insert_vsetv

Re: [PATCH] RISC-V: Fix redundant vmv1r.v instruction in vmsge.vx codegen

2023-03-22 Thread Kito Cheng via Gcc-patches
LGTM, but pending this to the GCC 14 queue. On Wed, Mar 22, 2023 at 8:16 PM wrote: > > From: Ju-Zhe Zhong > > Current expansion of vmsge will make RA produce redundant vmv1r.v. > > testcase: > void f1 (void * in, void *out, int32_t x) > { > vbool32_t mask = *(vbool32_t*)in; > asm volatil

Re: [PATCH] RISC-V: Fix ICE in LRA for LMUL < 1 vector spillings

2023-03-22 Thread Kito Cheng via Gcc-patches
Committed as https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=cd0c433e5faba9a18f64881cd761a53a530aa798 with comment tweak. On Wed, Mar 22, 2023 at 10:50 AM wrote: > > From: Ju-Zhe Zhong > > gcc/ChangeLog: > > * config/riscv/riscv-protos.h (emit_vlmax_vsetvl): Define as global. > (e

Re: [PATCH] RISC-V: Fix PR109228

2023-03-22 Thread Kito Cheng via Gcc-patches
committed as https://gcc.gnu.org/git/gitweb.cgi?p=gcc.git;h=116a8678840f9f52ec14639ff07e302a8c429f32 with few comment tweak. On Wed, Mar 22, 2023 at 1:06 PM wrote: > > From: Ju-Zhe Zhong > > This patch fix PR109228 > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109228 > > gcc/ChangeLog: > >

[pushed] c++: local class in nested generic lambda [PR109241]

2023-03-22 Thread Jason Merrill via Gcc-patches
Tested x86_64-pc-linux-gnu, applying to trunk. -- 8< -- In this testcase, the tree walk to look for bare parameter packs was confused by finding a type with no TREE_BINFO. But it should be fine that it's unset; we already checked for unexpanded packs at parse time. I also tried doing the partia

[PATCH v2 #2/2] [rs6000] adjust return_pc debug attrs

2023-03-22 Thread Alexandre Oliva via Gcc-patches
Some of the rs6000 call patterns, on some ABIs, issue multiple opcodes out of a single call insn, but the call (bl) or jump (b) is not always the last opcode in the sequence. This does not seem to be a problem for exception handling tables, but the return_pc attribute in the call graph output in

[PATCH v2 #1/2] enable adjustment of return_pc debug attrs

2023-03-22 Thread oliva--- via Gcc-patches
This patch introduces infrastructure for targets to add an offset to the label issued after the call_insn to set the call_return_pc attribute. This will be used on rs6000, that sometimes issues another instruction after the call proper as part of a call insn. Regstrapped on x86_64-linux-gnu and

Re: [PATCH] [rs6000] adjust return_pc debug attrs

2023-03-22 Thread Alexandre Oliva via Gcc-patches
On Mar 13, 2023, Segher Boessenkool wrote: > Hi! > This is stage 1 stuff (or does it fix some regression or such?) > On Fri, Mar 03, 2023 at 03:00:02PM -0300, Alexandre Oliva wrote: >> Some of the rs6000 call patterns, on some ABIs, issue multiple opcodes >> out of a single call insn, but the ca

[PATCH] libstdc++: use __bool_constant instead of integral_constant

2023-03-22 Thread Ken Matsui via Gcc-patches
In the type_traits header, both integral_constant and __bool_constant are used. This patch unifies those usages into __bool_constant. libstdc++-v3/ChangeLog: * include/std/type_traits: Use __bool_constant instead of integral_constant. --- libstdc++-v3/include/std/type_traits | 32

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

2023-03-22 Thread Ken Matsui via Gcc-patches
This patch lets libstdc++ use new built-in trait __is_unsigned. libstdc++-v3/ChangeLog: * include/std/type_traits (is_unsigned): Use __is_unsigned built-in trait. --- libstdc++-v3/include/std/type_traits | 7 +++ 1 file changed, 7 insertions(+) diff --git a/libstdc++-v3/incl

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

2023-03-22 Thread Ken Matsui via Gcc-patches
This patch implements built-in trait for std::is_unsigned. gcc/cp/ChangeLog: * cp-trait.def: Define __is_unsigned. * constraint.cc (diagnose_trait_expr): Handle CPTK_IS_UNSIGNED. * semantics.cc (trait_expr_value): Likewise. (finish_trait_expr): Likewise. gcc/tests

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

2023-03-22 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. --- libstdc++-v3/include/std/type_traits | 7 +++ 1 file changed, 7 insertions(+) diff --git a/libstdc++-v3/incl

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

2023-03-22 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

[committed] libstdc++: Fix assigning nullptr to std::atomic> (LWG 3893)

2023-03-22 Thread Jonathan Wakely via Gcc-patches
Tested powerpc64le-linux. Pushed to trunk. -- >8 -- LWG voted this to Tentatively Ready recently. libstdc++-v3/ChangeLog: * include/bits/shared_ptr_atomic.h (atomic::operator=(nullptr_t)): Add overload, as per LWG 3893. * testsuite/20_util/shared_ptr/atomic/atomic_shared

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

2023-03-22 Thread Ken Matsui via Gcc-patches
It seems I missed including Jonathan in the new patch. Could you please take a look? On Tue, Mar 21, 2023 at 10:07 AM Ken Matsui wrote: > > This patch implements built-in trait for std::is_unsigned. > > gcc/cp/ChangeLog: > > * cp-trait.def: Define __is_unsigned. > * constraint.cc

Re: [PATCH] testsuite: always use UTF-8 in scan-sarif-file[-not] [PR105959]

2023-03-22 Thread Mike Stump via Gcc-patches
On Mar 20, 2023, at 3:06 PM, David Malcolm via Gcc-patches wrote: > > c-c++-common/diagnostic-format-sarif-file-4.c is a test case for > quoting non-ASCII source code in a SARIF diagnostic log. > > The SARIF standard mandates that .sarif files are UTF-8 encoded. > > PR testsuite/105959 notes t

Go patch committed: Add missing Slice_info_expression::do_traverse

2023-03-22 Thread Ian Lance Taylor via Gcc-patches
This patch to the Go frontend adds the missing Slice_info_expression::do_traverse method. Lack of the method caused https://go.dev/issue/59169. The test case is https://go.dev/cl/478217. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed to mainline and GCC 12 branch. Ian 187e

Re: [committed] libstdc++: Add missing __cpp_lib_format macro to

2023-03-22 Thread Jonathan Wakely via Gcc-patches
On Wed, 22 Mar 2023 at 19:46, Jonathan Wakely wrote: > > > On Wed, 22 Mar 2023 at 17:59, Daniel Krügler > wrote: > >> Am Mi., 22. März 2023 um 18:53 Uhr schrieb Jonathan Wakely via >> Libstdc++ : >> > >> > Tested powerpc64le-linux, pushed to trunk. >> > >> > -- >8-- >> > >> > libstdc++-v3/Change

Re: [committed] libstdc++: Add missing __cpp_lib_format macro to

2023-03-22 Thread Jonathan Wakely via Gcc-patches
On Wed, 22 Mar 2023 at 17:59, Daniel Krügler wrote: > Am Mi., 22. März 2023 um 18:53 Uhr schrieb Jonathan Wakely via > Libstdc++ : > > > > Tested powerpc64le-linux, pushed to trunk. > > > > -- >8-- > > > > libstdc++-v3/ChangeLog: > > > > * include/std/version (__cpp_lib_format): Define. >

[pushed] c++: array bound partial ordering [PR108390]

2023-03-22 Thread Jason Merrill via Gcc-patches
Tested x86_64-pc-linux-gnu, applying to trunk. -- 8< -- fold_convert doesn't work with a dependent argument, and problematically differed from the corresponding fold+build_nop further down in the function. So change it to match. PR c++/108390 gcc/cp/ChangeLog: * pt.cc (unify):

[PATCH, committed] Fortran: improve checking of FINAL subroutine arguments [PR104572]

2023-03-22 Thread Harald Anlauf via Gcc-patches
Dear all, I've committed the attached simple patch after discussion with Steve (see PR). We need to reject alternate return arguments of FINAL subroutines. Regtested on x86_64-pc-linux-gnu. Thanks, Harald From 3e791f45ded89626bc1f9f8013728f6e035801b2 Mon Sep 17 00:00:00 2001 From: Harald Anlau

Re: [PATCH] Remove TARGET_GEN_MEMSET_SCRATCH_RTX since it's not used anymore.

2023-03-22 Thread H.J. Lu via Gcc-patches
On Wed, Mar 22, 2023 at 3:19 AM Richard Biener wrote: > > On Wed, Mar 22, 2023 at 8:07 AM Uros Bizjak wrote: > > > > On Wed, Mar 22, 2023 at 3:59 AM liuhongt wrote: > > > > > > The target hook is only used by i386, and the current definition is > > > same as default gen_reg_rtx. So there's no ne

Re: [committed] libstdc++: Add missing __cpp_lib_format macro to

2023-03-22 Thread Daniel Krügler via Gcc-patches
Am Mi., 22. März 2023 um 18:53 Uhr schrieb Jonathan Wakely via Libstdc++ : > > Tested powerpc64le-linux, pushed to trunk. > > -- >8-- > > libstdc++-v3/ChangeLog: > > * include/std/version (__cpp_lib_format): Define. > * testsuite/std/format/functions/format.cc: Check it. > --- > li

[committed] libstdc++: Remove std::formatter specialization

2023-03-22 Thread Jonathan Wakely via Gcc-patches
Tested powerpc64le-linux, pushed to trunk. -- >8-- This was approved in Issaquah as LWG 3833. libstdc++-v3/ChangeLog: * include/std/format (formatter): Do not define partial speclialization, as per LWG 3833. * testsuite/std/format/formatter/requirements.cc: Check it. ---

[committed] libstdc++: Define __cpp_lib_constexpr_algorithms in (LWG 3792)

2023-03-22 Thread Jonathan Wakely via Gcc-patches
Tested powerpc64le-linux, pushed to trunk. -- >8-- We actually defined this macro in at one point, but I removed it in r10-7901-g2025db692e9ed1. libstdc++-v3/ChangeLog: * include/std/utility (__cpp_lib_constexpr_algorithms): Define, as per LWG 3792. * testsuite/20_util/

[committed] libstdc++: Add missing __cpp_lib_format macro to

2023-03-22 Thread Jonathan Wakely via Gcc-patches
Tested powerpc64le-linux, pushed to trunk. -- >8-- libstdc++-v3/ChangeLog: * include/std/version (__cpp_lib_format): Define. * testsuite/std/format/functions/format.cc: Check it. --- libstdc++-v3/include/std/version | 1 + .../testsuite/std/format/functions/for

[committed] libstdc++: Make std::istream_iterator copy ctor constexpr (LWG 3600)

2023-03-22 Thread Jonathan Wakely via Gcc-patches
Tested powerpc64le-linux, pushed to trunk. -- >8-- As explained in LWG 3600, we never implemented a C++0x change that made the copy constructor of std::istream_iterator defined as defaulted. That would be an ABI break, so the resolution of LWG 3600 is to not require it to be trivial, but just con

[committed] libstdc++: Use rvalues in std::string::resize_and_overwrite (LWG 3645)

2023-03-22 Thread Jonathan Wakely via Gcc-patches
Tested powerpc64le-linux, pushed to trunk. -- >8-- Previously the C++23 draft required that the callback arguments were lvalues, which was overvable by the callback. LWG 3645 removes that overspecification, so we can pass rvalues and the user can't modify our local variables. I've used auto(p) to

[committed] libstdc++: Add allocator-extended constructors to std::match_results (LWG 2195)

2023-03-22 Thread Jonathan Wakely via Gcc-patches
Tested powerpc64le-linux, pushed to trunk. -- >8-- This was approved in Issaquah last month. libstdc++-v3/ChangeLog: * include/bits/regex.h (match_results): Add allocator-extended copy and move constructors, as per LWG 2195. * testsuite/28_regex/match_results/ctors/char/

[committed] libstdc++: Add comment to (LWG 3720)

2023-03-22 Thread Jonathan Wakely via Gcc-patches
Tested powerpc64le-linux, pushed to trunk. -- >8-- libstdc++-v3/ChangeLog: * include/std/format: Add a comment noting that the resolution of LWG 3720 has been applied.. --- libstdc++-v3/include/std/format | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libstdc++-v3/include

[pushed] [PR109137] LRA: Do not repeat inheritance and live range splitting in case of asm error

2023-03-22 Thread Vladimir Makarov via Gcc-patches
The following patch solves https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109137 The patch was successfully bootstrapped and tested on x86-64. commit 81d762cbec9685c2f2571da21d48f42c42eff33b Author: Vladimir N. Makarov Date: Wed Mar 22 12:33:11 2023 -0400 LRA: Do not repeat inheritance an

Re: [PATCH] tree-optimization/109237 - last_stmt is possibly slow

2023-03-22 Thread Bernhard Reutner-Fischer via Gcc-patches
On 22 March 2023 13:29:52 CET, Richard Biener via Gcc-patches wrote: >The alternative would be to change last_stmt, explicitely introducing >last_nondebug_stmt. I remember we chickened out and made last_stmt >conservative here but not anticipating the compile-time issues this >creates. I count

[pushed] c++: attribute on dtor in template [PR108795]

2023-03-22 Thread Jason Merrill via Gcc-patches
Tested x86_64-pc-linux-gnu, applying to trunk. -- 8< -- Since r7-2549 we were throwing away the explicit C:: when we found that ~C has an attribute that we treat as making its type dependent. PR c++/108795 gcc/cp/ChangeLog: * semantics.cc (finish_id_expression_1): Check scope b

Re: Should -ffp-contract=off the default on GCC?

2023-03-22 Thread Qing Zhao via Gcc-patches
> On Mar 22, 2023, at 9:57 AM, Richard Biener via Gcc-patches > wrote: > > On Wed, Mar 22, 2023 at 1:26 PM Alexander Monakov wrote: >> >> >> On Wed, 22 Mar 2023, Richard Biener wrote: >> >>> I think it's even less realistic to expect users to know the details of >>> floating-point math. S

Re: [PATCH] c++: Avoid duplicate diagnostic calling unavailable function [PR109177]

2023-03-22 Thread Jason Merrill via Gcc-patches
On 3/22/23 07:32, Alex Coplan wrote: Hi, As the PR shows, we currently emit duplicate diagnostics for calls to functions marked with __attribute__((unavailable)). This patch fixes that. I'm not sure whether it's considered acceptable to add the include of decl.h to call.cc (in order to get at d

Re: [PATCH] wwwdocs: Clarify experimental status of C++17 prior to GCC 9

2023-03-22 Thread Jason Merrill via Gcc-patches
On 3/22/23 06:42, Jonathan Wakely wrote: We don't currently have a single page where you can find out when support for a given standard became non-experimental (you have to look through all the gcc-X/changes.html pages to find it). I think we should have that info on the cxx-status.html page. Thi

Re: Should -ffp-contract=off the default on GCC?

2023-03-22 Thread Qing Zhao via Gcc-patches
> On Mar 22, 2023, at 8:33 AM, Alexander Monakov wrote: > > > On Mon, 20 Mar 2023, Jakub Jelinek via Gcc-patches wrote: > >> On Mon, Mar 20, 2023 at 10:05:57PM +, Qing Zhao via Gcc-patches wrote: >>> My question: is the above section the place in C standard “explicitly >>> allows contrac

Re: Should -ffp-contract=off the default on GCC?

2023-03-22 Thread Richard Biener via Gcc-patches
On Wed, Mar 22, 2023 at 1:26 PM Alexander Monakov wrote: > > > On Wed, 22 Mar 2023, Richard Biener wrote: > > > I think it's even less realistic to expect users to know the details of > > floating-point math. So I doubt any such sentence will be helpful > > besides spreading some FUD? > > I think

[pushed] analyzer: fix false +ves from -Wanalyzer-deref-before-check due to inlining [PR109239]

2023-03-22 Thread David Malcolm via Gcc-patches
The patch has this effect on my integration tests of -fanalyzer: Comparison: GOOD: 129(17.70% -> 17.92%) BAD: 600 -> 591 (-9) which is purely due to improvements to -Wanalyzer-deref-before-check on the Linux kernel: -Wanalyzer-deref-before-check: GOOD: 1(4.55% ->

Re: [PATCH] tree-optimization/109237 - last_stmt is possibly slow

2023-03-22 Thread Jakub Jelinek via Gcc-patches
On Wed, Mar 22, 2023 at 12:29:52PM +, Richard Biener wrote: > Most uses of last_stmt are interested in control transfer stmts > and for the testcase gimple_purge_dead_eh_edges shows up in > the profile. But last_stmt looks past trailing debug stmts but > those would be rejected by GIMPLEs veri

Re: Should -ffp-contract=off the default on GCC?

2023-03-22 Thread Alexander Monakov via Gcc-patches
On Mon, 20 Mar 2023, Jakub Jelinek via Gcc-patches wrote: > On Mon, Mar 20, 2023 at 10:05:57PM +, Qing Zhao via Gcc-patches wrote: > > My question: is the above section the place in C standard “explicitly > > allows contractions”? If not, where it is in C standard? > > http://port70.net/%7

[PATCH] tree-optimization/109237 - last_stmt is possibly slow

2023-03-22 Thread Richard Biener via Gcc-patches
Most uses of last_stmt are interested in control transfer stmts and for the testcase gimple_purge_dead_eh_edges shows up in the profile. But last_stmt looks past trailing debug stmts but those would be rejected by GIMPLEs verify_flow_info. The following adds possible_ctrl_stmt besides last_stmt w

Re: Should -ffp-contract=off the default on GCC?

2023-03-22 Thread Alexander Monakov via Gcc-patches
On Wed, 22 Mar 2023, Richard Biener wrote: > I think it's even less realistic to expect users to know the details of > floating-point math. So I doubt any such sentence will be helpful > besides spreading some FUD? I think it's closer to "fundamental notions" rather than "details". For users w

Re: [PATCH v2 1/2] libstdc++: also use sendfile for big files

2023-03-22 Thread Jonathan Wakely via Gcc-patches
On Wed, 22 Mar 2023 at 12:18, Jonathan Wakely wrote: > On Wed, 22 Mar 2023 at 12:14, Jonathan Wakely wrote: > >> >> >> On Mon, 20 Mar 2023 at 22:30, Jonathan Wakely via Libstdc++ < >> libstd...@gcc.gnu.org> wrote: >> >>> On 20/03/23 22:27 +, Jonathan Wakely wrote: >>> >On 06/03/23 20:52 +0100,

Re: [PATCH v2 1/2] libstdc++: also use sendfile for big files

2023-03-22 Thread Jonathan Wakely via Gcc-patches
On Wed, 22 Mar 2023 at 12:14, Jonathan Wakely wrote: > > > On Mon, 20 Mar 2023 at 22:30, Jonathan Wakely via Libstdc++ < > libstd...@gcc.gnu.org> wrote: > >> On 20/03/23 22:27 +, Jonathan Wakely wrote: >> >On 06/03/23 20:52 +0100, Jannik Glückert wrote: >> >>we were previously only using sendf

[PATCH] RISC-V: Fix redundant vmv1r.v instruction in vmsge.vx codegen

2023-03-22 Thread juzhe . zhong
From: Ju-Zhe Zhong Current expansion of vmsge will make RA produce redundant vmv1r.v. testcase: void f1 (void * in, void *out, int32_t x) { vbool32_t mask = *(vbool32_t*)in; asm volatile ("":::"memory"); vint32m1_t v = __riscv_vle32_v_i32m1 (in, 4); vint32m1_t v2 = __riscv_vle32_

Re: [PATCH v2 1/2] libstdc++: also use sendfile for big files

2023-03-22 Thread Jonathan Wakely via Gcc-patches
On Mon, 20 Mar 2023 at 22:30, Jonathan Wakely via Libstdc++ < libstd...@gcc.gnu.org> wrote: > On 20/03/23 22:27 +, Jonathan Wakely wrote: > >On 06/03/23 20:52 +0100, Jannik Glückert wrote: > >>we were previously only using sendfile for files smaller than 2GB, as > >>sendfile needs to be called

[PATCH] c++: Avoid duplicate diagnostic calling unavailable function [PR109177]

2023-03-22 Thread Alex Coplan via Gcc-patches
Hi, As the PR shows, we currently emit duplicate diagnostics for calls to functions marked with __attribute__((unavailable)). This patch fixes that. I'm not sure whether it's considered acceptable to add the include of decl.h to call.cc (in order to get at deprecated_state). It would be useful to

[PATCH] wwwdocs: Clarify experimental status of C++17 prior to GCC 9

2023-03-22 Thread Jonathan Wakely via Gcc-patches
We don't currently have a single page where you can find out when support for a given standard became non-experimental (you have to look through all the gcc-X/changes.html pages to find it). I think we should have that info on the cxx-status.html page. This adds it for C++17, and we can do the same

Re: [PATCH] Remove TARGET_GEN_MEMSET_SCRATCH_RTX since it's not used anymore.

2023-03-22 Thread Jakub Jelinek via Gcc-patches
On Wed, Mar 22, 2023 at 11:18:33AM +0100, Richard Biener via Gcc-patches wrote: > Is/was the code ever exercised for non-x86? HJ, what was the reason to > abstract this? Initially the hook looked like rtx ix86_gen_scratch_sse_rtx (machine_mode mode) {   if (TARGET_SSE) return gen_rtx_REG (mod

Re: [PATCH] Remove TARGET_GEN_MEMSET_SCRATCH_RTX since it's not used anymore.

2023-03-22 Thread Richard Biener via Gcc-patches
On Wed, Mar 22, 2023 at 8:07 AM Uros Bizjak wrote: > > On Wed, Mar 22, 2023 at 3:59 AM liuhongt wrote: > > > > The target hook is only used by i386, and the current definition is > > same as default gen_reg_rtx. So there's no need for this target hook. > > > > Bootstrapped and regtested on x86_64

[PATCH] match.pd: Fix up fneg/fadd simplification [PR109230]

2023-03-22 Thread Jakub Jelinek via Gcc-patches
Hi! The following testcase is miscompiled on aarch64-linux. match.pd has a simplification for addsub, where it negates one of the vectors in twice as large floating point element vector (effectively negating every other element) and then doing addition. But a requirement for that is that the perm

Re: Should -ffp-contract=off the default on GCC?

2023-03-22 Thread Richard Biener via Gcc-patches
On Tue, Mar 21, 2023 at 7:18 PM Jeff Law via Gcc-patches wrote: > > > > On 3/21/23 12:12, Alexander Monakov wrote: > >>> Yes, it’s better to know the details of languages standard. -:) > >>> However, I don’t think that this is a realistic expectation to the > >>> compiler > >>> users: to know al

Re: [wwwdocs] Document support for znver4 in gcc-13/changes.html

2023-03-22 Thread Richard Biener via Gcc-patches
On Tue, Mar 21, 2023 at 8:25 PM Martin Jambor wrote: > > Hello, > > is the following item documenting that gcc13 can generate code for Zen 4 > OK for the changes.html file on the web? OK. Note the gcc-12 changes for the upcoming 12.3 need something similar as most of the changes were backported.

[PATCH] rtl-optimization/109237 - speedup bb_is_just_return

2023-03-22 Thread Richard Biener via Gcc-patches
For the testcase bb_is_just_return is on top of the profile, changing it to walk BB insns backwards puts it off the profile. That's because in the forward walk you have to process possibly many debug insns but in a backward walk you very likely run into control insns first. Bootstrapped on x86_64

[PATCH] rtl-optimization/109237 - quadraticness in delete_trivially_dead_insns

2023-03-22 Thread Richard Biener via Gcc-patches
The following addresses quadraticness in processing debug insns in delete_trivially_dead_insns and insn_live_p by using TREE_VISITED on the INSN_VAR_LOCATION_DECL to indicate a later debug bind with the same decl and no intervening real insn or debug marker. That gets rid of the NEXT_INSN walk in i

[committed] MAINTAINERS: Add myself as OpenMP and libgomp maintainer

2023-03-22 Thread Tobias Burnus
Committed as r13-6798 Thanks for the trust – and additional workload ;-) Tobias - Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstraße 201, 80634 München; Gesellschaft mit beschränkter Haftung; Geschäftsführer: Thomas Heurung, Frank Thürauf; Sitz der Gesellschaft:

Re: [PATCH] range-op-float: Fix up -ffinite-math-only range extension and don't extend into infinities [PR109008]

2023-03-22 Thread Jakub Jelinek via Gcc-patches
On Wed, Mar 22, 2023 at 07:32:44AM +0100, Aldy Hernandez wrote: > On 3/21/23 14:56, Jakub Jelinek wrote: > > On Tue, Mar 21, 2023 at 02:49:49PM +0100, Aldy Hernandez wrote: > > > So, this? > > > > > > frange::set (tree type, > > > const REAL_VALUE_TYPE &min, > > > const REAL_VALUE_TYPE &max, >

Re: [PATCH][stage1] Remove conditionals around free()

2023-03-22 Thread Eric Gallager via Gcc-patches
On 3/4/23, Janne Blomqvist via Gcc-patches wrote: > On Wed, Mar 1, 2023 at 11:31 PM Bernhard Reutner-Fischer via Fortran > wrote: >> >> Hi! >> >> Mere cosmetics. >> >> - if (foo != NULL) >> free (foo); >> >> With the caveat that coccinelle ruins replacement whitespace or i'm >> uneducated eno

Re: [PATCH] Remove TARGET_GEN_MEMSET_SCRATCH_RTX since it's not used anymore.

2023-03-22 Thread Uros Bizjak via Gcc-patches
On Wed, Mar 22, 2023 at 3:59 AM liuhongt wrote: > > The target hook is only used by i386, and the current definition is > same as default gen_reg_rtx. So there's no need for this target hook. > > Bootstrapped and regtested on x86_64-pc-linux-gnu{-m32,}. > Ok for trunk(or GCC14)? > > gcc/ChangeLog: