[PATCH 2/2 v2] RISC-V: Constant synthesis of inverted halves

2024-09-05 Thread Raphael Moreira Zinsly
Changes since v1: - Fix synthesis-15.c. -- >8 -- Improve handling of constants where the high half can be constructed by inverting the lower half. gcc/ChangeLog: * config/riscv/riscv.cc (riscv_build_integer): Detect constants were the higher half is the lower half inverte

Re: [PATCH] Fortran: fix ICE in gfc_create_module_variable [PR100273]

2024-09-05 Thread Harald Anlauf
Thanks, Jerry. Pushed as r15-3494-g1f462b5072a5e8 . Am 05.09.24 um 21:46 schrieb Jerry D: On 9/5/24 12:42 PM, Harald Anlauf wrote: Dear all, the attached simple patch fixes a corner case related to pr84868, which was tracked separately.  While Paul's patch for pr84868 added the framework for

Re: [PATCH 6/8] gcn: Add else operand to masked loads.

2024-09-05 Thread Robin Dapp
> > +(define_predicate "maskload_else_operand" > > + (and (match_code "const_int,const_vector") > > + (match_test "op == CONST0_RTX (GET_MODE (op))"))) > > This forces maskload and mask_gather_load to only accept zero here, but > in fact the hardware would allow us to accept any value (incl

[PATCH RFC v2] libcpp: adjust pedwarn handling

2024-09-05 Thread Jason Merrill
On 8/28/24 12:44 PM, Joseph Myers wrote: > On Wed, 28 Aug 2024, Jason Merrill wrote: > >> Tested x86_64-pc-linux-gnu. Any objections? Should I change all the other >> instances of >> >> if (CPP_PEDANTIC... >>cpp_error (...CPP_DL_PEDWARN >> >> the same way? > Yes, I think that's a good change

Re: [PATCH] c++, coroutines: Instrument missing return_void UB.

2024-09-05 Thread Jason Merrill
On 9/4/24 4:00 PM, Iain Sandoe wrote: On 4 Sep 2024, at 17:21, Jason Merrill wrote: On 9/1/24 12:17 PM, Iain Sandoe wrote: This came up in discussion of an earlier patch. I'm in two minds as to whether it's a good idea or not - the underlying issue being that libubsan does not yet (AFAICT)

[PATCH RFA] libstdc++: -Wswitch and ios::openmode

2024-09-05 Thread Jason Merrill
Tested x86_64-pc-linux-gnu, OK for trunk? -- 8< -- In addition to marking it as flag_enum, we want to avoid warnings about not having a case for the implementation detail enumerators _S_ios_openmode_*. And also for _S_noreplace in standard modes before it was added. libstdc++-v3/ChangeLog:

Re: [PATCH RFA] libstdc++: -Wswitch and ios::openmode

2024-09-05 Thread Jonathan Wakely
On Thu, 5 Sept 2024 at 22:00, Jason Merrill wrote: > > Tested x86_64-pc-linux-gnu, OK for trunk? OK, thanks. > > -- 8< -- > > In addition to marking it as flag_enum, we want to avoid warnings about > not having a case for the implementation detail enumerators > _S_ios_openmode_*. And also for _

Re: [PATCH] RISC-V: Define LOGICAL_OP_NON_SHORT_CIRCUIT to 1 [PR116615]

2024-09-05 Thread Jeff Law
On 9/5/24 12:52 PM, Palmer Dabbelt wrote: We have cheap logical ops, so let's just move this back to the default to take advantage of the standard branch/op hueristics. gcc/ChangeLog: PR target/116615 * config/riscv/riscv.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Remove. --- There's

Re: [PATCH] RISC-V: Define LOGICAL_OP_NON_SHORT_CIRCUIT to 1 [PR116615]

2024-09-05 Thread Andrew Waterman
On Thu, Sep 5, 2024 at 2:52 PM Jeff Law wrote: > > > > On 9/5/24 12:52 PM, Palmer Dabbelt wrote: > > We have cheap logical ops, so let's just move this back to the default > > to take advantage of the standard branch/op hueristics. > > > > gcc/ChangeLog: > > > > PR target/116615 > > *

Re: [PATCH] RISC-V: Define LOGICAL_OP_NON_SHORT_CIRCUIT to 1 [PR116615]

2024-09-05 Thread Jeff Law
On 9/5/24 12:59 PM, Palmer Dabbelt wrote: On Thu, 05 Sep 2024 11:52:57 PDT (-0700), Palmer Dabbelt wrote: We have cheap logical ops, so let's just move this back to the default to take advantage of the standard branch/op hueristics. gcc/ChangeLog: PR target/116615 * config/riscv/ris

Re: [PATCH 6/8] gcn: Add else operand to masked loads.

2024-09-05 Thread Andrew Stubbs
On Thu, 5 Sept 2024, 21:10 Robin Dapp, wrote: > > > +(define_predicate "maskload_else_operand" > > > + (and (match_code "const_int,const_vector") > > > + (match_test "op == CONST0_RTX (GET_MODE (op))"))) > > > > This forces maskload and mask_gather_load to only accept zero here, but > > in

Re: [PATCH] RISC-V: Define LOGICAL_OP_NON_SHORT_CIRCUIT to 1 [PR116615]

2024-09-05 Thread Andrew Pinski
On Thu, Sep 5, 2024 at 2:57 PM Jeff Law wrote: > > > > On 9/5/24 12:59 PM, Palmer Dabbelt wrote: > > On Thu, 05 Sep 2024 11:52:57 PDT (-0700), Palmer Dabbelt wrote: > >> We have cheap logical ops, so let's just move this back to the default > >> to take advantage of the standard branch/op hueristi

Re: [PATCH v1] Provide new GCC builtin __builtin_get_counted_by [PR116016]

2024-09-05 Thread Bill Wendling
Hi Qing, Sorry for my late reply. On Thu, Aug 29, 2024 at 7:22 AM Qing Zhao wrote: > > Hi, > > Thanks for the information. > > Yes, providing a unary operator similar as __counted_by(PTR) as suggested by > multiple people previously is a cleaner approach. > > Then the programmer will use the fo

[PATCH] c++: ICE with structured bindings and m-d array [PR102594]

2024-09-05 Thread Marek Polacek
Bootstrapped/regtested on x86_64-pc-linux-gnu, ok for trunk/14? -- >8 -- We ICE in decay_conversion with this test: struct S { S() {} }; S arr[1][1]; auto [m](arr3); But not when the last line is: auto [n] = arr3; Therefore the difference is between copy- and direct-init. In par

Re: [PATCH 6/8] gcn: Add else operand to masked loads.

2024-09-05 Thread Palmer Dabbelt
On Thu, 05 Sep 2024 14:57:06 PDT (-0700), a...@baylibre.com wrote: On Thu, 5 Sept 2024, 21:10 Robin Dapp, wrote: > > +(define_predicate "maskload_else_operand" > > + (and (match_code "const_int,const_vector") > > + (match_test "op == CONST0_RTX (GET_MODE (op))"))) > > This forces masklo

Re: Subject: [PATCH 0/8] Masked load else operand.

2024-09-05 Thread Palmer Dabbelt
On Sun, 11 Aug 2024 14:00:27 PDT (-0700), Robin Dapp wrote: > I figured it's easier to parse this as a series rather than one big > patch, in particular since target-specific code is involved. > > This adds an else operand to masked-load operations in order to avoid > implicit dependencies on zeroe

Re: [PATCH] fab: Cleanup eh after optimize_memcpy [PR116601]

2024-09-05 Thread Andrew Pinski
On Thu, Sep 5, 2024 at 12:26 AM Richard Biener wrote: > > On Thu, Sep 5, 2024 at 8:25 AM Andrew Pinski wrote: > > > > When optimize_memcpy was added in r7-5443-g7b45d0dfeb5f85, > > a path was added such that a statement was turned into a non-throwing > > statement and maybe_clean_or_replace_eh_st

Re: [PATCH RFC] c-family: add attribute flag_enum [PR46457]

2024-09-05 Thread Jason Merrill
On 9/4/24 11:02 AM, Marek Polacek wrote: +handle_flag_enum_attribute (tree *node, tree ARG_UNUSED(name), tree args, + int ARG_UNUSED (flags), bool *no_add_attrs) +{ + if (args) +warning (OPT_Wattributes, "%qE attribute arguments ignored", name); You don't need this

Re: [PATCH RFA] libstdc++: avoid __GLIBCXX__ redefinition

2024-09-05 Thread Jason Merrill
On 8/28/24 6:22 AM, Jason Merrill wrote: On 8/28/24 6:09 AM, Jonathan Wakely wrote: On Wed, 28 Aug 2024 at 10:58, Jason Merrill wrote: On 8/28/24 5:55 AM, Jonathan Wakely wrote: On Wed, 28 Aug 2024 at 10:54, Jason Merrill wrote: Tested x86_64-pc-linux-gnu, OK for trunk? Redefining that m

RE: [PATCH] x86: Refine V4BF/V2BF FMA testcase

2024-09-05 Thread Jiang, Haochen
> From: Levy Hsu > Sent: Thursday, September 5, 2024 4:55 PM > To: gcc-patches@gcc.gnu.org > > Simple testcase fix, ok for trunk? > > This patch removes specific register checks to account for possible > register spills and disables tests in 32-bit mode. This adjustment > is necessary because V4

Re: [PATCH 1/2] split-paths: Move check for # of statements in join earlier

2024-09-05 Thread Andrew Pinski
On Tue, Sep 3, 2024 at 11:30 PM Kyrylo Tkachov wrote: > > Hi Andrew, > > > On 3 Sep 2024, at 20:11, Andrew Pinski wrote: > > > > External email: Use caution opening links or attachments > > > > > > This moves the check for # of statements to copy in join to > > be the first check. This check is t

Re: [PATCH 1/2 v2] RISC-V: Additional large constant synthesis improvements

2024-09-05 Thread Jeff Law
On 9/5/24 1:50 PM, Raphael Moreira Zinsly wrote: Changes since v1: - Fix bit31. - Remove negative shift checks. - Fix synthesis-7.c expected output. -- >8 -- Improve handling of large constants in riscv_build_integer, generate better code for constants where the high

Re: [PATCH] x86: Refine V4BF/V2BF FMA testcase

2024-09-05 Thread Hongtao Liu
On Fri, Sep 6, 2024 at 10:34 AM Jiang, Haochen wrote: > > > From: Levy Hsu > > Sent: Thursday, September 5, 2024 4:55 PM > > To: gcc-patches@gcc.gnu.org > > > > Simple testcase fix, ok for trunk? > > > > This patch removes specific register checks to account for possible > > register spills and d

[PATCH] Git ignores .vscode

2024-09-05 Thread YunQiang Su
ChangeLog * .gitignore: Add .vscode. --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 93a16b0b950..f044fe16b5f 100644 --- a/.gitignore +++ b/.gitignore @@ -38,6 +38,7 @@ cscope.out .local.vimrc .lvimrc +.vscode .clang-format .clang-ti

[PATCH] doc: Enhance Intel CPU documentation

2024-09-05 Thread Haochen Jiang
Hi all, This patch will add those recent aliased CPU names into documentation for clearness. Ready to push for trunk and backport to GCC14 and part of the patch to GCC13 as an obvious fix if no objection. Thx, Haochen gcc/ChangeLog: PR target/116617 * doc/invoke.texi: Add meteo

Re: [PATCH 2/2 v2] RISC-V: Constant synthesis of inverted halves

2024-09-05 Thread Jeff Law
On 9/5/24 1:50 PM, Raphael Moreira Zinsly wrote: Changes since v1: - Fix synthesis-15.c. -- >8 -- Improve handling of constants where the high half can be constructed by inverting the lower half. gcc/ChangeLog: * config/riscv/riscv.cc (riscv_build_integer): Detect constants

[PATCH] RISC-V: Add missing insn types for XiangShan Nanhu scheduler model

2024-09-05 Thread Zhao Dingyi
This patch aims to add the missing instruction types to the XiangShan-Nanhu scheduler model. The current XiangShan -Nanhu model lacks the trap, atomic trap, fcvt_i2f, and fcvt_f2i instructions. The trap, atomic, and i2f instructions belong to xs_jmp_rs. [1] The f2i instruction belongs to xs_fmis

[r15-3498 Regression] FAIL: gcc.target/i386/pr59539-1.c scan-assembler-times vmovdqu|vmovups 1 on Linux/x86_64

2024-09-05 Thread haochen.jiang
On Linux/x86_64, a51f2fc0d80869ab079a93cc3858f24a1fd28237 is the first bad commit commit a51f2fc0d80869ab079a93cc3858f24a1fd28237 Author: liuhongt Date: Wed Sep 4 15:39:17 2024 +0800 Handle const0_operand for *avx2_pcmp3_1. caused FAIL: gcc.target/i386/pr59539-1.c scan-assembler-times vm

[PATCH v3 1/2] [APX CFCMOV] Support APX CFCMOV in if_convert pass

2024-09-05 Thread Kong, Lingling
Hi, This version has added a new optab named 'cfmovcc'. The new optab is used in the middle end to expand to cfcmov. And simplified my patch by trying to generate the conditional faulting movcc in noce_try_cmove_arith function. All the changes passed bootstrap & regtest x86-64-pc-linux-gnu. We al

[PATCH v3 2/2] [APX CFCMOV] Support APX CFCMOV in backend

2024-09-05 Thread Kong, Lingling
gcc/ChangeLog: * config/i386/i386-expand.cc (ix86_can_cfcmov_p): New func that test if the cfcmov can be generated. (ix86_expand_int_cfmovcc): Expand to cfcmov pattern. * config/i386/i386-opts.h (enum apx_features): New. *

<    1   2