Re: [aarch64] Use exact_log2 (INTVAL (operands[2])) >= 0 to gate for vec_merge patterns.

2023-01-18 Thread Prathamesh Kulkarni via Gcc-patches
On Wed, 18 Jan 2023 at 20:00, Richard Sandiford wrote: > > Prathamesh Kulkarni writes: > > Hi Richard, > > Based on your suggestion in the other thread, the patch uses > > exact_log2 (INTVAL (operands[2])) >= 0 to gate for vec_merge patterns. > > Bootstrap+test in progress on aarch64-linux-gnu.

Re: [PATCH] lto: pass through -funwind-tables and -fasynchronous-unwind-tables

2023-01-18 Thread Richard Biener via Gcc-patches
On Wed, Jan 18, 2023 at 4:07 PM Jan Hubicka wrote: > > > No unwind tables are generated, as if -funwind-tables is ignored. If > > LTO is disabled, everything works as expected. > I think it is because dwaf2out_do_eh_frame is called out of function > context at the end of compilation. At that

[PATCH] RISC-V: Fix pred_mov constraint for vle.v

2023-01-18 Thread juzhe . zhong
From: Ju-Zhe Zhong The original constraint is incorrect in pred_mov pattern. Take a look at Alternative 2, the operands[0] is "vr", operands[1] which is mask operand can be "vm". Such alternative matching will give the wrong codegen (vle.v v0,0(a5),v0.t) This is illegal according to RVV ISA. To

Re: [PATCH] middle-end/106075 - non-call EH and DSE

2023-01-18 Thread Richard Biener via Gcc-patches
On Wed, 18 Jan 2023, Jan Hubicka wrote: > > On Tue, 17 Jan 2023, Jan Hubicka wrote: > > > > > > > We don't use same argumentation about other control flow statements. > > > > > The following: > > > > > > > > > > fn() > > > > > { > > > > > try { > > > > > i_read_no_global_memory (); > > >

[PATCH] RISC-V: Add vlm/vsm C/C++ API intrinsics support

2023-01-18 Thread juzhe . zhong
From: Ju-Zhe Zhong gcc/ChangeLog: * config/riscv/riscv-vector-builtins-bases.cc (BASE): Add vlm/vsm support. * config/riscv/riscv-vector-builtins-bases.h: Ditto. * config/riscv/riscv-vector-builtins-functions.def (vlm): New define. (vsm): Ditto. *

[PATCH v3] xtensa: Eliminate unnecessary general-purpose reg-reg moves

2023-01-18 Thread Takayuki 'January June' Suwa via Gcc-patches
Register-register move instructions that can be easily seen as unnecessary by the human eye may remain in the compiled result. For example: /* example */ double test(double a, double b) { return __builtin_copysign(a, b); } test: add.n a3, a3, a3 extui a5, a5, 31, 1

[PATCH v4] xtensa: Eliminate the use of callee-saved register that saves and restores only once

2023-01-18 Thread Takayuki 'January June' Suwa via Gcc-patches
In the previous patch, if insn is JUMP_INSN or CALL_INSN, it bypasses the reg check (possibly FAIL). = In the case of the CALL0 ABI, values that must be retained before and after function calls are placed in the callee-saved registers (A12 through A15) and referenced later. However, it is

Re: [PATCH] x86: Check invalid third argument to __builtin_ia32_prefetch

2023-01-18 Thread Hongtao Liu via Gcc-patches
On Thu, Jan 19, 2023 at 3:12 AM H.J. Lu via Gcc-patches wrote: > > Check invalid third argument to __builtin_ia32_prefetch when expaning > __builtin_ia32_prefetch to avoid ICE later. Ok, thanks. > > gcc/ > > PR target/108436 > * config/i386/i386-expand.cc (ix86_expand_builtin):

Re: [Patch] libfortran: Fix execute_command_line for Windows

2023-01-18 Thread Jerry D via Gcc-patches
On 1/18/23 7:42 AM, Tobias Burnus wrote: Reported by nightstrike, who also tested this patch. On Windows, we call system() which works as described at https://learn.microsoft.com/en-us/cpp/c-runtime-library/reference/system-wsystem?view=msvc-170 Namely, it only fails with "-1" if the command

[r13-5244 Regression] FAIL: gcc.dg/analyzer/SARD-tc841-basic-00182-min.c (test for excess errors) on Linux/x86_64

2023-01-18 Thread Jiang, Haochen via Gcc-patches
The mail system is still broken on that machine, still sending this manually. Before that mail down, I will keep check the script daily to see if there is new regression. BTW, since there is a Bugzilla for r13-5202 regression, not resending that report On Linux/x86_64,

[PATCH v2] c++: -Wdangling-reference with reference wrapper [PR107532]

2023-01-18 Thread Marek Polacek via Gcc-patches
On Wed, Jan 18, 2023 at 04:07:59PM -0500, Jason Merrill wrote: > On 1/18/23 12:52, Marek Polacek wrote: > > Here, -Wdangling-reference triggers where it probably shouldn't, causing > > some grief. The code in question uses a reference wrapper with a member > > function returning a reference to a

[committed] libstdc++: Minor updates to Policy Based Data Structures: Biblio

2023-01-18 Thread Gerald Pfeifer
Segher kindly pointed out that when I changed the COM reference I claimed I updated the title, but didn't. This fixes that and updates www.open-std.org links. Pushed. Gerald libstdc++-v3/ChangeLog: 2023-01-18 Gerald Pfeifer * doc/xml/manual/policy_data_structures_biblio.xml:

[committed] libstdc++: Fix std::random_device::entropy() for non-posix targets

2023-01-18 Thread Jonathan Wakely via Gcc-patches
Tested x86_64-linux. Pushed to trunk. -- >8 -- Since the r12-4515-g58f339fc5eaae7 change std::random_device::entropy() returns non-zero for hardware sources such as RDRAND. However, the call to the underlying _M_getentropy function is conditionally compiled according to #if

[committed] libstdc++: Deprecate std::filesystem::u8path for C++20

2023-01-18 Thread Jonathan Wakely via Gcc-patches
Tested x86_64-linux. Pushed to trunk. -- >8 -- P0482R6 deprecated these functions for C++20. There was a ballot comment on the C++23 CD saying to un-deprecate it, but LEWG just rejected that, so let's add attributes to deprecate them. libstdc++-v3/ChangeLog: * include/bits/fs_path.h

Re: [PATCH] libstdc++: testsuite: Simplify codecvt_unicode

2023-01-18 Thread Jonathan Wakely via Gcc-patches
On Wed, 18 Jan 2023 at 19:52, Dimitrij Mijoski wrote: > > On Wed, 2023-01-18 at 18:53 +, Jonathan Wakely wrote: > > This doesn't compile in C++11 or C++14, because there's no guaranteed > > elision. > > I see. I just looked up in the docs and found that I need to put >

Re: [PATCH] c: ICE with nullptr as case expression [PR108424]

2023-01-18 Thread Joseph Myers
On Wed, 18 Jan 2023, Marek Polacek via Gcc-patches wrote: > In this ICE-on-invalid, we crash on > > gcc_assert (INTEGRAL_TYPE_P (type)); > > in perform_integral_promotions, because a nullptr is an INTEGER_CST, > but not INTEGRAL_TYPE_P, and check_case_value is only checking the > former. In

[PATCH] Fortran: error recovery for invalid CLASS component [PR108434]

2023-01-18 Thread Harald Anlauf via Gcc-patches
Dear all, I intend to commit the attached obvious fix for a NULL pointer dereference within the next 24h unless there are comment or objections. The patch has been checked with valgrind that it prevents invalid reads for the testcase, and it is certainly safe. Regtested on x86_64-pc-linux-gnu.

[PATCH] c: ICE with nullptr as case expression [PR108424]

2023-01-18 Thread Marek Polacek via Gcc-patches
In this ICE-on-invalid, we crash on gcc_assert (INTEGRAL_TYPE_P (type)); in perform_integral_promotions, because a nullptr is an INTEGER_CST, but not INTEGRAL_TYPE_P, and check_case_value is only checking the former. In the test I'm testing other "shall be an integral constant expression"

Re: [PATCH] c++: -Wdangling-reference with reference wrapper [PR107532]

2023-01-18 Thread Jason Merrill via Gcc-patches
On 1/18/23 12:52, Marek Polacek wrote: Here, -Wdangling-reference triggers where it probably shouldn't, causing some grief. The code in question uses a reference wrapper with a member function returning a reference to a subobject of a non-temporary object: const Plane & meta =

Re: [Patch] libfortran: Fix execute_command_line for Windows

2023-01-18 Thread Harald Anlauf via Gcc-patches
Hi Tobias, Am 18.01.23 um 16:42 schrieb Tobias Burnus: Reported by nightstrike, who also tested this patch. On Windows, we call system() which works as described at https://learn.microsoft.com/en-us/cpp/c-runtime-library/reference/system-wsystem?view=msvc-170 Namely, it only fails with "-1"

[PATCH 1/2] aarch64: fix ICE in aarch64_layout_arg [PR108411]

2023-01-18 Thread Christophe Lyon via Gcc-patches
The previous patch added an assert which should not be applied to PST types (Pure Scalable Types) because alignment does not matter in this case. This patch moves the assert after the PST case is handled to avoid the ICE. PR target/108411 gcc/ * config/aarch64/aarch64.cc

[PATCH 2/2] aarch64: add -fno-stack-protector to some tests [PR108411]

2023-01-18 Thread Christophe Lyon via Gcc-patches
As discussed in the PR, these recently added tests fail when the testsuite is executed with -fstack-protector-strong. To avoid this, this patch adds -fno-stack-protector to dg-options. PR target/108411 gcc/testsuite *

Re: [PATCH] libstdc++: testsuite: Simplify codecvt_unicode

2023-01-18 Thread Dimitrij Mijoski via Gcc-patches
On Wed, 2023-01-18 at 18:53 +, Jonathan Wakely wrote: > This doesn't compile in C++11 or C++14, because there's no guaranteed > elision. I see. I just looked up in the docs and found that I need to put --target_board=unix/-std=c++11 inside RUNTESTFLAGS to test in C++11 mode.

[PATCH] x86: Check invalid third argument to __builtin_ia32_prefetch

2023-01-18 Thread H.J. Lu via Gcc-patches
Check invalid third argument to __builtin_ia32_prefetch when expaning __builtin_ia32_prefetch to avoid ICE later. gcc/ PR target/108436 * config/i386/i386-expand.cc (ix86_expand_builtin): Check invalid third argument to __builtin_ia32_prefetch. gcc/testsuite/ *

Re: [PATCH] libstdc++: testsuite: Simplify codecvt_unicode

2023-01-18 Thread Jonathan Wakely via Gcc-patches
On 17/01/23 22:12 +0100, Dimitrij Mijoski wrote: Stop using unique_ptr, create some objects directly. libstdc++-v3/ChangeLog: * testsuite/22_locale/codecvt/codecvt_unicode.cc: Simplify. * testsuite/22_locale/codecvt/codecvt_unicode.h: Simplify. *

RE: [PATCH][GCC] arm: Add support for new frame unwinding instruction "0xb5".

2023-01-18 Thread Srinath Parvathaneni via Gcc-patches
Hi Ramana, > -Original Message- > From: Ramana Radhakrishnan > Sent: Sunday, November 20, 2022 10:48 PM > To: Srinath Parvathaneni > Cc: gcc-patches@gcc.gnu.org; Richard Earnshaw > ; Kyrylo Tkachov > Subject: Re: [PATCH][GCC] arm: Add support for new frame unwinding > instruction

[PATCH] c++: -Wdangling-reference with reference wrapper [PR107532]

2023-01-18 Thread Marek Polacek via Gcc-patches
Here, -Wdangling-reference triggers where it probably shouldn't, causing some grief. The code in question uses a reference wrapper with a member function returning a reference to a subobject of a non-temporary object: const Plane & meta = fm.planes().inner(); I've tried a few approaches,

[GCC][PATCH 13/15, v6] arm: Add support for dwarf debug directives and pseudo hard-register for PAC feature.

2023-01-18 Thread Srinath Parvathaneni via Gcc-patches
Hello, This patch teaches the DWARF support in gcc about RA_AUTH_CODE pseudo hard-register and also updates the ".save", ".cfi_register", ".cfi_offset", ".cfi_restore" directives accordingly. This patch also adds support to emit ".pacspval" directive when "pac ip, lr, sp" instruction in

[committed] analyzer: add SARD testsuite 81

2023-01-18 Thread David Malcolm via Gcc-patches
A 2013 paper [1] proposed 5 simple tests for evaluating the effectiveness of static analysis tools at detecting CWE-121 ("Stack-based Buffer Overflow"). The tests can be found in: https://samate.nist.gov/SARD/test-suites/81 This patch adds theses 5 tests to -fanalyzer's testsuite, lightly

Re: [GCC][PATCH 13/15, v5] arm: Add support for dwarf debug directives and pseudo hard-register for PAC feature.

2023-01-18 Thread Richard Earnshaw via Gcc-patches
On 13/01/2023 17:44, Srinath Parvathaneni via Gcc-patches wrote: Hello, This patch teaches the DWARF support in gcc about RA_AUTH_CODE pseudo hard-register and also updates the ".save", ".cfi_register", ".cfi_offset", ".cfi_restore" directives accordingly. This patch also adds support to

Re: [PATCH] lto: pass through -funwind-tables and -fasynchronous-unwind-tables

2023-01-18 Thread Jakub Jelinek via Gcc-patches
On Wed, Jan 18, 2023 at 05:25:10PM +0100, Jan Hubicka wrote: > > On Jan 18 2023, Michael Matz wrote: > > > > > The purest solution is to emit unwind tables for all functions that > > > request it into .eh_frame and for those that don't request it put > > > into .debug_frame (if also -g is on).

Re: [PATCH] lto: pass through -funwind-tables and -fasynchronous-unwind-tables

2023-01-18 Thread Jan Hubicka via Gcc-patches
> On Jan 18 2023, Michael Matz wrote: > > > The purest solution is to emit unwind tables for all functions that > > request it into .eh_frame and for those that don't request it put > > into .debug_frame (if also -g is on). > > The assembler does not allow switching back to .eh_frame once a >

Re: [PATCH] lto: pass through -funwind-tables and -fasynchronous-unwind-tables

2023-01-18 Thread Andreas Schwab via Gcc-patches
On Jan 18 2023, Michael Matz wrote: > The purest solution is to emit unwind tables for all functions that > request it into .eh_frame and for those that don't request it put > into .debug_frame (if also -g is on). The assembler does not allow switching back to .eh_frame once a different format

[Patch] libfortran: Fix execute_command_line for Windows

2023-01-18 Thread Tobias Burnus
Reported by nightstrike, who also tested this patch. On Windows, we call system() which works as described at https://learn.microsoft.com/en-us/cpp/c-runtime-library/reference/system-wsystem?view=msvc-170 Namely, it only fails with "-1" if the command interpreter could not be started.

Re: [PATCH] IPA: do not release body if still needed

2023-01-18 Thread Jan Hubicka via Gcc-patches
> The code removing function bodies when the last call graph clone of a > node is removed is too aggressive when there are nodes up the > clone_of chain which still need them. Fixed by expanding the check. > > gcc/ChangeLog: > > 2023-01-18 Martin Jambor > > PR ipa/107944 > *

Re: [PATCH] lto: pass through -funwind-tables and -fasynchronous-unwind-tables

2023-01-18 Thread Michael Matz via Gcc-patches
Hello, On Wed, 18 Jan 2023, Jakub Jelinek wrote: > > > > > Partly OT, what is riscv not defaulting that on as well? Does it have > > > > > usable unwind info even without that option, something else? > > > > > > > > The RISC-V ABI does not address this, AFAICS. > > > > > > And neither do many

Re: [PATCH] middle-end/106075 - non-call EH and DSE

2023-01-18 Thread Jan Hubicka via Gcc-patches
> On Tue, 17 Jan 2023, Jan Hubicka wrote: > > > > > We don't use same argumentation about other control flow statements. > > > > The following: > > > > > > > > fn() > > > > { > > > > try { > > > > i_read_no_global_memory (); > > > > } catch (...) > > > > { > > > > reutrn 1; > > > >

Re: [PATCH] lto: pass through -funwind-tables and -fasynchronous-unwind-tables

2023-01-18 Thread Jakub Jelinek via Gcc-patches
On Wed, Jan 18, 2023 at 03:16:07PM +, Michael Matz wrote: > On Wed, 18 Jan 2023, Jakub Jelinek wrote: > > > On Wed, Jan 18, 2023 at 04:09:08PM +0100, Andreas Schwab wrote: > > > On Jan 18 2023, Jakub Jelinek wrote: > > > > > > > Partly OT, what is riscv not defaulting that on as well? Does

Re: [PATCH] lto: pass through -funwind-tables and -fasynchronous-unwind-tables

2023-01-18 Thread Michael Matz via Gcc-patches
Hello, On Wed, 18 Jan 2023, Jakub Jelinek wrote: > On Wed, Jan 18, 2023 at 04:09:08PM +0100, Andreas Schwab wrote: > > On Jan 18 2023, Jakub Jelinek wrote: > > > > > Partly OT, what is riscv not defaulting that on as well? Does it have > > > usable unwind info even without that option,

Re: [PATCH] lto: pass through -funwind-tables and -fasynchronous-unwind-tables

2023-01-18 Thread Andreas Schwab via Gcc-patches
On Jan 18 2023, Jakub Jelinek wrote: > Neither of that will always match all the states of all the functions. But if the translation units are compiled with -funwind-tables, we want the ltrans "units" to behave the same. -- Andreas Schwab, SUSE Labs, sch...@suse.de GPG Key fingerprint = 0196

Re: [PATCH] lto: pass through -funwind-tables and -fasynchronous-unwind-tables

2023-01-18 Thread Jakub Jelinek via Gcc-patches
On Wed, Jan 18, 2023 at 04:09:08PM +0100, Andreas Schwab wrote: > On Jan 18 2023, Jakub Jelinek wrote: > > > Partly OT, what is riscv not defaulting that on as well? Does it have > > usable unwind info even without that option, something else? > > The RISC-V ABI does not address this, AFAICS.

Re: [PATCH] lto: pass through -funwind-tables and -fasynchronous-unwind-tables

2023-01-18 Thread Andreas Schwab via Gcc-patches
On Jan 18 2023, Jakub Jelinek wrote: > Partly OT, what is riscv not defaulting that on as well? Does it have > usable unwind info even without that option, something else? The RISC-V ABI does not address this, AFAICS. -- Andreas Schwab, SUSE Labs, sch...@suse.de GPG Key fingerprint = 0196

Re: [PATCH] lto: pass through -funwind-tables and -fasynchronous-unwind-tables

2023-01-18 Thread Jan Hubicka via Gcc-patches
> No unwind tables are generated, as if -funwind-tables is ignored. If > LTO is disabled, everything works as expected. I think it is because dwaf2out_do_eh_frame is called out of function context at the end of compilation. At that time cfun is NULL and the flag is read from global settings that

Re: [PATCH] IPA: do not release body if still needed

2023-01-18 Thread Martin Jambor
Hi, On Mon, Jan 16 2023, Martin Liška wrote: > On 1/14/23 22:36, Jan Hubicka wrote: >>> Noticed during building of libbackend.a with the LTO partial linking. >>> >>> The function release_body is called even if clone_of is a clone >>> of a another function and thus it shares tree declaration. We

Re: [aarch64] Use exact_log2 (INTVAL (operands[2])) >= 0 to gate for vec_merge patterns.

2023-01-18 Thread Richard Sandiford via Gcc-patches
Prathamesh Kulkarni writes: > Hi Richard, > Based on your suggestion in the other thread, the patch uses > exact_log2 (INTVAL (operands[2])) >= 0 to gate for vec_merge patterns. > Bootstrap+test in progress on aarch64-linux-gnu. > Does it look OK ? Yeah, this is OK, thanks. IMO it's a latent

Re: [aarch64] Use wzr/xzr for assigning vector element to 0

2023-01-18 Thread Richard Sandiford via Gcc-patches
Prathamesh Kulkarni writes: > On Tue, 17 Jan 2023 at 18:29, Richard Sandiford > wrote: >> >> Prathamesh Kulkarni writes: >> > Hi Richard, >> > For the following (contrived) test: >> > >> > void foo(int32x4_t v) >> > { >> > v[3] = 0; >> > return v; >> > } >> > >> > -O2 code-gen: >> > foo: >>

Re: [PATCH] lto: pass through -funwind-tables and -fasynchronous-unwind-tables

2023-01-18 Thread Jakub Jelinek via Gcc-patches
On Wed, Jan 18, 2023 at 02:03:42PM +, Michael Matz wrote: > On Risc-V btw. (which, unlike i386,aarch64,s390,rs6000 does not > effectively enable funwind-tables always via either backend or > common/config/$arch/ code, which is the reason why the problem can't be > seen there). It's an

Re: [PATCH] lto: pass through -funwind-tables and -fasynchronous-unwind-tables

2023-01-18 Thread Jakub Jelinek via Gcc-patches
On Wed, Jan 18, 2023 at 03:14:01PM +0100, Andreas Schwab wrote: > On Jan 18 2023, Michael Matz wrote: > > > So, it's quite clear that the option merging algorithm related to all this > > is somewhat broken, the global (or per function, or whatever) > > -funwind-tables option from hello.o

Re: [PATCH] lto: pass through -funwind-tables and -fasynchronous-unwind-tables

2023-01-18 Thread Andreas Schwab via Gcc-patches
On Jan 18 2023, Michael Matz wrote: > So, it's quite clear that the option merging algorithm related to all this > is somewhat broken, the global (or per function, or whatever) > -funwind-tables option from hello.o doesn't make it correctly into the > output (when -g is there). Adding

[PATCH] wwwdocs: Announce Solaris 11.3 obsoletion

2023-01-18 Thread Rainer Orth
Here's the changes.html patch corresponding to the Solaris 11.3 obsoletion notice in https://gcc.gnu.org/pipermail/gcc/2022-December/240322.html https://gcc.gnu.org/pipermail/gcc-patches/2022-December/608384.html Since this is the only obsoletion in GCC 13 so far, I haven't

Re: [PATCH] lto: pass through -funwind-tables and -fasynchronous-unwind-tables

2023-01-18 Thread Michael Matz via Gcc-patches
On Wed, 18 Jan 2023, Andreas Schwab via Gcc-patches wrote: > No unwind tables are generated, as if -funwind-tables is ignored. If > LTO is disabled, everything works as expected. On Risc-V btw. (which, unlike i386,aarch64,s390,rs6000 does not effectively enable funwind-tables always via

[PATCH] lto/108445 - avoid LTO decl wrapping being confused by tree sharing

2023-01-18 Thread Richard Biener via Gcc-patches
r13-4743 exposed more tree sharing which runs into a latent issue with LTO decl wrapping during streaming. The following adds a testcase triggering the issue. Pushed. PR lto/108445 * gcc.dg/lto/pr108445_0.c: New testcase. * gcc.dg/lto/pr108445_1.c: Likewise. ---

Re: [PATCH] middle-end/108086 - avoid unshare_expr when remapping SSA names

2023-01-18 Thread Richard Biener via Gcc-patches
On Fri, 16 Dec 2022, Richard Biener wrote: > r0-89280-g129a37fc319db8 added unsharing to remap_ssa_name but > that wasn't in the version of the patch posted. That has some > non-trivial cost through mostly_copy_tree_r and copy_tree_r but > more importantly it doesn't seem to be necessary. I've

Re: [PATCH] lto: pass through -funwind-tables and -fasynchronous-unwind-tables

2023-01-18 Thread Andreas Schwab via Gcc-patches
On Jan 18 2023, Jakub Jelinek wrote: > That is streamed in by lto1 back and on each set_cfun such saved options > are stored into global_options{,_set}. Is that done in time for dwarf2out_do_eh_frame? -- Andreas Schwab, SUSE Labs, sch...@suse.de GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE

Re: [PATCH] lto: pass through -funwind-tables and -fasynchronous-unwind-tables

2023-01-18 Thread Andreas Schwab via Gcc-patches
No unwind tables are generated, as if -funwind-tables is ignored. If LTO is disabled, everything works as expected. -- Andreas Schwab, SUSE Labs, sch...@suse.de GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7 "And now for something completely different."

Re: [PATCH] libgcc: Fix uninitialized RA signing on AArch64 [PR107678]

2023-01-18 Thread Wilco Dijkstra via Gcc-patches
Hi, >> +  /* Return-address signing state is toggled by DW_CFA_GNU_window_save >> (where >> + REG_UNDEFINED means enabled), or set by a DW_CFA_expression.  */ > > Needs updating to REG_UNSAVED_ARCHEXT. > > OK with that changes, thanks, and sorry for the delays & runaround. Thanks, I've

Re: [PATCH] lto: pass through -funwind-tables and -fasynchronous-unwind-tables

2023-01-18 Thread Jakub Jelinek via Gcc-patches
On Wed, Jan 18, 2023 at 01:39:18PM +0100, Andreas Schwab wrote: > On Jan 18 2023, Jakub Jelinek wrote: > > > With LTO each function has the DECL_FUNCTION_SPECIFIC_OPTIMIZATION > > (and _TARGET), for functions with optimize attribute obviously as without > > LTO specific to what options have been

Re: [wwwdocs] gcc-13/changes.html + projects/gomp/: OpenMP update

2023-01-18 Thread Tobias Burnus
Hi Gerald, On 16.01.23 23:16, Gerald Pfeifer wrote: On Mon, 16 Jan 2023, Tobias Burnus wrote: requires_offload, unified_address - and unified_shared_memory clauses cause that the - only available device is the initial device (the host). Fortran now + and

Re: [PATCH] lto: pass through -funwind-tables and -fasynchronous-unwind-tables

2023-01-18 Thread Andreas Schwab via Gcc-patches
On Jan 18 2023, Jakub Jelinek wrote: > With LTO each function has the DECL_FUNCTION_SPECIFIC_OPTIMIZATION > (and _TARGET), for functions with optimize attribute obviously as without > LTO specific to what options have been overridden (but with defaults from > TU's command line etc.), for

Re: [PATCH] lto: pass through -funwind-tables and -fasynchronous-unwind-tables

2023-01-18 Thread Jakub Jelinek via Gcc-patches
On Wed, Jan 18, 2023 at 01:30:53PM +0100, Andreas Schwab wrote: > On Jan 18 2023, Jakub Jelinek wrote: > > > On Wed, Jan 18, 2023 at 12:25:11PM +0100, Andreas Schwab via Gcc-patches > > wrote: > >> On Jan 18 2023, Richard Biener wrote: > >> > >> > On Wed, Jan 18, 2023 at 11:17 AM Andreas Schwab

Re: [PATCH] lto: pass through -funwind-tables and -fasynchronous-unwind-tables

2023-01-18 Thread Andreas Schwab via Gcc-patches
On Jan 18 2023, Jakub Jelinek wrote: > On Wed, Jan 18, 2023 at 12:25:11PM +0100, Andreas Schwab via Gcc-patches > wrote: >> On Jan 18 2023, Richard Biener wrote: >> >> > On Wed, Jan 18, 2023 at 11:17 AM Andreas Schwab via Gcc-patches >> > wrote: >> >> >> >> The -funwind-tables and

Re: [PATCH][GCC] arm: fix __arm_vld1q_z* and __arm_vst1q_p* intrinsics.

2023-01-18 Thread Richard Earnshaw via Gcc-patches
On 22/12/2021 16:21, Murray Steele via Gcc-patches wrote: Hi, On 22/12/2021 16:04, Richard Earnshaw wrote: Is there a PR in bugzilla for this? R. No, not at this time. It's something I came across whilst making changes of my own. For completeness, the ACLE specification I am

Re: [PATCH] lto: pass through -funwind-tables and -fasynchronous-unwind-tables

2023-01-18 Thread Jakub Jelinek via Gcc-patches
On Wed, Jan 18, 2023 at 12:25:11PM +0100, Andreas Schwab via Gcc-patches wrote: > On Jan 18 2023, Richard Biener wrote: > > > On Wed, Jan 18, 2023 at 11:17 AM Andreas Schwab via Gcc-patches > > wrote: > >> > >> The -funwind-tables and -fasynchronous-unwind-tables options are relevant > >> for

Re: [PATCH] lto: pass through -funwind-tables and -fasynchronous-unwind-tables

2023-01-18 Thread Andreas Schwab via Gcc-patches
On Jan 18 2023, Richard Biener wrote: > On Wed, Jan 18, 2023 at 11:17 AM Andreas Schwab via Gcc-patches > wrote: >> >> The -funwind-tables and -fasynchronous-unwind-tables options are relevant >> for the output pass, thus they need to be passed through by the lto >> wrapper. > > They are already

Re: [PATCH] lto: pass through -funwind-tables and -fasynchronous-unwind-tables

2023-01-18 Thread Richard Biener via Gcc-patches
On Wed, Jan 18, 2023 at 11:17 AM Andreas Schwab via Gcc-patches wrote: > > The -funwind-tables and -fasynchronous-unwind-tables options are relevant > for the output pass, thus they need to be passed through by the lto > wrapper. They are already stored per function, and ... > gcc/ > *

[aarch64] Use exact_log2 (INTVAL (operands[2])) >= 0 to gate for vec_merge patterns.

2023-01-18 Thread Prathamesh Kulkarni via Gcc-patches
Hi Richard, Based on your suggestion in the other thread, the patch uses exact_log2 (INTVAL (operands[2])) >= 0 to gate for vec_merge patterns. Bootstrap+test in progress on aarch64-linux-gnu. Does it look OK ? Thanks, Prathamesh [aarch64] Use exact_log2 (INTVAL (operands[2])) >= 0 to gate for

Re: [aarch64] Use wzr/xzr for assigning vector element to 0

2023-01-18 Thread Prathamesh Kulkarni via Gcc-patches
On Tue, 17 Jan 2023 at 18:29, Richard Sandiford wrote: > > Prathamesh Kulkarni writes: > > Hi Richard, > > For the following (contrived) test: > > > > void foo(int32x4_t v) > > { > > v[3] = 0; > > return v; > > } > > > > -O2 code-gen: > > foo: > > fmovs1, wzr > > ins

realpath() patch to fix symlinks resolution for win32

2023-01-18 Thread i.nixman--- via Gcc-patches
hello again! the final version of the path for https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108350 successfully bootstraped for x86_64-mingw32 and x86_64-linux. could anyone apply it please? best! diff --git a/libiberty/lrealpath.c b/libiberty/lrealpath.c index 3c7053b0b70..a1ad074d00e

Re: [PATCH] xtensa: Optimize inversion of the MSB

2023-01-18 Thread Max Filippov via Gcc-patches
On Tue, Jan 17, 2023 at 9:43 PM Takayuki 'January June' Suwa wrote: > > Such operation can be done either bitwise-XOR or addition with -2147483648, > but the latter is one byte less if TARGET_DENSITY. > > gcc/ChangeLog: > > * config/xtensa/xtensa.md (xorsi3_internal): > Rename

[PATCH] lto: pass through -funwind-tables and -fasynchronous-unwind-tables

2023-01-18 Thread Andreas Schwab via Gcc-patches
The -funwind-tables and -fasynchronous-unwind-tables options are relevant for the output pass, thus they need to be passed through by the lto wrapper. gcc/ * lto-wrapper.cc (merge_and_complain): Pass through -funwind-tables and -fasynchronous-unwind-tables.

Re: [PATCH v6] LoongArch: Fixed a compilation failure with '%c' in inline assembly [PR107731].

2023-01-18 Thread Richard Sandiford via Gcc-patches
Lulu Cheng writes: > Co-authored-by: Yang Yujie > > gcc/ChangeLog: > > * config/loongarch/loongarch.cc (loongarch_classify_address): > Add precessint for CONST_INT. > (loongarch_print_operand_reloc): Operand modifier 'c' is supported. > (loongarch_print_operand): Increase

Re: Ping: [PATCH v4] rs6000: Fix incorrect RTL for Power LE when removing the UNSPECS [PR106069]

2023-01-18 Thread Kewen.Lin via Gcc-patches
Hi Segher, I guessed that this patch escaped from your radar. :) As Jakub asked the status in PR106069, I applied this attached patch from Xionghu to the latest trunk, re-tested it and confirmed that it's still bootstrapped and regtested on powerpc64-linux-gnu P8 and powerpc64le-linux-gnu P9

Re: [PATCH v2] xtensa: Eliminate unnecessary general-purpose reg-reg moves

2023-01-18 Thread Max Filippov via Gcc-patches
Hi Suwa-san, On Tue, Jan 17, 2023 at 9:25 PM Takayuki 'January June' Suwa wrote: > > Register-register move instructions that can be easily seen as > unnecessary by the human eye may remain in the compiled result. > For example: > > /* example */ > double test(double a, double b) { > return

Re: [PATCH 1/1] [fwprop]: Add the support of forwarding the vec_duplicate rtx

2023-01-18 Thread Richard Sandiford via Gcc-patches
"丁乐华" writes: > > I don't think this pattern is correct, because SEL isn't commutative > > in the vector operands. > > Indeed, I think I should invert PRED operand or the comparison > operator which produce the PRED operand first. That would work, but it would no longer be a win. The vectoriser

Re: [PATCH v3] xtensa: Eliminate the use of callee-saved register that saves and restores only once

2023-01-18 Thread Max Filippov via Gcc-patches
Hi Suwa-san, On Tue, Jan 17, 2023 at 8:23 PM Takayuki 'January June' Suwa wrote: > In the case of the CALL0 ABI, values that must be retained before and > after function calls are placed in the callee-saved registers (A12 > through A15) and referenced later. However, it is often the case that >

Re: [PATCH/RFC] rs6000: Remove optimize_for_speed check for implicit TARGET_SAVE_TOC_INDIRECT [PR108184]

2023-01-18 Thread Kewen.Lin via Gcc-patches
Hi Mike, Thanks for the comments! on 2023/1/18 04:57, Michael Meissner wrote: > On Mon, Jan 16, 2023 at 05:39:04PM +0800, Kewen.Lin wrote: >> Hi, >> >> Now we will check optimize_function_for_speed_p (cfun) for >> TARGET_SAVE_TOC_INDIRECT if it's implicitly enabled. But >> the effect of

[PATCH 2/2] rs6000: Refactor genfusion.pl a bit further

2023-01-18 Thread Kewen.Lin via Gcc-patches
Hi, To keep the previous refactoring patch not need to re-generate fusion.md and make the review easier, I didn't merge this patch into the previous one. But I think this one can help to make the subroutine gen_logical_addsubf_scalar more clear, by separating logical-logical and add-logical

Re: [PATCH] middle-end/106075 - non-call EH and DSE

2023-01-18 Thread Richard Biener via Gcc-patches
On Tue, 17 Jan 2023, Jan Hubicka wrote: > > > We don't use same argumentation about other control flow statements. > > > The following: > > > > > > fn() > > > { > > > try { > > > i_read_no_global_memory (); > > > } catch (...) > > > { > > > reutrn 1; > > > } > > > return 0; > >

[PATCH 1/2] rs6000: Refactor script genfusion.pl

2023-01-18 Thread Kewen.Lin via Gcc-patches
Hi, As Segher suggested in [1], this patch is to refactor the script genfusion.pl for generating fusion.md. It mainly consists of: 1) Add main subroutine, which calls several backbone subroutines, hope it can show the skeleton clearly. 2) Encapsulate copyright and top comments emission

[PATCH, rs6000] Convert TI AND with a special constant to DI AND [PR93123]

2023-01-18 Thread HAO CHEN GUI via Gcc-patches
Hi, When TI AND with a special constant (the high part or low part is all ones), it may be converted to DI AND with a 64-bit constant and a simple DI move. When the DI AND can be implemented by rotate and mask or "andi.", it eliminates the 128-bit constant loading to save the cost. The patch

[committed] wwwdocs: gcc-4.6: Adjust www.open-std.org links to https

2023-01-18 Thread Gerald Pfeifer
Pushed Gerald --- htdocs/gcc-4.6/changes.html | 2 +- htdocs/gcc-4.6/cxx0x_status.html | 122 +++ 2 files changed, 62 insertions(+), 62 deletions(-) diff --git a/htdocs/gcc-4.6/changes.html b/htdocs/gcc-4.6/changes.html index eb71f855..c96d347f 100644 ---

Re: [PATCH] tree-optimization/104475 - bogus -Wstringop-overflow

2023-01-18 Thread Richard Biener via Gcc-patches
On Tue, 17 Jan 2023, Jason Merrill wrote: > On 12/7/22 06:25, Richard Biener wrote: > > The following avoids a bogus -Wstringop-overflow diagnostic by > > properly recognizing that >m_mutex cannot be nullptr in C++ > > even if m_mutex is at offset zero. The frontend already diagnoses > > a