Re: [committed] jit: further doc fixes

2022-04-01 Thread David Malcolm via Gcc-patches
On Fri, 2022-04-01 at 12:26 -0400, Eric Gallager wrote: > On Fri, Apr 1, 2022 at 9:28 AM David Malcolm via Gcc-patches > wrote: > > > > Further jit doc fixes, which fix links to > > gcc_jit_function_type_get_param_type and gcc_jit_struct_get_field. > > > > I also regenerated libgccjit.texi (not

Re: [PATCH] rs6000: Adjust mov optabs for opaque modes [PR103353]

2022-04-01 Thread Peter Bergner via Gcc-patches
On 4/1/22 3:50 PM, will schmidt wrote: > Is there a testcase, new or existing, that illustrates this error path? Well, the already existsing test case pr101849.c is where the issue was seen, but only when compiled by hand outside of the test harness and using only the -maltivec option and not the

Re: [PATCH] rs6000: Adjust mov optabs for opaque modes [PR103353]

2022-04-01 Thread will schmidt via Gcc-patches
On Thu, 2022-03-03 at 16:38 +0800, Kewen.Lin via Gcc-patches wrote: > Hi, > Hi > As PR103353 shows, we may want to continue to expand a MMA built-in > function like a normal function, even if we have already emitted > error messages about some missing required conditions. As shown in > that

Re: -Wformat-overflow handling for %b and %B directives in C2X standard

2022-04-01 Thread Marek Polacek via Gcc-patches
On Sat, Apr 02, 2022 at 12:19:47AM +0500, Frolov Daniil via Gcc-patches wrote: > Hello, I've noticed that -Wformat-overflow doesn't handle %b and %B > directives in the sprintf function. I've added a relevant issue in bugzilla > (bug #105129). > I attach a patch with a possible solution to the

[PATCH 7/8] Output BTF DECL_TAG and TYPE_TAG types

2022-04-01 Thread David Faust via Gcc-patches
This patch updates btfout.cc to be aware of the DECL_TAG and TYPE_TAG kinds and output them appropriately. gcc/ * btfout.cc (get_btf_kind): Handle TYPE_TAG and DECL_TAG kinds. (btf_calc_num_vbytes): Likewise. (btf_asm_type): Likewise. (output_asm_btf_vlen_bytes):

[PATCH 8/8] testsuite: Add tests for BTF tags

2022-04-01 Thread David Faust via Gcc-patches
This commit adds tests for the tags, in BTF and in DWARF. gcc/teststuite/ * gcc.dg/debug/btf/btf-decltag-func.c: New test. * gcc.dg/debug/btf/btf-decltag-sou.c: Likewise. * gcc.dg/debug/btf/btf-decltag-typedef.c: Likewise. * gcc.dg/debug/btf/btf-typetag-1.c:

[PATCH 6/8] dwarf2ctf: convert tag DIEs to CTF types

2022-04-01 Thread David Faust via Gcc-patches
This patch makes the DWARF-to-CTF conversion process aware of the new DW_TAG_GNU_annotation DIEs. The DIEs are converted to CTF_K_DECL_TAG or CTF_K_TYPE_TAG types as approprate and added to the compilation unit CTF container. gcc/ * dwarf2ctf.cc (handle_btf_tags): New function.

[PATCH 5/8] ctfc: Add support to pass through BTF annotations

2022-04-01 Thread David Faust via Gcc-patches
BTF generation currently relies on the internal CTF representation to convert debug info from DWARF dies. This patch adds a new internal header, "ctf-int.h", which defines CTF kinds to be used internally to represent BTF tags which must pass through the CTF container. It also adds a new type for

[PATCH 4/8] dwarf: create BTF decl and type tag DIEs

2022-04-01 Thread David Faust via Gcc-patches
The "btf_decl_tag" and "btf_type_tag" attributes are handled by constructing DW_TAG_LLVM_annotation DIEs. The DIEs are children of the declarations or types which they annotate, and convey the annotation via a string constant. Currently, all generation of these DIEs is gated behind

[PATCH 3/8] c-family: Add BTF tag attribute handlers

2022-04-01 Thread David Faust via Gcc-patches
This patch adds attribute handlers in GCC for two attributes already supported in LLVM: "btf_decl_tag" and "btf_type_tag". Both attributes accept a single string constant argument, and are used to add arbitrary annotations to debug information generated for the types/decls to which they apply.

[PATCH 2/8] include: Add BTF tag defines to dwarf2 and btf

2022-04-01 Thread David Faust via Gcc-patches
include/ * btf.h: Add BTF_KIND_DECL_TAG and BTF_KIND_TYPE_TAG defines. Update comments. (struct btf_decl_tag): New. * dwarf2.def: Add new DWARF extension DW_TAG_GNU_annotation. --- include/btf.h | 17 +++-- include/dwarf2.def | 4 2 files

[PATCH 1/8] dwarf: Add dw_get_die_parent function

2022-04-01 Thread David Faust via Gcc-patches
gcc/ * dwarf2out.cc (dw_get_die_parent): New function. * dwarf2out.h (dw_get_die_parent): Declare it here. --- gcc/dwarf2out.cc | 8 gcc/dwarf2out.h | 1 + 2 files changed, 9 insertions(+) diff --git a/gcc/dwarf2out.cc b/gcc/dwarf2out.cc index 5681b01749a..35322fb5f6e

[PATCH 0/8][RFC] Support BTF decl_tag and type_tag annotations

2022-04-01 Thread David Faust via Gcc-patches
Hello, This patch series is a first attempt at adding support for: - Two new C-language-level attributes that allow to associate (to "tag") particular declarations and types with arbitrary strings. As explained below, this is intended to be used to, for example, characterize certain pointer

-Wformat-overflow handling for %b and %B directives in C2X standard

2022-04-01 Thread Frolov Daniil via Gcc-patches
Hello, I've noticed that -Wformat-overflow doesn't handle %b and %B directives in the sprintf function. I've added a relevant issue in bugzilla (bug #105129). I attach a patch with a possible solution to the letter. From 2051344e9500651f6e94c44cbc7820715382b957 Mon Sep 17 00:00:00 2001 From:

[PATCH] c, c++: attribute format on a ctor with a vbase [PR101833, PR47634]

2022-04-01 Thread Marek Polacek via Gcc-patches
Attribute format takes three arguments: archetype, string-index, and first-to-check. The last two specify the position in the function parameter list. r63030 clarified that "Since non-static C++ methods have an implicit this argument, the arguments of such methods should be counted from two, not

Re: [PATCH] c++: Fix ICE due to shared BLOCK node in coroutine generation [PR103328]

2022-04-01 Thread Jason Merrill via Gcc-patches
On 3/30/22 09:06, Benno Evers via Gcc-patches wrote: From: Benno Evers When finishing a function that is a coroutine, the function is transformed into a "ramp" function, and the original user-provided function body gets moved into a newly created "actor" function. In this case

Re: [patch]update the documentation for TARGET_ZERO_CALL_USED_REGS hook and add an assertion

2022-04-01 Thread Qing Zhao via Gcc-patches
FYI. I have committed the change to upstream as: 31933f4f788b6cd64cbb7ee42076997f6d0fe212 Qing > On Mar 31, 2022, at 8:10 AM, Richard Sandiford > wrote: > > Qing Zhao writes: >> Hi, >> >> Per our discussion on: >> https://gcc.gnu.org/pipermail/gcc-patches/2022-March/592002.html >> >> I

Re: [PATCH] c++: deduction for dependent class type of NTTP [PR105110]

2022-04-01 Thread Jason Merrill via Gcc-patches
On 3/30/22 17:51, Patrick Palka wrote: Here deduction for the P/A pair V/a spuriously fails with types ‘A’ and ‘const A’ have incompatible cv-qualifiers because the argument type is const, whereas the parameter type is non-const. Since the type of an NTTP is always cv-unqualified, it seems

Re: [PATCH] c-family: Tweak -Woverflow diagnostic

2022-04-01 Thread Jason Merrill via Gcc-patches
On 3/30/22 18:28, Marek Polacek wrote: When g++ emits warning: overflow in conversion from 'int' to 'char' changes value from '300' to '','' for code like "char c = 300;" it might raise a few eyebrows. With this warning we're not interested in the ASCII representation of the char, only the

Re: [PATCH] c++: implicit guides should inherit class constraints [PR104873]

2022-04-01 Thread Jason Merrill via Gcc-patches
On 4/1/22 11:17, Patrick Palka wrote: An implicit guide already inherits the (rewritten) constraints of the constructor. Thus it seems natural that the guide must also inherit the constraints of the class template, since a constructor's constraints might assume the class's constraints are

Re: [PATCH 2/4] Make vsx_splat__reg use correct insn attributes, PR target/99293

2022-04-01 Thread Segher Boessenkool
On Wed, Mar 30, 2022 at 06:41:59PM -0400, Michael Meissner wrote: > On Mon, Mar 28, 2022 at 03:28:39PM -0500, Segher Boessenkool wrote: > > On Mon, Mar 28, 2022 at 12:27:05PM -0400, Michael Meissner wrote: > > > In looking at PR target/99293, I noticed that the code in the insn > > >

[PATCH] Replace UNSPEC with RTL code for extendditi2.

2022-04-01 Thread Michael Meissner via Gcc-patches
eplace UNSPEC with RTL code for extendditi2. When I submitted my patch on March 12th for extendditi2, Segher wished I had removed the use of the UNSPEC for the vextsd2q instruction. This patch rewrites extendditi2_vector to use VEC_SELECT rather than UNSPEC. I have built a power10 little endian

[wwwdocs PATCH] document zero-width field ABI changes on MIPS

2022-04-01 Thread Xi Ruoyao via Gcc-patches
Document PR102024 change (r12-7961 and 7962) for MIPS. Ok for wwwdocs? -- htdocs/gcc-12/changes.html | 17 - 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/htdocs/gcc-12/changes.html b/htdocs/gcc-12/changes.html index 4e1f6b0f..a2d8156f 100644 ---

Re: [committed] jit: further doc fixes

2022-04-01 Thread Eric Gallager via Gcc-patches
On Fri, Apr 1, 2022 at 9:28 AM David Malcolm via Gcc-patches wrote: > > Further jit doc fixes, which fix links to > gcc_jit_function_type_get_param_type and gcc_jit_struct_get_field. > > I also regenerated libgccjit.texi (not included in the diff below). > > Tested with "make html" and with a

Re: [PATCH][libgomp, testsuite, nvptx] Limit recursion in declare_target-{1,2}.f90

2022-04-01 Thread Tom de Vries via Gcc-patches
On 4/1/22 17:38, Jakub Jelinek wrote: On Fri, Apr 01, 2022 at 05:34:50PM +0200, Tom de Vries wrote: Do you perhaps have an idea why it's failing? Because you call on_device_arch_nvptx () outside of !$omp target region, so unless the host device is NVPTX, it will not be true. That bit does

Re: [PATCH][libgomp, testsuite, nvptx] Limit recursion in declare_target-{1,2}.f90

2022-04-01 Thread Jakub Jelinek via Gcc-patches
On Fri, Apr 01, 2022 at 05:34:50PM +0200, Tom de Vries wrote: > Do you perhaps have an idea why it's failing? Because you call on_device_arch_nvptx () outside of !$omp target region, so unless the host device is NVPTX, it will not be true. > +program e_53_1 > + use e_53_1_mod, only : fib,

Re: [PATCH][libgomp, testsuite, nvptx] Limit recursion in declare_target-{1,2}.f90

2022-04-01 Thread Tom de Vries via Gcc-patches
On 4/1/22 14:28, Thomas Schwinge wrote: Hi Tom! On 2022-04-01T13:24:40+0200, Tom de Vries wrote: When running testcases libgomp.fortran/examples-4/declare_target-{1,2}.f90 on an RTX A2000 (sm_86) with driver 510.60.02 and with GOMP_NVPTX_JIT=-O0 I run into: ... FAIL:

[PATCH 2/2] avr: Removed errant control characters

2022-04-01 Thread Joel Holdsworth via Gcc-patches
Signed-off-by: Joel Holdsworth --- gcc/config/avr/avr-devices.cc | 2 -- 1 file changed, 2 deletions(-) diff --git a/gcc/config/avr/avr-devices.cc b/gcc/config/avr/avr-devices.cc index aa284217f50..ff6a5441b77 100644 --- a/gcc/config/avr/avr-devices.cc +++ b/gcc/config/avr/avr-devices.cc @@

[PATCH 1/2] avr: Added AVR-DA and DB MCU series

2022-04-01 Thread Joel Holdsworth via Gcc-patches
gcc/ * config/avr/avr-mcus.def: Add device definitions. * doc/avr-mmcu.texi: Corresponding changes. * gcc/config/avr/gen-avr-mmcu-texi.c: Added support for avr device prefix. * gcc/config/avr/gen-avr-mmcu-specs.c: Prevent -mmcu=avr* flags from

[PATCH 0/2] avr: Add support AVR-DA and DB series devices

2022-04-01 Thread Joel Holdsworth via Gcc-patches
In 2021, Microchip launched two new series of AVR microcontrollers: AVR-DA and AVR-DB. This patch-set contains patches to add support for the full set of both series of devices, by listing the memory layouts in avr-mcus.def. There is an open GitHub Pull Request to add support for these devices to

[PATCH] c++: implicit guides should inherit class constraints [PR104873]

2022-04-01 Thread Patrick Palka via Gcc-patches
An implicit guide already inherits the (rewritten) constraints of the constructor. Thus it seems natural that the guide must also inherit the constraints of the class template, since a constructor's constraints might assume the class's constraints are satisfied, and therefore checking these two

Re: [PATCH v2] rs6000: Support UN[GL][ET] in rs6000_maybe_emit_maxc_minc [PR105002]

2022-04-01 Thread Segher Boessenkool
Hi! On Fri, Apr 01, 2022 at 02:27:14PM +0800, Kewen.Lin wrote: > Commit r12-7687 exposed one miss optimization chance in function > rs6000_maybe_emit_maxc_minc, for now it only considers comparison > codes GE/GT/LE/LT, but it can support more variants with codes > UNLT/UNLE/UNGT/UNGE by reversing

[wwwdocs] gcc-12: linkify various options

2022-04-01 Thread David Malcolm via Gcc-patches
I've committed the following patch to the GCC 12 release notes. --- htdocs/gcc-12/changes.html | 47 -- 1 file changed, 30 insertions(+), 17 deletions(-) diff --git a/htdocs/gcc-12/changes.html b/htdocs/gcc-12/changes.html index f1c36258..5619acff 100644 ---

Re: [PATCH RFC] mips: add TARGET_ZERO_CALL_USED_REGS hook [PR104817, PR104820]

2022-04-01 Thread Maciej W. Rozycki
On Sat, 12 Mar 2022, Xi Ruoyao via Gcc-patches wrote: > I'm now thinking: is there always at least one *GPR* which need to be > cleared? If it's true, let's say GPR $12, and fcc0 & fcc2 needs to be > cleared, we can use something like: > > cfc1 $12, $25 > andi $25, 5 > ctc1 $12, $25 > move $12,

[wwwdocs] gcc-12: jit changes

2022-04-01 Thread David Malcolm via Gcc-patches
I've gone ahead and committed the following change to the GCC 12 release notes. --- htdocs/gcc-12/changes.html | 35 ++- 1 file changed, 34 insertions(+), 1 deletion(-) diff --git a/htdocs/gcc-12/changes.html b/htdocs/gcc-12/changes.html index 689feeba..f1c36258

[committed] jit: further doc fixes

2022-04-01 Thread David Malcolm via Gcc-patches
Further jit doc fixes, which fix links to gcc_jit_function_type_get_param_type and gcc_jit_struct_get_field. I also regenerated libgccjit.texi (not included in the diff below). Tested with "make html" and with a bootstrap. Committed to trunk as r12-7959-g1a172da8a3f362. gcc/jit/ChangeLog:

Re: [RFC] ipa-cp: Feed results of IPA-CP into SCCVN

2022-04-01 Thread Martin Jambor
Hi, thanks for a very quick reply. On Fri, Apr 01 2022, Richard Biener wrote: > On Fri, 1 Apr 2022, Martin Jambor wrote: > >> Hi, >> >> PRs 68930 and 92497 show that when IPA-CP figures out constants in >> aggregate parameters or when passed by reference but the loads happen >> in an inlined

Re: [PATCH] JIT: Update docs v2

2022-04-01 Thread David Malcolm via Gcc-patches
On Sat, 2022-02-19 at 15:34 +, Petter Tomner via Gcc-patches wrote: > Please disregard the prior patch I sent some minute ago. I spotted an > copy-paste error, corrected bellow: > > From 7f1d849319318a4cfd304279840899f928f9b86d Mon Sep 17 00:00:00 2001 > From: Petter Tomner > Date: Sat, 19

Re: [PATCH] libstdc++: Implement std::unreachable() for C++23 (P0627R6)

2022-04-01 Thread Jonathan Wakely via Gcc-patches
On Fri, 1 Apr 2022 at 12:56, Matthias Kretz wrote: > > On Friday, 1 April 2022 13:33:42 CEST Jonathan Wakely wrote: > > Matthias didn't like my Princess Bride easter egg :-) > > Would the attached be better? > > LGTM. OK, thanks to everybody who commented. I've pushed that to trunk now.

Re: [PATCH v2] Ignore zero width fields in arguments and issue -Wpsabi warning about C zero-width field ABI changes [PR102024]

2022-04-01 Thread Jakub Jelinek via Gcc-patches
On Fri, Apr 01, 2022 at 08:11:43PM +0800, Xi Ruoyao wrote: > v1 -> v2: > > * "int has_zero_width_bf_abi_change" -> "bool > zero_width_field_abi_change". "int" -> "bool" because it's only 0/1, > "bf" -> "field" because the change also affects zero-length arrays and > empty structs/unions, etc. >

Re: [PATCH][libgomp, testsuite, nvptx] Limit recursion in declare_target-{1,2}.f90

2022-04-01 Thread Thomas Schwinge
Hi Tom! On 2022-04-01T13:24:40+0200, Tom de Vries wrote: > When running testcases libgomp.fortran/examples-4/declare_target-{1,2}.f90 on > an RTX A2000 (sm_86) with driver 510.60.02 and with GOMP_NVPTX_JIT=-O0 I run > into: > ... > FAIL: libgomp.fortran/examples-4/declare_target-1.f90 -O0 \ >

[committed] libstdc++: Fix mismatched noexcept-specifiers in Filesystem TS

2022-04-01 Thread Jonathan Wakely via Gcc-patches
Tested powerpc64le-linux, pushed to trunk. -- >8 -- The copy_file fix should have been part of r12-7063-gda72e0fd20f87b. The path::begin() fix should have been part of r12-3930-gf2b7f56a15d9cb. Thanks to Timm Bäder for reporting this one. libstdc++-v3/ChangeLog: *

[PATCH v2] Ignore zero width fields in arguments and issue -Wpsabi warning about C zero-width field ABI changes [PR102024]

2022-04-01 Thread Xi Ruoyao via Gcc-patches
v1 -> v2: * "int has_zero_width_bf_abi_change" -> "bool zero_width_field_abi_change". "int" -> "bool" because it's only 0/1, "bf" -> "field" because the change also affects zero-length arrays and empty structs/unions, etc. * Add tests with zero-length array and empty struct. * Coding style

Re: [PATCH] libstdc++: Implement std::unreachable() for C++23 (P0627R6)

2022-04-01 Thread Matthias Kretz via Gcc-patches
On Friday, 1 April 2022 13:33:42 CEST Jonathan Wakely wrote: > Matthias didn't like my Princess Bride easter egg :-) > Would the attached be better? LGTM. -- ── Dr. Matthias Kretz

Re: [RFC] ipa-cp: Feed results of IPA-CP into SCCVN

2022-04-01 Thread Richard Biener via Gcc-patches
On Fri, 1 Apr 2022, Martin Jambor wrote: > Hi, > > PRs 68930 and 92497 show that when IPA-CP figures out constants in > aggregate parameters or when passed by reference but the loads happen > in an inlined function the information is lost. This happens even > when the inlined function itself

Re: [PATCH v2] mips: Emit psabi diagnostic for return values affected by C++ zero-width bit-field ABI change [PR 102024]

2022-04-01 Thread Jakub Jelinek via Gcc-patches
On Fri, Apr 01, 2022 at 07:38:59PM +0800, Xi Ruoyao wrote: > v1 -> v2: > > * "int has_zero_width_bf" -> "bool has_cxx_zero_width_bf". "int" to > "bool" because the value is 0/1 only. Add "cxx" because it only > indicates C++ zero-width bit-fields (not those bit-fields from C). > > * Coding

[PATCH v2] mips: Emit psabi diagnostic for return values affected by C++ zero-width bit-field ABI change [PR 102024]

2022-04-01 Thread Xi Ruoyao via Gcc-patches
v1 -> v2: * "int has_zero_width_bf" -> "bool has_cxx_zero_width_bf". "int" to "bool" because the value is 0/1 only. Add "cxx" because it only indicates C++ zero-width bit-fields (not those bit-fields from C). * Coding style fix. * Rewrite mips_return_in_msb so mips_fpr_return_fields is not

Re: [PATCH] libstdc++: Implement std::unreachable() for C++23 (P0627R6)

2022-04-01 Thread Jonathan Wakely via Gcc-patches
On Thu, 31 Mar 2022 at 19:21, Marc Glisse wrote: > > On Thu, 31 Mar 2022, Jonathan Wakely wrote: > > > On Thu, 31 Mar 2022 at 17:03, Marc Glisse via Libstdc++ > > wrote: > >> > >> On Thu, 31 Mar 2022, Matthias Kretz via Gcc-patches wrote: > >> > >>> I like it. But I'd like it even more if we

Re: [PATCH][libgomp, testsuite, nvptx] Limit recursion in declare_target-{1,2}.f90

2022-04-01 Thread Jakub Jelinek via Gcc-patches
On Fri, Apr 01, 2022 at 01:24:40PM +0200, Tom de Vries wrote: > Hi, > > When running testcases libgomp.fortran/examples-4/declare_target-{1,2}.f90 on > an RTX A2000 (sm_86) with driver 510.60.02 and with GOMP_NVPTX_JIT=-O0 I run > into: > ... > FAIL:

[PATCH][libgomp, testsuite, nvptx] Limit recursion in declare_target-{1,2}.f90

2022-04-01 Thread Tom de Vries via Gcc-patches
Hi, When running testcases libgomp.fortran/examples-4/declare_target-{1,2}.f90 on an RTX A2000 (sm_86) with driver 510.60.02 and with GOMP_NVPTX_JIT=-O0 I run into: ... FAIL: libgomp.fortran/examples-4/declare_target-1.f90 -O0 \ -DGOMP_NVPTX_JIT=-O0 execution test FAIL:

[committed][libgomp, testsuite, nvptx] Fix dg-output test in vector-length-128-7.c

2022-04-01 Thread Tom de Vries via Gcc-patches
Hi, When running test-case libgomp.oacc-c-c++-common/vector-length-128-7.c on an RTX A2000 (sm_86) with driver 510.60.02 I run into: ... FAIL: libgomp.oacc-c/../libgomp.oacc-c-c++-common/vector-length-128-7.c \ -DACC_DEVICE_TYPE_nvidia=1 -DACC_MEM_SHARED=0 -foffload=nvptx-none -O0 \ output

[PATCH] tree-optimization/100810 - avoid undefs in IVOPT rewrites

2022-04-01 Thread Richard Biener via Gcc-patches
The following attempts to avoid IVOPTs rewriting uses using IV candidates that involve undefined behavior by using uninitialized SSA names. First we restrict the set of candidates we produce for such IVs to the original ones and mark them as not important. Second we try to only allow expressing

[committed] libstdc++: Fix filenames in Doxygen @file comments

2022-04-01 Thread Jonathan Wakely via Gcc-patches
From: Timm Bäder Pushed to trunk. -- >8 -- Reviewed-by: Jonathan Wakely libstdc++-v3/ChangeLog: * include/bits/fs_ops.h: Fix filename in Doxygen comment. * include/experimental/bits/fs_ops.h: Likewise. --- libstdc++-v3/include/bits/fs_ops.h | 2 +-

[RFC] ipa-cp: Feed results of IPA-CP into SCCVN

2022-04-01 Thread Martin Jambor
Hi, PRs 68930 and 92497 show that when IPA-CP figures out constants in aggregate parameters or when passed by reference but the loads happen in an inlined function the information is lost. This happens even when the inlined function itself was known to have - or even cloned to have - such

Re: [PATCH] phiopt: Improve value_replacement [PR104645]

2022-04-01 Thread Richard Biener via Gcc-patches
On Fri, 1 Apr 2022, Jakub Jelinek wrote: > Hi! > > The following patch fixes the P1 regression by reusing existing > value_replacement code. That function already has code to > handle simple preparation statements (casts, and +,&,|,^ binary > assignments) before a final binary assignment (which

Re: [PATCH] testsuite: Add further zero size elt passing tests [PR102024]

2022-04-01 Thread Richard Biener via Gcc-patches
On Thu, 31 Mar 2022, Jakub Jelinek wrote: > Hi! > > As discussed in PR102024, zero width bitfields might not be the only ones > causing ABI issues at least on mips, zero size arrays or (in C only) zero > sized (empty) structures can be problematic too. > > The following patch adds some coverage

[committed][nvptx, testsuite] Fix gcc.target/nvptx/alias-*.c on sm_80

2022-04-01 Thread Tom de Vries via Gcc-patches
Hi, When running test-cases gcc.target/nvptx/alias-*.c on target board nvptx-none-run/-misa=sm_80 we run into fails because the test-cases add -mptx=6.3, which doesn't support sm_80. Fix this by only adding -mptx=6.3 if necessary, and simplify the test-cases by using ptx_alias feature

[PATCH] phiopt: Improve value_replacement [PR104645]

2022-04-01 Thread Jakub Jelinek via Gcc-patches
Hi! The following patch fixes the P1 regression by reusing existing value_replacement code. That function already has code to handle simple preparation statements (casts, and +,&,|,^ binary assignments) before a final binary assignment (which can be much wider range of ops). When we have e.g.

Re: [PATCH, OpenMP] Fix nested use_device_ptr

2022-04-01 Thread Jakub Jelinek via Gcc-patches
On Fri, Apr 01, 2022 at 05:02:36PM +0800, Chung-Lin Tang wrote: > this patch fixes a bug in lower_omp_target, where for Fortran arrays, > the expanded sender assignment is wrongly using the variable in the > current ctx, instead of the one looked-up outside, which is causing > use_device_ptr/addr

[committed] contrib: Fix up spelling of loongarch-str.h dependency [PR105114]

2022-04-01 Thread Jakub Jelinek via Gcc-patches
Hi! As found by Joseph, the dependency of gcc/config/loongarch/loongarch-str.h is spelled incorrectly, it should be gcc/config/loongarch/genopts/loongarch-strings but was using gcc/config/loongarch/genopts/loongarch-string Committed to trunk as obvious. 2022-03-31 Jakub Jelinek

[PATCH, OpenMP] Fix nested use_device_ptr

2022-04-01 Thread Chung-Lin Tang
Hi Jakub, this patch fixes a bug in lower_omp_target, where for Fortran arrays, the expanded sender assignment is wrongly using the variable in the current ctx, instead of the one looked-up outside, which is causing use_device_ptr/addr to fail to work when used inside an omp-parallel (where the

Re: [PATCH] mips: Emit psabi diagnostic for return values affected by C++ zero-width bit-field ABI change [PR 102024]

2022-04-01 Thread Jakub Jelinek via Gcc-patches
On Fri, Apr 01, 2022 at 12:13:30AM +0800, Xi Ruoyao wrote: > --- a/gcc/config/mips/mips.cc > +++ b/gcc/config/mips/mips.cc > @@ -6274,10 +6274,17 @@ mips_callee_copies (cumulative_args_t, const > function_arg_info ) > > For n32 & n64, a structure with one or two fields is returned in >

Re: [PATCH] mips: Ignore zero width bitfields in arguments and issue -Wpsabi warning about C zero-width bit-field ABI changes [PR102024]

2022-04-01 Thread Jakub Jelinek via Gcc-patches
On Fri, Apr 01, 2022 at 12:27:45AM +0800, Xi Ruoyao wrote: > --- a/gcc/config/mips/mips.cc > +++ b/gcc/config/mips/mips.cc > @@ -6042,11 +6042,26 @@ mips_function_arg (cumulative_args_t cum_v, const > function_arg_info ) > for (i = 0; i < info.reg_words; i++) > { >

[PATCH] testsuite: Add further zero size elt passing tests [PR102024]

2022-04-01 Thread Jakub Jelinek via Gcc-patches
Hi! As discussed in PR102024, zero width bitfields might not be the only ones causing ABI issues at least on mips, zero size arrays or (in C only) zero sized (empty) structures can be problematic too. The following patch adds some coverage for it too. Tested on x86_64-linux with make check-gcc

[PATCH] sh: Fix up __attribute__((optimize ("Os"))) handling on SH [PR105069]

2022-04-01 Thread Jakub Jelinek via Gcc-patches
Hi! As mentioned in the PR, various tests on sh-elf ICE like: make check-gcc RUNTESTFLAGS="compile.exp='pr104327.c pr58332.c pr81360.c pr84425.c'" FAIL: gcc.c-torture/compile/pr104327.c -O0 (internal compiler error: 'global_options' are modified in local context) FAIL:

[PATCH V3] Split vector load from parm_del to elemental loads to avoid STLF stalls.

2022-04-01 Thread liuhongt via Gcc-patches
Update in V3: 1. Add -param=x86-stlf-window-ninsns= (default 64). 2. Exclude call in the window. Since cfg is freed before machine_reorg, just do a rough calculation of the window according to the layout. Also according to an experiment on CLX, set window size to 64. Currently only handle

Re: [PATCH] Split vector load from parm_del to elemental loads to avoid STLF stalls.

2022-04-01 Thread Richard Biener via Gcc-patches
On Fri, Apr 1, 2022 at 9:14 AM Hongtao Liu wrote: > > On Fri, Apr 1, 2022 at 2:54 PM Richard Biener via Gcc-patches > wrote: > > > > On Fri, Apr 1, 2022 at 8:47 AM liuhongt via Gcc-patches > > wrote: > > > > > > Update in V2: > > > 1. Use get_insns instead of FOR_EACH_BB_CFUN and FOR_BB_INSNS.

Re: [PATCH] Split vector load from parm_del to elemental loads to avoid STLF stalls.

2022-04-01 Thread Hongtao Liu via Gcc-patches
On Fri, Apr 1, 2022 at 2:54 PM Richard Biener via Gcc-patches wrote: > > On Fri, Apr 1, 2022 at 8:47 AM liuhongt via Gcc-patches > wrote: > > > > Update in V2: > > 1. Use get_insns instead of FOR_EACH_BB_CFUN and FOR_BB_INSNS. > > 2. Return for any_uncondjump_p and ANY_RETURN_P. > > 3. Add dump

Re: [PATCH] Split vector load from parm_del to elemental loads to avoid STLF stalls.

2022-04-01 Thread Richard Biener via Gcc-patches
On Fri, Apr 1, 2022 at 8:47 AM liuhongt via Gcc-patches wrote: > > Update in V2: > 1. Use get_insns instead of FOR_EACH_BB_CFUN and FOR_BB_INSNS. > 2. Return for any_uncondjump_p and ANY_RETURN_P. > 3. Add dump info for spliting instruction. > 4. Restrict ix86_split_stlf_stall_load under

Re: [PATCH] Split vector load from parm_del to elemental loads to avoid STLF stalls.

2022-04-01 Thread Richard Biener via Gcc-patches
On Fri, Apr 1, 2022 at 8:29 AM Hongtao Liu wrote: > > On Thu, Mar 31, 2022 at 6:45 PM Richard Biener via Gcc-patches > wrote: > > > > On Thu, Mar 31, 2022 at 7:51 AM liuhongt wrote: > > > > > > Since cfg is freed before machine_reorg, just do a rough calculation > > > of the window according to

[PATCH] Split vector load from parm_del to elemental loads to avoid STLF stalls.

2022-04-01 Thread liuhongt via Gcc-patches
Update in V2: 1. Use get_insns instead of FOR_EACH_BB_CFUN and FOR_BB_INSNS. 2. Return for any_uncondjump_p and ANY_RETURN_P. 3. Add dump info for spliting instruction. 4. Restrict ix86_split_stlf_stall_load under TARGET_SSE2. Since cfg is freed before machine_reorg, just do a rough calculation

Re: [PATCH] rs6000: Support UN[GL][ET] in rs6000_maybe_emit_maxc_minc [PR105002]

2022-04-01 Thread Kewen.Lin via Gcc-patches
Hi Segher, on 2022/3/27 11:02 PM, Segher Boessenkool wrote: > Hi! > > On Thu, Mar 24, 2022 at 10:00:43AM +0800, Kewen.Lin wrote: >> Commit r12-7687 exposed one miss optimization chance in function >> rs6000_maybe_emit_maxc_minc, for now it only considers comparison >> codes GE/GT/LE/LT, but it

Re: [PATCH] Split vector load from parm_del to elemental loads to avoid STLF stalls.

2022-04-01 Thread Hongtao Liu via Gcc-patches
On Thu, Mar 31, 2022 at 6:45 PM Richard Biener via Gcc-patches wrote: > > On Thu, Mar 31, 2022 at 7:51 AM liuhongt wrote: > > > > Since cfg is freed before machine_reorg, just do a rough calculation > > of the window according to the layout. > > Also according to an experiment on CLX, set window

[PATCH v2] rs6000: Support UN[GL][ET] in rs6000_maybe_emit_maxc_minc [PR105002]

2022-04-01 Thread Kewen.Lin via Gcc-patches
Hi, Commit r12-7687 exposed one miss optimization chance in function rs6000_maybe_emit_maxc_minc, for now it only considers comparison codes GE/GT/LE/LT, but it can support more variants with codes UNLT/UNLE/UNGT/UNGE by reversing them into the equivalent ones with GE/GT/LE/LT. Bootstrapped and

Re: fixed-point/composite-type: add -Wno-array-parameter

2022-04-01 Thread Richard Biener via Gcc-patches
On Fri, Apr 1, 2022 at 4:40 AM Alexandre Oliva via Gcc-patches wrote: > > > On machines that support fixed-point and the test runs, it's failing > because of warnings issued by -Warray-parameter=[12], enabled by > -Wall. > > The warnings state "mismatch in bound 1 of argument 1 declared as...", >