Re: [PATCH 0/8] Tweak predicate macros in tree

2023-07-19 Thread Richard Biener via Gcc-patches
On Wed, Jul 19, 2023 at 1:34 AM Ken Matsui via Gcc-patches wrote: > > This patch series tweaks predicate macros in tree.h to make the code more > readable. TYPE_REF_P is moved to tree.h and used for INDIRECT_TYPE_P and > TYPE_REF_IS_LVALUE. TYPE_PTR_P is also moved to tree.h and used for > INDIREC

Re: [PATCH] Fix PR110726: a | (a == b) can sometimes produce wrong code

2023-07-19 Thread Richard Biener via Gcc-patches
On Wed, Jul 19, 2023 at 3:53 AM Andrew Pinski via Gcc-patches wrote: > > So I had missed/forgot that EQ_EXPR could have an non boolean > type for generic when I implemented r14-2556-g0407ae8a7732d9. > This patch adds check for one bit precision intergal type > which fixes the problem. > > OK? Boot

Re: [PATCH] RISC-V: Fix testcase failed when default -mcmodel=medany

2023-07-19 Thread Lehua Ding
Committed V2 patch, thank you so much. -- Original -- From: "Robin Dapp"

Re: [PATCH v2] Store_bit_field_1: Use SUBREG instead of REG if possible

2023-07-19 Thread Richard Biener via Gcc-patches
On Wed, 19 Jul 2023, YunQiang Su wrote: > Richard Biener via Gcc-patches ?2023?7?19??? > 14:27??? > > > > On Wed, 19 Jul 2023, YunQiang Su wrote: > > > > > PR #104914 > > > > > > When work with > > > int val; > > > ((unsigned char*)&val)[3] = *buf; > > > if (val > 0) ... > > > The RTX mode

Re: [PATCH] Fix PR110726: a | (a == b) can sometimes produce wrong code

2023-07-19 Thread Andrew Pinski via Gcc-patches
On Wed, Jul 19, 2023 at 12:16 AM Richard Biener via Gcc-patches wrote: > > On Wed, Jul 19, 2023 at 3:53 AM Andrew Pinski via Gcc-patches > wrote: > > > > So I had missed/forgot that EQ_EXPR could have an non boolean > > type for generic when I implemented r14-2556-g0407ae8a7732d9. > > This patch

Re: [PATCH v3] Implement new RTL optimizations pass: fold-mem-offsets.

2023-07-19 Thread Manolis Tsamis
Hi Vineet, Jeff, On Wed, Jul 19, 2023 at 7:31 AM Jeff Law wrote: > > > > On 7/18/23 17:42, Vineet Gupta wrote: > > Hi Manolis, > > > > On 7/18/23 11:01, Jeff Law via Gcc-patches wrote: > >> Vineet @ Rivos has indicated he stumbled across an ICE with the V3 > >> code. Hopefully he'll get a testca

Re: [PATCH] Fix PR110726: a | (a == b) can sometimes produce wrong code

2023-07-19 Thread Richard Biener via Gcc-patches
On Wed, Jul 19, 2023 at 9:32 AM Andrew Pinski wrote: > > On Wed, Jul 19, 2023 at 12:16 AM Richard Biener via Gcc-patches > wrote: > > > > On Wed, Jul 19, 2023 at 3:53 AM Andrew Pinski via Gcc-patches > > wrote: > > > > > > So I had missed/forgot that EQ_EXPR could have an non boolean > > > type

Re: [PATCH V2] RISC-V: Throw compilation error for unknown sub-extension or supervisor extension

2023-07-19 Thread Lehua Ding
Commited to the trunk, thank you so much.

Re: [PATCH] VECT: Add mask_len_fold_left_plus for in-order floating-point reduction

2023-07-19 Thread Richard Biener via Gcc-patches
On Sat, 15 Jul 2023, juzhe.zh...@rivai.ai wrote: > From: Ju-Zhe Zhong > > Hi, Richard and Richi. > > This patch adds mask_len_fold_left_plus pattern to support in-order > floating-point > reduction for target support len loop control. > > Consider this following case: > double > foo2 (double

Re: [RFC/RFT, V2 0/3] Add compiler support for Kernel Control Flow Integrity

2023-07-19 Thread Dan Li via Gcc-patches
Hi Kees, Sincerely sorry, I just saw this email. Embarrassingly, due to another job change, my plan was postponed again :(. I may not be able to attend this year's GCC meeting. Is there any other way to let this get some traction in GCC? I really hope someone can help with this topic. BTW, I'm s

[PATCH] mklog: fix bugs of --append option

2023-07-19 Thread Lehua Ding
Hi, This little patch fix two bugs of mklog.py with --append option. The first bug is that the regexp used is not accurate enough to determine the top of diff area. The second bug is that if `---` is not a true start, it needs to be added back to the patch file. contrib/ChangeLog: * mklo

Re: [PATCH v2] Store_bit_field_1: Use SUBREG instead of REG if possible

2023-07-19 Thread YunQiang Su via Gcc-patches
Richard Biener 于2023年7月19日周三 15:22写道: > > On Wed, 19 Jul 2023, YunQiang Su wrote: > > > Richard Biener via Gcc-patches ?2023?7?19??? > > 14:27??? > > > > > > On Wed, 19 Jul 2023, YunQiang Su wrote: > > > > > > > PR #104914 > > > > > > > > When work with > > > > int val; > > > > ((unsigned ch

Re: [PATCH v2] Store_bit_field_1: Use SUBREG instead of REG if possible

2023-07-19 Thread YunQiang Su via Gcc-patches
YunQiang Su 于2023年7月19日周三 16:21写道: > > Richard Biener 于2023年7月19日周三 15:22写道: > > > > On Wed, 19 Jul 2023, YunQiang Su wrote: > > > > > Richard Biener via Gcc-patches ?2023?7?19??? > > > 14:27??? > > > > > > > > On Wed, 19 Jul 2023, YunQiang Su wrote: > > > > > > > > > PR #104914 > > > > > > > >

[committed] - Re: [patch] OpenMP/Fortran: Non-rectangular loops with constant steps other than 1 or -1 [PR107424]

2023-07-19 Thread Tobias Burnus
Now committed as Rev. r14-2634-g85da0b40538fb0 Changes: * I missed to updated another 'sorry' (msg wording change) - now fixed; I also added it to the sorry-testcase file non-rectangular-loop-5.f90. * I decided to retire the PR as several issues have been fixed and the original title did not fi

Re: [PATCH v2] vect: Handle demoting FLOAT and promoting FIX_TRUNC.

2023-07-19 Thread Richard Biener via Gcc-patches
On Fri, Jul 14, 2023 at 5:16 PM Robin Dapp wrote: > > >>> Can you add testcases? Also the current restriction is because > >>> the variants you add are not always correct and I don't see any > >>> checks that the intermediate type doesn't lose significant bits? > > I didn't manage to create one f

Re: [PATCH V2] Provide -fcf-protection=branch,return.

2023-07-19 Thread Hongtao Liu via Gcc-patches
On Wed, Jul 12, 2023 at 3:27 PM Hongtao Liu wrote: > > ping. > > On Mon, May 22, 2023 at 4:08 PM Hongtao Liu wrote: > > > > ping. > > > > On Sat, May 13, 2023 at 5:20 PM liuhongt wrote: > > > > > > > I think this could be simplified if you use either EnumSet or > > > > EnumBitSet instead in comm

Re: [PATCH 1/2] Add flow_sensitive_info_storage and use it in gimple-fold.

2023-07-19 Thread Richard Biener via Gcc-patches
On Sat, Jul 15, 2023 at 5:21 AM Andrew Pinski via Gcc-patches wrote: > > This adds flow_sensitive_info_storage and uses it in > maybe_fold_comparisons_from_match_pd as mentioned in > https://gcc.gnu.org/pipermail/gcc-patches/2023-June/621817.html . > Since using it in maybe_fold_comparisons_from_m

Re: [PATCH 2/2] [PATCH] Fix tree-opt/110252: wrong code due to phiopt using flow sensitive info during match

2023-07-19 Thread Richard Biener via Gcc-patches
On Sat, Jul 15, 2023 at 5:21 AM Andrew Pinski via Gcc-patches wrote: > > Match will query ranger via tree_nonzero_bits/get_nonzero_bits for 2 and 3rd > operand of the COND_EXPR and phiopt tries to do create the COND_EXPR even if > we moving > one statement. That one statement could have some flow

Re: [RFC/RFT, V2 0/3] Add compiler support for Kernel Control Flow Integrity

2023-07-19 Thread Dan Li via Gcc-patches
Hi All, Embarrassingly, due to personal reasons, I may not be able to complete the series of patches on the forward side of GCC CFI for the time being. Please forgive me for not realizing that I should have sent this help email a long time ago :( This topic has been delayed for a long time, and

Re: [V1][PATCH 0/3] New attribute "element_count" to annotate bounds for C99 FAM(PR108896)

2023-07-19 Thread Martin Uecker via Gcc-patches
Am Montag, dem 17.07.2023 um 16:40 -0700 schrieb Kees Cook: > On Mon, Jul 17, 2023 at 09:17:48PM +, Qing Zhao wrote: > > > > > On Jul 13, 2023, at 4:31 PM, Kees Cook > > > wrote: > > > > > > In the bug, the problem is that "p" isn't known to be allocated, > > > if I'm > > > reading that corr

Re: PING^2 [PATCH] Adjust the symbol for SECTION_LINK_ORDER linked_to section [PR99889]

2023-07-19 Thread Kewen.Lin via Gcc-patches
Hi Fangrui, on 2023/7/19 14:33, Fangrui Song wrote: > On Thu, Nov 24, 2022 at 7:26 PM Kewen.Lin via Gcc-patches > wrote: >> >> Hi Richard, >> >> on 2022/11/23 00:08, Richard Sandiford wrote: >>> "Kewen.Lin" writes: Hi Richard, Many thanks for your review comments! >>> on

Re: [PATCH v2] Store_bit_field_1: Use SUBREG instead of REG if possible

2023-07-19 Thread YunQiang Su via Gcc-patches
I am not sure this patch is best, while I think that I am sure the initial RTL is not correct, the initial RTL of ARM64 is like (insn 8 7 9 2 (set (zero_extract:SI (reg/v:SI 98 [ val ]) ^^ (const_int 8 [0x8]) (const_int 0 [0

Re: [PATCH] core: Support heap-based trampolines

2023-07-19 Thread Martin Uecker via Gcc-patches
> > > On 17 Jul 2023, > > >> You mention setjmp/longjmp - on darwin and other platforms > requiring > >> non-stack based trampolines > >> does the system runtime provide means to deal with this issue like > an > >> alternate allocation method > >> or a way to register cleanup? > > > > There

Re: [PATCH v2] tree-optimization/110279- Check for nested FMA chains in reassoc

2023-07-19 Thread Richard Biener via Gcc-patches
On Tue, Jul 11, 2023 at 5:00 AM Di Zhao OS via Gcc-patches wrote: > > Attached is an updated version of the patch. > > Based on Philipp's review, some changes: > > 1. Defined new enum fma_state to describe the state of FMA candidates >for a list of operands. (Since the tests seems simple after

Re: [PATCH v2] Store_bit_field_1: Use SUBREG instead of REG if possible

2023-07-19 Thread Richard Biener via Gcc-patches
On Wed, 19 Jul 2023, YunQiang Su wrote: > Richard Biener ?2023?7?19??? 15:22??? > > > > On Wed, 19 Jul 2023, YunQiang Su wrote: > > > > > Richard Biener via Gcc-patches ?2023?7?19??? > > > 14:27??? > > > > > > > > On Wed, 19 Jul 2023, YunQiang Su wrote: > > > > > > > > > PR #104914 > > > > > >

Re: [PATCH v2] Store_bit_field_1: Use SUBREG instead of REG if possible

2023-07-19 Thread Richard Biener via Gcc-patches
On Wed, 19 Jul 2023, Richard Biener wrote: > On Wed, 19 Jul 2023, YunQiang Su wrote: > > > Richard Biener ?2023?7?19??? 15:22??? > > > > > > On Wed, 19 Jul 2023, YunQiang Su wrote: > > > > > > > Richard Biener via Gcc-patches ?2023?7?19??? > > > > 14:27??? > > > > > > > > > > On Wed, 19 Jul 20

Re: [PATCH] core: Support heap-based trampolines

2023-07-19 Thread Iain Sandoe
Hi Martin, > On 19 Jul 2023, at 10:04, Martin Uecker wrote: >>> On 17 Jul 2023, >> > You mention setjmp/longjmp - on darwin and other platforms >> requiring non-stack based trampolines does the system runtime provide means to deal with this issue like >> an alternate alloc

Re: [PATCH v2] Store_bit_field_1: Use SUBREG instead of REG if possible

2023-07-19 Thread YunQiang Su via Gcc-patches
Richard Biener 于2023年7月19日周三 17:23写道: > > On Wed, 19 Jul 2023, YunQiang Su wrote: > > > Richard Biener ?2023?7?19??? 15:22??? > > > > > > On Wed, 19 Jul 2023, YunQiang Su wrote: > > > > > > > Richard Biener via Gcc-patches ?2023?7?19??? > > > > 14:27??? > > > > > > > > > > On Wed, 19 Jul 2023,

Re: [PATCH v2] Store_bit_field_1: Use SUBREG instead of REG if possible

2023-07-19 Thread Eric Botcazou via Gcc-patches
> I don't see that. That's definitely not what GCC expects here, > the left-most word of the doubleword should be unchanged. > > Your testcase should be a dg-do-run and probably more like > > NOMIPS16 int __attribute__((noipa)) test (const unsigned char *buf) > { > int val; > ((unsigned char

[committed 1/3] libstdc++: Check autoconf macros for strtof and strtold [PR110653]

2023-07-19 Thread Jonathan Wakely via Gcc-patches
Tested x86_64-linux. Pushed to trunk. -- >8 -- As well as the _GLIBCXX_USE_C99_STDLIB check, we also have a separate check in linkage.m4 for just strtof and strtold. We can use that to declare std::strtof and std::strtold in for additional targets. That allows us to enable std::stold on hpux11.1

[committed 3/3] libstdc++: Enable tests for std::stoi etc. unconditionally [PR110653]

2023-07-19 Thread Jonathan Wakely via Gcc-patches
Tested x86_64-linux. Pushed to trunk. -- >8 -- Since the narrow string versions of std::stoi, std::stol, std::stoul, std::stof and std::stod are now always defined, we don't need to check dg-require-string-conversions in the relevant tests. libstdc++-v3/ChangeLog: PR libstdc++/110653

[committed 2/3] libstdc++: Define std::stof fallback in terms of std::stod [PR110653]

2023-07-19 Thread Jonathan Wakely via Gcc-patches
Tested x86_64-linux. Pushed to trunk. -- >8 -- For targets without std::strtof we can define std::stof by calling std::stod and then checking if the result is out of range of float. libstdc++-v3/ChangeLog: PR libstdc++/110653 * include/bits/basic_string.h [!_GLIBCXX_HAVE_STRTOF]

[PATCH 0/5] Recognize Zicond extension

2023-07-19 Thread Xiao Zeng
Hi all RISC-V folks: This series of patches completes support for the riscv architecture's Zicond standard extension instruction set. Currently, Zicond is in a frozen state. See the Zicond specification for details: https://github.com/riscv/riscv-zicond/releases/download/v1.0-rc2/riscv-zicond-v1

[PATCH 2/5] [RISC-V] Generate Zicond instruction for basic semantics

2023-07-19 Thread Xiao Zeng
This patch completes the recognition of the basic semantics defined in the spec, namely: Conditional zero, if condition is equal to zero rd = (rs2 == 0) ? 0 : rs1 Conditional zero, if condition is non zero rd = (rs2 != 0) ? 0 : rs1 gcc/ChangeLog: * config/riscv/riscv.md: Include zico

[PATCH 4/5] [RISC-V] Generate Zicond instruction for select pattern with condition eq or neq to non-zero

2023-07-19 Thread Xiao Zeng
This patch completes the recognition of Zicond when the select pattern with condition eq or neq to non-zero (using equality as an example), namely: 1 rd = (rs2 == non-imm) ? 0 : rs1 2 rd = (rs2 == reg) ? 0 : rs1 At the same time, more Zicond non basic semantic test cases have been added. gcc/Cha

[PATCH 5/5] [RISC-V] Generate Zicond instruction for conditional execution

2023-07-19 Thread Xiao Zeng
This patch completes the recognition of conditional execution (using equality as an example), namely: 1 rd = (rc == 0) ? (rs1 arith_op rs2) : rs1 Here, arith_op represents the arithmetic operation symbol, which has 8 possibilities: + - | ^ << >>(Shift Right Arithmetic) >>(Shift Right Logical) &

[PATCH 1/5] [RISC-V] Recognize Zicond extension

2023-07-19 Thread Xiao Zeng
This patch is the minimal support for Zicond extension, include the extension name, mask and target defination. gcc/ChangeLog: * common/config/riscv/riscv-common.cc: New extension. * config/riscv/riscv-opts.h (MASK_ZICOND): New mask. (TARGET_ZICOND): New target. gcc/tests

[PATCH 3/5] [RISC-V] Generate Zicond instruction for select pattern with condition eq or neq to 0

2023-07-19 Thread Xiao Zeng
This patch completes the recognition of Zicond when the select pattern with condition eq or neq to 0 (using equality as an example), namely: 1 rd = (rs2 == 0) ? non-imm : 0 2 rd = (rs2 == 0) ? non-imm : non-imm 3 rd = (rs2 == 0) ? reg : non-imm 4 rd = (rs2 == 0) ? reg : reg gcc/ChangeLog:

Re: [PATCH v2] Store_bit_field_1: Use SUBREG instead of REG if possible

2023-07-19 Thread YunQiang Su via Gcc-patches
Eric Botcazou 于2023年7月19日周三 17:45写道: > > > I don't see that. That's definitely not what GCC expects here, > > the left-most word of the doubleword should be unchanged. > > > > Your testcase should be a dg-do-run and probably more like > > > > NOMIPS16 int __attribute__((noipa)) test (const unsign

[committed] libstdc++: Check for multiple modifiers in chrono format string [PR110708]

2023-07-19 Thread Jonathan Wakely via Gcc-patches
Tested x86_64-linux. Pushed to trunk. This should be backported to gcc-13 too, but it can wait until 13.3 (it's just an accepts-invalid and unlikely to affect anybody in practice). -- >8 -- The logic for handling modified chrono specs like %Ey was just restarting the loop after each modifier, an

Re: [PATCH v2] Store_bit_field_1: Use SUBREG instead of REG if possible

2023-07-19 Thread Richard Biener via Gcc-patches
On Wed, 19 Jul 2023, YunQiang Su wrote: > Eric Botcazou ?2023?7?19??? 17:45??? > > > > > I don't see that. That's definitely not what GCC expects here, > > > the left-most word of the doubleword should be unchanged. > > > > > > Your testcase should be a dg-do-run and probably more like > > > > >

Re: [PATCH 3/3] testsuite: Require vectors of doubles for pr97428.c

2023-07-19 Thread Maciej W. Rozycki
On Wed, 12 Jul 2023, Richard Biener wrote: > > Applied, thanks. OK to backport to the active branches? > > Yes. Now backported, thanks. Maciej

Re: [PATCH] core: Support heap-based trampolines

2023-07-19 Thread Martin Uecker via Gcc-patches
Am Mittwoch, dem 19.07.2023 um 10:29 +0100 schrieb Iain Sandoe: > Hi Martin, > > > On 19 Jul 2023, at 10:04, Martin Uecker > > wrote: > > > > > On 17 Jul 2023, > > > > > > > > > > You mention setjmp/longjmp - on darwin and other platforms > > > requiring > > > > > non-stack based trampolines

Re: [committed] - Re: [patch] OpenMP/Fortran: Non-rectangular loops with constant steps other than 1 or -1 [PR107424]

2023-07-19 Thread Thomas Schwinge
Hi Tobias! On 2023-07-19T10:26:12+0200, Tobias Burnus wrote: > Now committed as Rev. r14-2634-g85da0b40538fb0 On devel/omp/gcc-13 branch, the corresponding commit b003e6511754dce475f7f5b0c5cd887a177e41b3 "OpenMP/Fortran: Non-rectangular loops with constant steps other than 1 or -1 [PR107424]" i

Re: [PATCH 1/2] [i386] Support type _Float16/__bf16 independent of SSE2.

2023-07-19 Thread Jakub Jelinek via Gcc-patches
On Wed, Jul 19, 2023 at 01:58:21PM +0800, Hongtao Liu wrote: > > LGTM, if you need someone to rubber-stamp the patch. I'm not really > > versed in this part of the compiler, so please wait a day if someone > > has anything to say about the patch. > Thanks, pushed to trunk. I see some regressions m

Re: [PATCH] Implement Bit-field lowering

2023-07-19 Thread Richard Biener via Gcc-patches
On Fri, Jul 14, 2023 at 7:49 AM naveenh--- via Gcc-patches wrote: > > From: Naveen H S > > This patch adds lowering bit-field and opposite endian accesses pass. > The patch addresses many issues in:- > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=19466 A little bit more description would be nice

[committed] testsuite: Add 64-bit vector variant for bb-slp-pr95839.c

2023-07-19 Thread Maciej W. Rozycki
Add dual-single float vector test complementing bb-slp-pr95839.c. gcc/testsuite/ * gcc.dg/vect/bb-slp-pr95839-v8.c: New test. --- Committed with Richard Biener's approval: . --- gcc/testsuite/gcc.dg/vect/bb-slp-pr95

[PATCH] wide-int: Fix up wi::divmod_internal [PR110731]

2023-07-19 Thread Jakub Jelinek via Gcc-patches
Hi! As the following testcase shows, wi::divmod_internal doesn't handle correctly signed division with precision > 64 when the dividend (and likely divisor as well) is the type's minimum and the precision isn't divisible by 64. A few lines above what the patch hunk changes is: /* Make the divis

Re: [PATCH] wide-int: Fix up wi::divmod_internal [PR110731]

2023-07-19 Thread Richard Biener via Gcc-patches
On Wed, 19 Jul 2023, Jakub Jelinek wrote: > Hi! > > As the following testcase shows, wi::divmod_internal doesn't handle > correctly signed division with precision > 64 when the dividend (and likely > divisor as well) is the type's minimum and the precision isn't divisible > by 64. > > A few line

[committed] libstdc++: Implement correct locale-specific chrono formatting [PR110719]

2023-07-19 Thread Jonathan Wakely via Gcc-patches
Tested x86_64-linux. Pushed to trunk. I'll backport it to gcc-13 some time after the 13.2 release. -- >8 -- This fixes some TODOs in the C++20 format support, where the locale-specific output was incorrect or unimplemented. The approach taken here is to either use the formatting locale's std::t

[committed] libstdc++: Avoid warning in std::format

2023-07-19 Thread Jonathan Wakely via Gcc-patches
Tested x86_64-linux. Pushed to trunk. -- >8 -- With -Wmaybe-uninitialized -Wsystem-headers there's a warning about creating a string_view from an uninitalized array. Initializing the first element of the array avoids the warning. libstdc++-v3/ChangeLog: * include/std/format (__write_pad

Re: vectorizer: Avoid an OOB access from vectorization

2023-07-19 Thread Richard Biener via Gcc-patches
On Tue, 18 Jul 2023, Matthew Malcomson wrote: > Tamar pointed out it would be good to have a `scan-tree-dump` in the testcase > just to make sure that when something is currently vectorizing it stays > vectorizing (and hence that the new code is still likely running). > > Attached patch has that

[committed] tree-switch-conversion: Fix a comment typo

2023-07-19 Thread Jakub Jelinek via Gcc-patches
Hi! I've noticed a comment typo, this patch fixes that. Bootstrapped/regtested on x86_64-linux and i686-linux, committed to trunk as obvious. 2023-07-19 Jakub Jelinek * tree-switch-conversion.h (class bit_test_cluster): Fix comment typo. --- gcc/tree-switch-conversion.h.jj 2023-

Re: [GCC 13 PATCH] PR target/109973: CCZmode and CCCmode variants of [v]ptest.

2023-07-19 Thread Richard Biener via Gcc-patches
On Sun, Jun 11, 2023 at 12:55 AM Roger Sayle wrote: > > > This is a backport of the fixes for PR target/109973 and PR target/110083. > > This backport to the releases/gcc-13 branch has been tested on > x86_64-pc-linux-gnu with make bootstrap and make -k check, both with and > without --target_boar

Re: [PATCH v2] Store_bit_field_1: Use SUBREG instead of REG if possible

2023-07-19 Thread Jeff Law via Gcc-patches
On 7/19/23 04:25, Richard Biener wrote: On Wed, 19 Jul 2023, YunQiang Su wrote: Eric Botcazou ?2023?7?19??? 17:45??? I don't see that. That's definitely not what GCC expects here, the left-most word of the doubleword should be unchanged. Your testcase should be a dg-do-run and probably

[OG13][committed] gfortran.dg/gomp/affinity-clause-1.f90: Fix scan-tree-dump

2023-07-19 Thread Tobias Burnus
OG13 (devel/omp/gcc-13) has a patch which uses sometimes the tree's array representation. The patch unfortunately did not make it to mainline so far. The here attached/committed patch adapts the expected dump for the OG13 variant to unfail this testcase. With this commit, gfortran/gomp/ has no fa

Re: [GCC 13 PATCH] PR target/109973: CCZmode and CCCmode variants of [v]ptest.

2023-07-19 Thread Uros Bizjak via Gcc-patches
On Wed, Jul 19, 2023 at 2:21 PM Richard Biener wrote: > > On Sun, Jun 11, 2023 at 12:55 AM Roger Sayle > wrote: > > > > > > This is a backport of the fixes for PR target/109973 and PR target/110083. > > > > This backport to the releases/gcc-13 branch has been tested on > > x86_64-pc-linux-gnu wi

[OG13][committed] libgomp.fortran/map-subarray-5.f90: Fix for shared-mem device/host

2023-07-19 Thread Tobias Burnus
Fix testcase if from "OpenMP/OpenACC: Unordered/non-constant component offset runtime diagnostic" which has been semi-submitted* to mainline as: "[PATCH 09/14] OpenMP/OpenACC: Unordered/non-constant component offset runtime diagnostic" https://gcc.gnu.org/pipermail/gcc-patches/2023-June/6222

Re: [PATCH] middle-end/61747 - conditional move expansion and constants

2023-07-19 Thread Jakub Jelinek via Gcc-patches
On Tue, Jul 18, 2023 at 01:25:45PM +0200, Richard Biener wrote: > > PR middle-end/61747 > * internal-fn.cc (expand_vec_cond_optab_fn): When the > value operands are equal to the original comparison operands > preserve that equality by re-using the comparison expansion. >

Re: [PATCH] match.pd: Implement missed optimization (~X | Y) ^ X -> ~(X & Y) [PR109986]

2023-07-19 Thread Drew Ross via Gcc-patches
Trying to lower converts to operands through, for example, (for op (bit_ior bit_and bit_xor) (for rop (bit_xor bit_ior bit_and) (simplify (op:c (nop_convert (rop @0 @1)) @3) (op (rop (convert:type @0) (convert:type @1)) @3 (simplify (convert (bit_not @0)) (bit_not (convert:type @0))

Re: [PATCH] middle-end/61747 - conditional move expansion and constants

2023-07-19 Thread Richard Biener via Gcc-patches
On Wed, 19 Jul 2023, Jakub Jelinek wrote: > On Tue, Jul 18, 2023 at 01:25:45PM +0200, Richard Biener wrote: > > > > PR middle-end/61747 > > * internal-fn.cc (expand_vec_cond_optab_fn): When the > > value operands are equal to the original comparison operands > > preserve that equa

RE: [PATCH] VECT: Add mask_len_fold_left_plus for in-order floating-point reduction

2023-07-19 Thread Li, Pan2 via Gcc-patches
Committed as passed both the bootstrap and regression test, thanks Richard. Pan -Original Message- From: Gcc-patches On Behalf Of Richard Biener via Gcc-patches Sent: Wednesday, July 19, 2023 4:17 PM To: Ju-Zhe Zhong Cc: gcc-patches@gcc.gnu.org; richard.sandif...@arm.com Subject: Re: [

Re: [PATCH] middle-end/61747 - conditional move expansion and constants

2023-07-19 Thread Jakub Jelinek via Gcc-patches
On Wed, Jul 19, 2023 at 01:36:23PM +, Richard Biener wrote: > > If we have a match between at least one of the comparison operands and > > op2/op3, I think having equivalency there is perhaps more important than > > the canonicalization, but it would be nice not to break it even if there > > is

Re: [PATCH] c++: fix ICE with is_really_empty_class [PR110106]

2023-07-19 Thread Patrick Palka via Gcc-patches
On Tue, 18 Jul 2023, Marek Polacek via Gcc-patches wrote: > Bootstrapped/regtested on x86_64-pc-linux-gnu, ok for trunk and branches? Looks reasonable to me. Though I wonder if we could also fix this by not checking potentiality at all in this case? The problematic call to is_rvalue_constant_ex

Re: [PATCH v3] Implement new RTL optimizations pass: fold-mem-offsets.

2023-07-19 Thread Jeff Law via Gcc-patches
On 7/19/23 02:08, Manolis Tsamis wrote: de. I stumbled upon the same thing when doing an aarch64 bootstrap build yesterday. Given that this causes issues, maybe doing int icode = INSN_CODE (insn); ... INSN_CODE (insn) = icode; Is a good option and should also be more performant. I

Re: [PATCH] core: Support heap-based trampolines

2023-07-19 Thread Iain Sandoe
Hi Martin, > On 19 Jul 2023, at 11:43, Martin Uecker via Gcc-patches > wrote: > > Am Mittwoch, dem 19.07.2023 um 10:29 +0100 schrieb Iain Sandoe: >>> On 19 Jul 2023, at 10:04, Martin Uecker >>> wrote: >> > On 17 Jul 2023, >>> >> You mention setjmp/longjmp - on darwin and othe

Re: [PATCH] RISC-V: Refactor RVV machine modes

2023-07-19 Thread Kito Cheng via Gcc-patches
Thansk, that's really awesome! One comment about mode iterator is the naming seems like still prefixed with VNX which inconsistent with new mode naming scheme. > diff --git a/gcc/config/riscv/autovec.md b/gcc/config/riscv/autovec.md > index cd5b19457f8..03e19259505 100644 > --- a/gcc/config/riscv

Re: [PATCH 2/3] testsuite: Require 128-bit vectors for bb-slp-pr95839.c

2023-07-19 Thread Maciej W. Rozycki
On Wed, 12 Jul 2023, Richard Biener wrote: > > > That said, we should handle this better so can you file an > > > enhancement bugreport for this? > > > > Filed as PR -optimization/110630. > > Thanks! Thanks for making this improvement. I've checked MIPS results and code produced now is as fo

Re: [PATCH] Add __builtin_iseqsig()

2023-07-19 Thread FX Coudert via Gcc-patches
6 weeks later, I’d like to ask a global maintainer to review this. The idea was okay’ed previously by Joseph Myers, but he asked for testing of both the quiet and signalling NaN cases, which is now done. FX > Le 6 juin 2023 à 20:15, FX Coudert a écrit : > > Hi, > > (It took me a while to get

[PATCH 1/2][frontend] Add novector C++ pragma

2023-07-19 Thread Tamar Christina via Gcc-patches
Hi All, FORTRAN currently has a pragma NOVECTOR for indicating that vectorization should not be applied to a particular loop. ICC/ICX also has such a pragma for C and C++ called #pragma novector. As part of this patch series I need a way to easily turn off vectorization of particular loops, part

[PATCH 2/2][frontend]: Add novector C pragma

2023-07-19 Thread Tamar Christina via Gcc-patches
Hi All, FORTRAN currently has a pragma NOVECTOR for indicating that vectorization should not be applied to a particular loop. ICC/ICX also has such a pragma for C and C++ called #pragma novector. As part of this patch series I need a way to easily turn off vectorization of particular loops, part

Re: [PATCH] core: Support heap-based trampolines

2023-07-19 Thread Martin Uecker via Gcc-patches
Am Mittwoch, dem 19.07.2023 um 15:23 +0100 schrieb Iain Sandoe: > Hi Martin, > > > On 19 Jul 2023, at 11:43, Martin Uecker via Gcc-patches > > wrote: > > > > Am Mittwoch, dem 19.07.2023 um 10:29 +0100 schrieb Iain Sandoe: > > > > > On 19 Jul 2023, at 10:04, Martin Uecker > > > > wrote: > > >

[committed] libstdc++: Fix locale-specific duration formatting [PR110719]

2023-07-19 Thread Jonathan Wakely via Gcc-patches
Tested x86_64-linux. Pushed to trunk. -- >8 -- The r14-2640-gf4bce119f617dc commit only removed fractional seconds for time points, but it needs to be done for durations and hh_mm_ss types too. libstdc++-v3/ChangeLog: PR libstdc++/110719 * include/bits/chrono_io.h (__formatter_c

[committed] libstdc++: Fix formatting of negative chrono::hh_mm_ss

2023-07-19 Thread Jonathan Wakely via Gcc-patches
Tested x86_64-linux. Pushed to trunk. -- >8 -- When formatting with an empty chrono spec ("{}") two minus signs were being added to hh_mm_ss values. This is because the __is_neg flag was checked to add one explicitly, and then the ostream operator added another one. We should only check the __is

Re: [V1][PATCH 0/3] New attribute "element_count" to annotate bounds for C99 FAM(PR108896)

2023-07-19 Thread Qing Zhao via Gcc-patches
More thoughts on the following example Kees provided: > On Jul 17, 2023, at 7:40 PM, Kees Cook wrote: >> >> The counted_by attribute is used to annotate a Flexible array member on how >> many elements it will have. >> However, if this information can not accurately reflect the real number of

[GCC 13 PATCH] aarch64: Remove architecture dependencies from intrinsics

2023-07-19 Thread Andrew Carlotti via Gcc-patches
Updated patch to fix the fp16 intrinsic pragmas, and pushed to master. OK to backport to GCC 13? Many intrinsics currently depend on both an architecture version and a feature, despite the corresponding instructions being available within GCC at lower architecture versions. LLVM has already remo

[PATCH V2] rs6000: Don't allow AltiVec address in movoo & movxo pattern [PR110411]

2023-07-19 Thread jeevitha via Gcc-patches
Hi All, The following patch has been bootstrapped and regtested on powerpc64le-linux. There are no instructions that do traditional AltiVec addresses (i.e. with the low four bits of the address masked off) for OOmode and XOmode objects. The solution is to modify the constraints used in the movoo

Re: [PATCH 0/8] Tweak predicate macros in tree

2023-07-19 Thread Ken Matsui via Gcc-patches
On Wed, Jul 19, 2023 at 12:08 AM Richard Biener wrote: > > On Wed, Jul 19, 2023 at 1:34 AM Ken Matsui via Gcc-patches > wrote: > > > > This patch series tweaks predicate macros in tree.h to make the code more > > readable. TYPE_REF_P is moved to tree.h and used for INDIRECT_TYPE_P and > > TYPE_RE

[pushed][LRA]: Check and update frame to stack pointer elimination after stack slot allocation

2023-07-19 Thread Vladimir Makarov via Gcc-patches
The following patch is necessary for porting avr to LRA. The patch was successfully bootstrapped and tested on x86-64, aarch64, and ppc64le. There is still avr poring problem with reloading of subreg of frame pointer.  I'll address it later on this week. commit 2971ff7b1d564ac04b537d907c70e

[PATCH] c++: fix ICE with designated initializer [PR110114]

2023-07-19 Thread Marek Polacek via Gcc-patches
Bootstrapped/regtested on x86_64-pc-linux-gnu, ok for trunk? -- >8 -- r13-1227 added an assert checking that the index in a CONSTRUCTOR is a FIELD_DECL. That's a reasonable assumption but in this case we never called reshape_init due to the type being incomplete, and so the index remained an ide

[PATCH] c++: passing partially inst tmpl as ttp [PR110566]

2023-07-19 Thread Patrick Palka via Gcc-patches
Bootstrapped and regtested on x86_64-pc-linux-gnu, does this look OK for trunk/13? -- >8 -- Since the arguments 'pargs' passed to the coerce_template_parms from coerce_template_template_parms are always a full set, we need to make sure we always pass the parameters of the most general template be

Re: [PATCH] c++: passing partially inst tmpl as ttp [PR110566]

2023-07-19 Thread Patrick Palka via Gcc-patches
On Wed, Jul 19, 2023 at 2:05 PM Patrick Palka wrote: > > Bootstrapped and regtested on x86_64-pc-linux-gnu, does this look OK for > trunk/13? > > -- >8 -- > > Since the arguments 'pargs' passed to the coerce_template_parms from > coerce_template_template_parms are always a full set, we need to mak

Re: [PATCH] c++: fix ICE with designated initializer [PR110114]

2023-07-19 Thread Patrick Palka via Gcc-patches
On Wed, 19 Jul 2023, Marek Polacek wrote: > Bootstrapped/regtested on x86_64-pc-linux-gnu, ok for trunk? LGTM. It might be preferable to check COMPLETE_TYPE_P in the caller instead, so that we avoid inspecting CLASSTYPE_NON_AGGREGATE on an incomplete class type, and so that the caller doesn't "c

Re: [GCC 13 PATCH] aarch64: Remove architecture dependencies from intrinsics

2023-07-19 Thread Ramana Radhakrishnan
On Wed, Jul 19, 2023 at 5:44 PM Andrew Carlotti via Gcc-patches wrote: > > Updated patch to fix the fp16 intrinsic pragmas, and pushed to master. > OK to backport to GCC 13? > > > Many intrinsics currently depend on both an architecture version and a > feature, despite the corresponding instructio

Re: [PATCH] c++: fix ICE with designated initializer [PR110114]

2023-07-19 Thread Marek Polacek via Gcc-patches
On Wed, Jul 19, 2023 at 02:32:15PM -0400, Patrick Palka wrote: > On Wed, 19 Jul 2023, Marek Polacek wrote: > > > Bootstrapped/regtested on x86_64-pc-linux-gnu, ok for trunk? > > LGTM. It might be preferable to check COMPLETE_TYPE_P in the caller > instead, so that we avoid inspecting CLASSTYPE_N

Re: [PATCH] libstdc++: Define _GLIBCXX_HAS_BUILTIN_TRAIT

2023-07-19 Thread Patrick Palka via Gcc-patches
On Tue, 18 Jul 2023, Ken Matsui via Libstdc++ wrote: > This patch defines _GLIBCXX_HAS_BUILTIN_TRAIT, which will be used as a > flag to toggle built-in traits in the type_traits header. Through this > macro function and _GLIBCXX_NO_BUILTIN_TRAITS macro, we can switch the > use of built-in traits w

Re: [V1][PATCH 0/3] New attribute "element_count" to annotate bounds for C99 FAM(PR108896)

2023-07-19 Thread Qing Zhao via Gcc-patches
>> >> The point is: allocation size should synced with the value of “counted_by”. >> LLVM’s RFC also have the similar requirement: >> https://discourse.llvm.org/t/rfc-enforcing-bounds-safety-in-c-fbounds-safety/70854#maintaining-correctness-of-bounds-annotations-18 > > Right, I'm saying it woul

[PATCH] Use strtol instead of std::stoi in gensupport.cc

2023-07-19 Thread John David Anglin
Tested on trunk with hppa64-hp-hpux11.11. Okay? Dave --- Use strtol instead of std::stoi [PR110646] Implementation of std::stoi was overlooked on hppa-hpux, so use strtol instead. 2023-07-19 John David Anglin gcc/ChangeLog: PR bootstrap/110646 * gensupport.cc(class conlist

[PATCH] c++: -Wmissing-field-initializers and empty class [PR110064]

2023-07-19 Thread Marek Polacek via Gcc-patches
Bootstrapped/regtested on x86_64-pc-linux-gnu, ok for trunk? -- >8 -- Let's suppress -Wmissing-field-initializers for empty classes. Here I don't think I need the usual COMPLETE_TYPE_P/dependent_type_p checks. PR c++/110064 gcc/cp/ChangeLog: * typeck2.cc (process_init_construc

Re: [PATCH] testsuite: fix allocator-opt1.C FAIL with old ABI

2023-07-19 Thread Marek Polacek via Gcc-patches
Ping. On Mon, Jul 10, 2023 at 04:33:26PM -0400, Marek Polacek via Gcc-patches wrote: > Running > $ make check-g++ > RUNTESTFLAGS='--target_board=unix\{-D_GLIBCXX_USE_CXX11_ABI=0,\} > dg.exp=allocator-opt1.C' > yields: > > FAIL: g++.dg/tree-ssa/allocator-opt1.C -std=c++98 scan-tree-dump-times

Re: [PATCH] c++: fix ICE with designated initializer [PR110114]

2023-07-19 Thread Jason Merrill via Gcc-patches
On 7/19/23 14:38, Marek Polacek wrote: On Wed, Jul 19, 2023 at 02:32:15PM -0400, Patrick Palka wrote: On Wed, 19 Jul 2023, Marek Polacek wrote: Bootstrapped/regtested on x86_64-pc-linux-gnu, ok for trunk? LGTM. It might be preferable to check COMPLETE_TYPE_P in the caller instead, so that w

Re: [PATCH] libstdc++: Define _GLIBCXX_HAS_BUILTIN_TRAIT

2023-07-19 Thread Ken Matsui via Gcc-patches
On Wed, Jul 19, 2023 at 11:48 AM Patrick Palka wrote: > > On Tue, 18 Jul 2023, Ken Matsui via Libstdc++ wrote: > > > This patch defines _GLIBCXX_HAS_BUILTIN_TRAIT, which will be used as a > > flag to toggle built-in traits in the type_traits header. Through this > > macro function and _GLIBCXX_NO_

[PATCH v2] libstdc++: Define _GLIBCXX_HAS_BUILTIN_TRAIT

2023-07-19 Thread Ken Matsui via Gcc-patches
This patch defines _GLIBCXX_HAS_BUILTIN_TRAIT macro, which will be used as a flag to toggle the use of built-in traits in the type_traits header through _GLIBCXX_NO_BUILTIN_TRAITS macro, without needing to modify the source code. libstdc++-v3/ChangeLog: * include/bits/c++config (_GLIBCXX_

Re: [PATCH] c++: -Wmissing-field-initializers and empty class [PR110064]

2023-07-19 Thread Jason Merrill via Gcc-patches
On 7/19/23 15:20, Marek Polacek wrote: Bootstrapped/regtested on x86_64-pc-linux-gnu, ok for trunk? OK. We might also improve the diagnostic for base classes, perhaps by teaching dump_simple_decl about DECL_FIELD_IS_BASE? -- >8 -- Let's suppress -Wmissing-field-initializers for empty clas

Re: [PATCH] c++: -Wmissing-field-initializers and empty class [PR110064]

2023-07-19 Thread Marek Polacek via Gcc-patches
On Wed, Jul 19, 2023 at 03:36:49PM -0400, Jason Merrill wrote: > On 7/19/23 15:20, Marek Polacek wrote: > > Bootstrapped/regtested on x86_64-pc-linux-gnu, ok for trunk? > > OK. We might also improve the diagnostic for base classes, perhaps by > teaching dump_simple_decl about DECL_FIELD_IS_BASE?

[x86_64 PATCH] More TImode parameter passing improvements.

2023-07-19 Thread Roger Sayle
This patch is the next piece of a solution to the x86_64 ABI issues in PR 88873. This splits the *concat3_3 define_insn_and_split into two patterns, a TARGET_64BIT *concatditi3_3 and a !TARGET_64BIT *concatsidi3_3. This allows us to add an additional alternative to the the 64-bit version, enabli

[PATCH] libstdc++: Fix preprocessor conditions for std::from_chars [PR109921]

2023-07-19 Thread Jonathan Wakely via Gcc-patches
I'm testing this patch for gcc-13 as a better fix for PR109921, without the breakage that r14-1431-g7037e7b6e4ac41 caused on trunk. If testing goes well I'll push this before the 13.2 release candidate. -- >8 -- We use the from_chars_strtod function with __strtof128 to read a _Float128 value, bu

Re: [PATCH v5 4/5] c++modules: report imported CMI files as dependencies

2023-07-19 Thread Nathan Sidwell via Gcc-patches
On 7/18/23 20:01, Ben Boeckel wrote: On Tue, Jul 18, 2023 at 16:52:44 -0400, Jason Merrill wrote: On 6/25/23 12:36, Ben Boeckel wrote: On Fri, Jun 23, 2023 at 08:12:41 -0400, Nathan Sidwell wrote: On 6/22/23 22:45, Ben Boeckel wrote: On Thu, Jun 22, 2023 at 17:21:42 -0400, Jason Merrill wrote

[PING 2] [PATCH] Less warnings for parameters declared as arrays [PR98541, PR98536]

2023-07-19 Thread Martin Uecker via Gcc-patches
Ok for gcc-14 now? Am Dienstag, dem 04.04.2023 um 19:31 -0600 schrieb Jeff Law: > > > On 4/3/23 13:34, Martin Uecker via Gcc-patches wrote: > > > > > > With the relatively new warnings (11..) affecting VLA bounds, > > I now get a lot of false positives with -Wall. In general, I find > > th

[PATCH] c++: Improve printing of base classes [PR110745]

2023-07-19 Thread Marek Polacek via Gcc-patches
Bootstrapped/regtested on x86_64-pc-linux-gnu, ok for trunk? -- >8 -- This patch changes warning: missing initializer for member 'D::' [-Wmissing-field-initializers] to warning: missing initializer for member 'D::B' [-Wmissing-field-initializers] PR c++/110745 gcc/cp/ChangeLog:

  1   2   >