Re: [PATCH 2/2] VR-VALUES: Rewrite test_for_singularity using range_op_handler

2023-09-01 Thread Andrew Pinski via Gcc-patches
On Fri, Aug 11, 2023 at 8:08 AM Andrew MacLeod via Gcc-patches wrote: > > > On 8/11/23 05:51, Richard Biener wrote: > > On Fri, Aug 11, 2023 at 11:17 AM Andrew Pinski via Gcc-patches > > wrote: > >> So it turns out there was a simplier way of starting to > >> improve VRP to start to fix PR 110131

Re: [PATCH v1] RISC-V: Support FP ADD/SUB/MUL/DIV autovec for VLS mode

2023-09-01 Thread 钟居哲
LGTM。 juzhe.zh...@rivai.ai From: pan2.li Date: 2023-09-01 11:33 To: gcc-patches CC: juzhe.zhong; pan2.li; yanzhang.wang; kito.cheng Subject: [PATCH v1] RISC-V: Support FP ADD/SUB/MUL/DIV autovec for VLS mode From: Pan Li This patch would like to allow the VLS mode autovec for the floating-p

Re: [PATCH] libstdc++: Use GLIBCXX_CHECK_LINKER_FEATURES for cross-builds (PR111238)

2023-09-01 Thread Christophe Lyon via Gcc-patches
On Thu, 31 Aug 2023 at 21:43, Jonathan Wakely wrote: > On Thu, 31 Aug 2023 at 18:42, Jonathan Wakely wrote: > > > > On Thu, 31 Aug 2023 at 16:26, Christophe Lyon > > wrote: > > > > > > As discussed in PR104167 (comments #8 and below), and PR111238, using > > > -Wl,-gc-sections in the libstdc++

Re: [PATCH] Fortran: runtime bounds-checking in presence of array constructors [PR31059]

2023-09-01 Thread Mikael Morin via Gcc-patches
Le 31/08/2023 à 22:42, Harald Anlauf via Fortran a écrit : Dear all, gfortran's array bounds-checking code does a mostly reasonable job for array sections in expressions and assignments, but forgot the case that (rank-1) expressions can involve array constructors, which have a shape ;-) The att

RE: [PATCH v1] RISC-V: Support FP ADD/SUB/MUL/DIV autovec for VLS mode

2023-09-01 Thread Li, Pan2 via Gcc-patches
Committed, thanks Juzhe. Pan From: 钟居哲 Sent: Friday, September 1, 2023 3:28 PM To: Li, Pan2 ; gcc-patches Cc: Li, Pan2 ; Wang, Yanzhang ; kito.cheng Subject: Re: [PATCH v1] RISC-V: Support FP ADD/SUB/MUL/DIV autovec for VLS mode LGTM。 juzhe.zh...@rivai.ai

Re: [PATCH][Hashtable] Performance optimization through use of insertion hint

2023-09-01 Thread Jonathan Wakely via Gcc-patches
On Fri, 1 Sept 2023 at 09:59, Jonathan Wakely wrote: > > On Tue, 29 Aug 2023 at 20:52, François Dumont via Libstdc++ > wrote: > > > > Hi > > > > Any feedback regarding this patch ? > > This is a fairly large patch and before we make any more changes to > unordered containers we have an ABI break

Re: [PATCH][Hashtable] Performance optimization through use of insertion hint

2023-09-01 Thread Jonathan Wakely via Gcc-patches
On Tue, 29 Aug 2023 at 20:52, François Dumont via Libstdc++ wrote: > > Hi > > Any feedback regarding this patch ? This is a fairly large patch and before we make any more changes to unordered containers we have an ABI break to fix: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111050 > > Françoi

Re: [PATCH 00/13] [RFC] Support Intel APX EGPR

2023-09-01 Thread Hongyu Wang via Gcc-patches
Richard Biener via Gcc-patches 于2023年8月31日周四 17:21写道: > > On Thu, Aug 31, 2023 at 10:22 AM Hongyu Wang via Gcc-patches > wrote: > > > > Intel Advanced performance extension (APX) has been released in [1]. > > It contains several extensions such as extended 16 general purpose registers > > (EGPRs)

Re: [PATCH 11/13] [APX EGPR] Handle legacy insns that only support GPR16 (3/5)

2023-09-01 Thread Hongyu Wang via Gcc-patches
Richard Biener via Gcc-patches 于2023年8月31日周四 17:31写道: > > On Thu, Aug 31, 2023 at 11:26 AM Richard Biener > wrote: > > > > On Thu, Aug 31, 2023 at 10:25 AM Hongyu Wang via Gcc-patches > > wrote: > > > > > > From: Kong Lingling > > > > > > Disable EGPR usage for below legacy insns in opcode map2

Re: [PATCH 06/13] [APX EGPR] Map reg/mem constraints in inline asm to non-EGPR constraint.

2023-09-01 Thread Hongyu Wang via Gcc-patches
Jakub Jelinek via Gcc-patches 于2023年8月31日周四 17:18写道: > > On Thu, Aug 31, 2023 at 04:20:17PM +0800, Hongyu Wang via Gcc-patches wrote: > > From: Kong Lingling > > > > In inline asm, we do not know if the insn can use EGPR, so disable EGPR > > usage by default from mapping the common reg/mem constr

Re: [PATCH 06/13] [APX EGPR] Map reg/mem constraints in inline asm to non-EGPR constraint.

2023-09-01 Thread Hongyu Wang via Gcc-patches
Uros Bizjak via Gcc-patches 于2023年8月31日周四 18:01写道: > > On Thu, Aug 31, 2023 at 11:18 AM Jakub Jelinek via Gcc-patches > wrote: > > > > On Thu, Aug 31, 2023 at 04:20:17PM +0800, Hongyu Wang via Gcc-patches wrote: > > > From: Kong Lingling > > > > > > In inline asm, we do not know if the insn can

Re: [PATCH 01/13] [APX EGPR] middle-end: Add insn argument to base_reg_class

2023-09-01 Thread Hongyu Wang via Gcc-patches
Uros Bizjak via Gcc-patches 于2023年8月31日周四 18:16写道: > > On Thu, Aug 31, 2023 at 10:20 AM Hongyu Wang wrote: > > > > From: Kong Lingling > > > > Current reload infrastructure does not support selective base_reg_class > > for backend insn. Add insn argument to base_reg_class for > > lra/reload usag

Re: [PATCH 08/13] [APX EGPR] Handle GPR16 only vector move insns

2023-09-01 Thread Hongyu Wang via Gcc-patches
Jakub Jelinek via Gcc-patches 于2023年8月31日周四 17:44写道: > > On Thu, Aug 31, 2023 at 04:20:19PM +0800, Hongyu Wang via Gcc-patches wrote: > > For vector move insns like vmovdqa/vmovdqu, their evex counterparts > > requrire explicit suffix 64/32/16/8. The usage of these instruction > > are prohibited u

[PATCH V6] Optimize '(X - N * M) / N' to 'X / N - M' if valid

2023-09-01 Thread Jiufu Guo via Gcc-patches
Hi, Integer expression "(X - N * M) / N" can be optimized to "X / N - M" with the below conditions: 1. There is no wrap/overflow/underflow. wrap/overflow/underflow breaks the arithmetic operation. 2. "X - N * M" and "X" are not of opposite sign. Here, the operation "/" would be "trunc_div",

Re: [PATCH 08/13] [APX EGPR] Handle GPR16 only vector move insns

2023-09-01 Thread Jakub Jelinek via Gcc-patches
On Fri, Sep 01, 2023 at 05:07:53PM +0800, Hongyu Wang wrote: > Jakub Jelinek via Gcc-patches 于2023年8月31日周四 17:44写道: > > > > On Thu, Aug 31, 2023 at 04:20:19PM +0800, Hongyu Wang via Gcc-patches wrote: > > > For vector move insns like vmovdqa/vmovdqu, their evex counterparts > > > requrire explicit

Re: [PATCH 06/13] [APX EGPR] Map reg/mem constraints in inline asm to non-EGPR constraint.

2023-09-01 Thread Uros Bizjak via Gcc-patches
On Fri, Sep 1, 2023 at 11:10 AM Hongyu Wang wrote: > > Uros Bizjak via Gcc-patches 于2023年8月31日周四 18:01写道: > > > > On Thu, Aug 31, 2023 at 11:18 AM Jakub Jelinek via Gcc-patches > > wrote: > > > > > > On Thu, Aug 31, 2023 at 04:20:17PM +0800, Hongyu Wang via Gcc-patches > > > wrote: > > > > From

[PATCH] RISC-V: Add vec_extract for BI -> QI.

2023-09-01 Thread Robin Dapp via Gcc-patches
Hi, this patch adds a vec_extract expander that extracts a QImode from a vector mask mode. In doing so, it helps recognize a "live operation"/extract last idiom for mask modes. It fixes the ICE in tree-vect-live-6.c by circumventing the fallback code in extract_bit_field_1. The problem there is

Re: [PATCH] RISC-V: Enable VECT_COMPARE_COSTS by default

2023-09-01 Thread Robin Dapp via Gcc-patches
Hi Juzhe, thanks, this is OK, we would have needed this sooner or later anyway. Regards Robin

Re: [PATCH] RISC-V: Add dynamic LMUL compile option

2023-09-01 Thread Robin Dapp via Gcc-patches
LGTM Regards Robin

Re: [PATCH] RISC-V: Add vec_extract for BI -> QI.

2023-09-01 Thread 钟居哲
LTGM juzhe.zh...@rivai.ai From: Robin Dapp Date: 2023-09-01 17:55 To: gcc-patches; palmer; Kito Cheng; jeffreyalaw; juzhe.zh...@rivai.ai CC: rdapp.gcc Subject: [PATCH] RISC-V: Add vec_extract for BI -> QI. Hi, this patch adds a vec_extract expander that extracts a QImode from a vector mask m

Re: [PATCH 1/4] RISC-V: Adjust expand_cond_len_{unary,binop,op} api

2023-09-01 Thread Robin Dapp via Gcc-patches
Thanks, LGTM. Btw. I haven't forgotten to respond to your last refactor but just didn't find the time yet. I figured I should have some proper draft before suggesting more things :) Regards Robin

Re: [PATCH 2/4] RISC-V: Add conditional autovec convert(INT<->INT) patterns

2023-09-01 Thread Robin Dapp via Gcc-patches
Hi Lehua, this LGTM now, thanks. It's also easier to read after the refactor :) Regards Robin

Re: [PATCH] analyzer: Add support of placement new and improved operator new [PR105948,PR94355]

2023-09-01 Thread Benjamin Priour via Gcc-patches
Hi David, On Fri, Sep 1, 2023 at 1:59 AM David Malcolm wrote: > On Fri, 2023-09-01 at 00:04 +0200, priour...@gmail.com wrote: > > [..snip..] > ...which will only fire if arg 1 is a region_svalue. This won't > trigger if you have e.g. a binop_svalue for pointer arithmetic. > > What happens e.g

Re: [RFC] gimple ssa: SCCP - A new PHI optimization pass

2023-09-01 Thread Filip Kastl
> That's interesting. Your placement at > > NEXT_PASS (pass_cd_dce, false /* update_address_taken_p */); > NEXT_PASS (pass_phiopt, true /* early_p */); > + NEXT_PASS (pass_sccp); > > and > >NEXT_PASS (pass_tsan); >NEXT_PASS (pass_dse, true /* use DR a

Re: [PATCH 3/4] RISC-V: Add conditional autovec convert(FP<->FP) patterns

2023-09-01 Thread Robin Dapp via Gcc-patches
Hi Lehua, this is OK, thanks. Regards Robin

[PATCH] riscv: xtheadcondmov: Don't run tests with -Oz

2023-09-01 Thread Christoph Muellner
From: Christoph Müllner Recently, these xtheadcondmov tests regressed with -Oz: * FAIL: gcc.target/riscv/xtheadcondmov-mveqz-imm-eqz.c * FAIL: gcc.target/riscv/xtheadcondmov-mveqz-imm-not.c * FAIL: gcc.target/riscv/xtheadcondmov-mvnez-imm-cond.c * FAIL: gcc.target/riscv/xtheadcondmov-mvnez-imm-ne

Re: [PATCH 4/4] RISC-V: Add conditional autovec convert(INT<->FP) patterns

2023-09-01 Thread Robin Dapp via Gcc-patches
This one is OK as well, thanks. Regards Robin

Re: [PATCH 06/13] [APX EGPR] Map reg/mem constraints in inline asm to non-EGPR constraint.

2023-09-01 Thread Hongtao Liu via Gcc-patches
On Fri, Sep 1, 2023 at 5:38 PM Uros Bizjak via Gcc-patches wrote: > > On Fri, Sep 1, 2023 at 11:10 AM Hongyu Wang wrote: > > > > Uros Bizjak via Gcc-patches 于2023年8月31日周四 18:01写道: > > > > > > On Thu, Aug 31, 2023 at 11:18 AM Jakub Jelinek via Gcc-patches > > > wrote: > > > > > > > > On Thu, Aug

Re: [PATCH 11/13] [APX EGPR] Handle legacy insns that only support GPR16 (3/5)

2023-09-01 Thread Hongtao Liu via Gcc-patches
On Thu, Aug 31, 2023 at 5:31 PM Richard Biener via Gcc-patches wrote: > > On Thu, Aug 31, 2023 at 11:26 AM Richard Biener > wrote: > > > > On Thu, Aug 31, 2023 at 10:25 AM Hongyu Wang via Gcc-patches > > wrote: > > > > > > From: Kong Lingling > > > > > > Disable EGPR usage for below legacy insn

Re: [PATCH] expmed: Allow extract_bit_field via mem for low-precision modes.

2023-09-01 Thread Robin Dapp via Gcc-patches
> It's not just a question of which byte though. It's also a question > of which bit. > > One option would be to code-generate for even X and for odd X, and select > between them at runtime. But that doesn't scale well to 2+2X and 1+1X. > > Otherwise I think we need to treat the bit position as

Re: [PATCH v4 4/4] libstdc++: Optimize is_compound trait performance

2023-09-01 Thread Ken Matsui via Gcc-patches
On Tue, Aug 8, 2023 at 1:33 PM Jonathan Wakely wrote: > > > > On Tue, 18 Jul 2023 at 08:44, Ken Matsui via Libstdc++ > wrote: >> >> This patch optimizes the performance of the is_compound trait by >> dispatching to the new __is_arithmetic built-in trait. >> >> libstdc++-v3/ChangeLog: >> >>

Re: [x86_64 PATCH] Improve __int128 argument passing (in ix86_expand_move).

2023-09-01 Thread Manolis Tsamis
Hi Roger, I've (accidentally) found a codegen regression that I bisected down to this patch. For these two functions: typedef struct { float minx, miny; float maxx, maxy; } AABB; int TestOverlap(AABB a, AABB b) { return a.minx <= b.maxx && a.miny <= b.maxy && a.maxx >= b.minx

Re: [PATCH] expmed: Allow extract_bit_field via mem for low-precision modes.

2023-09-01 Thread Richard Sandiford via Gcc-patches
Robin Dapp via Gcc-patches writes: >> It's not just a question of which byte though. It's also a question >> of which bit. >> >> One option would be to code-generate for even X and for odd X, and select >> between them at runtime. But that doesn't scale well to 2+2X and 1+1X. >> >> Otherwise I

Re: [RFC] gimple ssa: SCCP - A new PHI optimization pass

2023-09-01 Thread Richard Biener via Gcc-patches
On Fri, 1 Sep 2023, Filip Kastl wrote: > > That's interesting. Your placement at > > > > NEXT_PASS (pass_cd_dce, false /* update_address_taken_p */); > > NEXT_PASS (pass_phiopt, true /* early_p */); > > + NEXT_PASS (pass_sccp); > > > > and > > > >NEXT_PASS (

[committed] libstdc++: Do not allow chrono::parse to overflow for %C [PR111162]

2023-09-01 Thread Jonathan Wakely via Gcc-patches
Tested x86_64-linux. Pushed to trunk. -- >8 -- libstdc++-v3/ChangeLog: PR libstdc++/62 * include/bits/chrono_io.h (_Parser::Operator()): Check %C values are in range of year::min() to year::max(). * testsuite/std/time/parse.cc: Check out of range centuries. --

[committed] libstdc++: Simplify __format::_Sink::_M_reset

2023-09-01 Thread Jonathan Wakely via Gcc-patches
Tested x86_64-linux. Pushed to trunk. -- >8 -- Using an offset as the second argument instead of an iterator makes it easier for callers, as they don't need to create an lvalue span in order to get an iterator from it for the _M_reset call. libstdc++-v3/ChangeLog: * include/std/format (

[committed] libstdc++: Fix how chrono::parse handles errors for time-of-day values

2023-09-01 Thread Jonathan Wakely via Gcc-patches
Tested x86_64-linux. Pushed to trunk. -- >8 -- We fail to diagnose an error and extract an incorrect time for cases like "25:59" >> parse("%H:%M", mins). The bad "25" hour value gets ignored (on the basis that we might not care about it if trying to extract something like a weekday or a month nam

RE: [PATCH] RISC-V: Add dynamic LMUL compile option

2023-09-01 Thread Li, Pan2 via Gcc-patches
Committed, thanks Robin. Pan -Original Message- From: Gcc-patches On Behalf Of Robin Dapp via Gcc-patches Sent: Friday, September 1, 2023 5:58 PM To: Juzhe-Zhong ; gcc-patches@gcc.gnu.org Cc: kito.ch...@sifive.com; kito.ch...@gmail.com Subject: Re: [PATCH] RISC-V: Add dynamic LMUL compi

RE: [PATCH] RISC-V: Enable VECT_COMPARE_COSTS by default

2023-09-01 Thread Li, Pan2 via Gcc-patches
Committed, thank Robin. Pan -Original Message- From: Gcc-patches On Behalf Of Robin Dapp via Gcc-patches Sent: Friday, September 1, 2023 5:58 PM To: Juzhe-Zhong ; gcc-patches@gcc.gnu.org Cc: kito.ch...@sifive.com; kito.ch...@gmail.com Subject: Re: [PATCH] RISC-V: Enable VECT_COMPARE_COS

Re: [PATCH 06/13] [APX EGPR] Map reg/mem constraints in inline asm to non-EGPR constraint.

2023-09-01 Thread Richard Sandiford via Gcc-patches
Uros Bizjak via Gcc-patches writes: > On Thu, Aug 31, 2023 at 11:18 AM Jakub Jelinek via Gcc-patches > wrote: >> >> On Thu, Aug 31, 2023 at 04:20:17PM +0800, Hongyu Wang via Gcc-patches wrote: >> > From: Kong Lingling >> > >> > In inline asm, we do not know if the insn can use EGPR, so disable E

[committed] libstdc++: Avoid useless dependency on read_symlink from tzdb

2023-09-01 Thread Jonathan Wakely via Gcc-patches
Tested x86_64-linux. Pushed to trunk. -- >8 -- chrono::tzdb::current_zone uses filesystem::read_symlink, which creates a dependency on the fs_ops.o object in libstdc++.a, which then creates dependencies on several OS functions if --gc-sections isn't used. For more details see PR libstdc++/104167

[committed] libstdc++: Use dg-require-filesystem-ts in link test

2023-09-01 Thread Jonathan Wakely via Gcc-patches
Tested x86_64-linux. Pushed to trunk. -- >8 -- This test expects to be able to link, which fails if there are undefined references to chdir, mkdir etc. in fs_ops.o in the libstdc++.a archive. libstdc++-v3/ChangeLog: * testsuite/27_io/filesystem/path/108636.cc: Add dg-require for

Re: [RFC] libstdc++: Make --enable-libstdcxx-backtrace=auto default to yes

2023-09-01 Thread Jonathan Wakely via Gcc-patches
On Wed, 23 Aug 2023 at 17:03, Jonathan Wakely via Libstdc++ wrote: > > Any objections to this? It's a C++23 feture, so should be enabled by > default. I've pushed this to trunk, so let's see what breaks! > > -- >8 -- > > This causes libstdc++_libbacktrace.a to be built by default. This might >

Re: [PATCH] MATCH: `(nop_convert)-a` into -(nop_convert)a if the negate is single use and a is known not to be signed min value

2023-09-01 Thread Richard Biener via Gcc-patches
On Fri, Sep 1, 2023 at 4:27 AM Andrew Pinski via Gcc-patches wrote: > > This pushes the conversion further down the chain which allows to optimize > away more > conversions in many cases. But when building (T1)(T2)-x it will make simplifying (T1)(T2) more difficult as we'd need a (convert (nega

[PATCH v5 1/4] c++, libstdc++: Implement __is_arithmetic built-in trait

2023-09-01 Thread Ken Matsui via Gcc-patches
This patch implements built-in trait for std::is_arithmetic. gcc/cp/ChangeLog: * cp-trait.def: Define __is_arithmetic. * constraint.cc (diagnose_trait_expr): Handle CPTK_IS_ARITHMETIC. * semantics.cc (trait_expr_value): Likewise. (finish_trait_expr): Likewise. gcc

[PATCH v5 2/4] libstdc++: Optimize is_arithmetic trait performance

2023-09-01 Thread Ken Matsui via Gcc-patches
This patch optimizes the performance of the is_arithmetic trait by dispatching to the new __is_arithmetic built-in trait. libstdc++-v3/ChangeLog: * include/std/type_traits (is_arithmetic): Use __is_arithmetic built-in trait. (is_arithmetic_v): Likewise. Signed-off-by: Ken

[PATCH v5 3/4] libstdc++: Optimize is_fundamental trait performance

2023-09-01 Thread Ken Matsui via Gcc-patches
This patch optimizes the performance of the is_fundamental trait by dispatching to the new __is_arithmetic built-in trait. libstdc++-v3/ChangeLog: * include/std/type_traits (is_fundamental_v): Use __is_arithmetic built-in trait. (is_fundamental): Likewise. Optimize the ori

Re: [PATCH 06/13] [APX EGPR] Map reg/mem constraints in inline asm to non-EGPR constraint.

2023-09-01 Thread Uros Bizjak via Gcc-patches
On Fri, Sep 1, 2023 at 12:36 PM Hongtao Liu wrote: > > On Fri, Sep 1, 2023 at 5:38 PM Uros Bizjak via Gcc-patches > wrote: > > > > On Fri, Sep 1, 2023 at 11:10 AM Hongyu Wang wrote: > > > > > > Uros Bizjak via Gcc-patches 于2023年8月31日周四 > > > 18:01写道: > > > > > > > > On Thu, Aug 31, 2023 at 11:

[PATCH v5 4/4] libstdc++: Optimize is_compound trait performance

2023-09-01 Thread Ken Matsui via Gcc-patches
This patch optimizes the performance of the is_compound trait by dispatching to the new __is_arithmetic built-in trait. libstdc++-v3/ChangeLog: * include/std/type_traits (is_compound): Do not use __not_. (is_compound_v): Use is_fundamental_v instead. Signed-off-by: Ken Matsui --

Re: [PATCH 08/13] [APX EGPR] Handle GPR16 only vector move insns

2023-09-01 Thread Hongyu Wang via Gcc-patches
Jakub Jelinek 于2023年9月1日周五 17:20写道: > > On Fri, Sep 01, 2023 at 05:07:53PM +0800, Hongyu Wang wrote: > > Jakub Jelinek via Gcc-patches 于2023年8月31日周四 > > 17:44写道: > > > > > > On Thu, Aug 31, 2023 at 04:20:19PM +0800, Hongyu Wang via Gcc-patches > > > wrote: > > > > For vector move insns like vmo

Re: [PATCH 1/4] RISC-V: Adjust expand_cond_len_{unary,binop,op} api

2023-09-01 Thread Lehua Ding
On 2023/9/1 18:00, Robin Dapp via Gcc-patches wrote: Thanks, LGTM. Thanks, committed these patches. Btw. I haven't forgotten to respond to your last refactor but just didn't find the time yet. I figured I should have some proper draft before suggesting more things :) Well, let's talk about

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

2023-09-01 Thread Richard Biener via Gcc-patches
On Wed, Aug 9, 2023 at 6:53 PM Di Zhao OS wrote: > > Hi, > > The previous version of this patch tries to solve two problems > at the same time. For better clarity, I'll separate them and > only deal with the "nested" FMA in this version. I plan to > propose another patch in avoiding bad shaped FMA

Re: [PATCH 08/13] [APX EGPR] Handle GPR16 only vector move insns

2023-09-01 Thread Jakub Jelinek via Gcc-patches
On Fri, Sep 01, 2023 at 07:34:16PM +0800, Hongyu Wang wrote: > > On Fri, Sep 01, 2023 at 05:07:53PM +0800, Hongyu Wang wrote: > > > Jakub Jelinek via Gcc-patches 于2023年8月31日周四 > > > 17:44写道: > > > > > > > > On Thu, Aug 31, 2023 at 04:20:19PM +0800, Hongyu Wang via Gcc-patches > > > > wrote: > >

Re: [PING][PATCH 1/2] Ada: Synchronized private extensions are always limited

2023-09-01 Thread Arnaud Charlet via Gcc-patches
Richard, For some reason, your email is endeing up in a strange format, I almost missed the .patch file attached, making the review harder. There's a typo in the comment added: + -- explicit limitedness implied by a synchronized private extension + -- the does not derive from a synch

Re: [PING][PATCH 1/2] Ada: Synchronized private extensions are always limited

2023-09-01 Thread Arnaud Charlet via Gcc-patches
> For some reason, your email is endeing up in a strange format, I almost > missed the .patch file attached, making the review harder. Never mind, I was on vacation earlier this month and then busy with a seminar last week, so I started looking at your ping email before the original email which

[PATCH v2] c++: Catch indirect change of active union member in constexpr [PR101631]

2023-09-01 Thread Nathaniel Shead via Gcc-patches
On Wed, Aug 30, 2023 at 04:28:18PM -0400, Jason Merrill wrote: > On 8/29/23 09:35, Nathaniel Shead wrote: > > This is an attempt to improve the constexpr machinery's handling of > > union lifetime by catching more cases that cause UB. Is this approach > > OK? > > > > I'd also like some feedback on

[committed] testsuite: Fix up pr110915* tests on i686-linux [PR110915]

2023-09-01 Thread Jakub Jelinek via Gcc-patches
On Wed, Aug 30, 2023 at 03:25:11PM -0700, Andrew Pinski via Gcc-patches wrote: > This simple patch extends the min_value/max_value match to vector integer > types. > Using uniform_integer_cst_p makes this easy. These tests FAIL on i686-linux, with .../gcc/testsuite/gcc.dg/pr110915-1.c:8:1: warnin

[committed] testsuite: Fix vectcond-1.C FAIL on i686-linux [PR19832]

2023-09-01 Thread Jakub Jelinek via Gcc-patches
On Thu, Aug 31, 2023 at 10:24:10AM -0700, Andrew Pinski via Gcc-patches wrote: > This patch adds the following match patterns to optimize these: > /* (a != b) ? (a - b) : 0 -> (a - b) */ These tests FAIL on i686-linux, with .../gcc/testsuite/gcc.dg/pr110915-1.c:8:1: warning: MMX vector return wit

Re: [PATCH V6] Optimize '(X - N * M) / N' to 'X / N - M' if valid

2023-09-01 Thread Richard Biener via Gcc-patches
On Fri, 1 Sep 2023, Jiufu Guo wrote: > Hi, > > Integer expression "(X - N * M) / N" can be optimized to "X / N - M" with > the below conditions: > 1. There is no wrap/overflow/underflow. >wrap/overflow/underflow breaks the arithmetic operation. > 2. "X - N * M" and "X" are not of opposite sig

RE: [x86_64 PATCH] Improve __int128 argument passing (in ix86_expand_move).

2023-09-01 Thread Roger Sayle
Hi Manolis, Many thanks. If you haven't already, could you create/file a bug report at https://gcc.gnu.org/bugzilla/ which ensures this doesn't get lost/forgotten. It provides a PR number for tracking discussions, and patches/fixes with PR numbers are (often) prioritized during the review and a

[PATCH]AArch64 xorsign: Fix scalar xorsign lowering

2023-09-01 Thread Tamar Christina via Gcc-patches
Hi All, In GCC-9 our scalar xorsign pattern broke and we didn't notice it because the testcase was not strong enough. With this commit 8d2d39587d941a40f25ea0144cceb677df115040 is the first bad commit commit 8d2d39587d941a40f25ea0144cceb677df115040 Author: Segher Boessenkool Date: Mon Oct 22 2

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

2023-09-01 Thread Ken Matsui via Gcc-patches
Ping for the use of __is_volatile built-in. Sincerely, Ken Matsui On Fri, Jul 7, 2023 at 10:19 PM Ken Matsui wrote: > > This patch lets libstdc++ use new built-in trait __is_volatile. > > libstdc++-v3/ChangeLog: > > * include/std/type_traits (is_volatile): Use __is_volatile built-in >

[PING][PATCH v3 2/2] libstdc++: use new built-in trait __is_const

2023-09-01 Thread Ken Matsui via Gcc-patches
Ping for the use of __is_const built-in. Sincerely, Ken Matsui On Fri, Jul 7, 2023 at 10:27 PM Ken Matsui wrote: > > This patch lets libstdc++ use new built-in trait __is_const. > > libstdc++-v3/ChangeLog: > > * include/std/type_traits (is_const): Use __is_const built-in trait. >

[PING][PATCH v10 5/5] libstdc++: Make std::is_object dispatch to new built-in traits

2023-09-01 Thread Ken Matsui via Gcc-patches
Ping for std::is_object. Sincerely, Ken Matsui On Wed, Jul 12, 2023 at 7:42 PM Ken Matsui wrote: > > This patch gets std::is_object to dispatch to new built-in traits, > __is_function and __is_reference. > > libstdc++-v3/ChangeLog: > * include/std/type_traits (is_object): Use new built-i

[PING][PATCH v3 2/2] libstdc++: use new built-in trait __is_array

2023-09-01 Thread Ken Matsui via Gcc-patches
Ping for the use of __is_array built-in. Sincerely, Ken Matsui On Fri, Jul 7, 2023 at 10:24 PM Ken Matsui wrote: > > This patch lets libstdc++ use new built-in trait __is_array. > > libstdc++-v3/ChangeLog: > > * include/std/type_traits (is_array): Use __is_array built-in trait. >

[PING][PATCH v6 2/2] libstdc++: Use new built-in trait __is_pointer

2023-09-01 Thread Ken Matsui via Gcc-patches
Ping for the use of __is_pointer built-in. Sincerely, Ken Matsui On Thu, Jul 13, 2023 at 1:49 PM Ken Matsui wrote: > > This patch lets libstdc++ use new built-in trait __is_pointer. > > libstdc++-v3/ChangeLog: > > * include/bits/cpp_type_traits.h (__is_ptr): Use __is_pointer > bu

Re: [x86_64 PATCH] Improve __int128 argument passing (in ix86_expand_move).

2023-09-01 Thread Manolis Tsamis
On Fri, Sep 1, 2023 at 3:35 PM Roger Sayle wrote: > > > Hi Manolis, > Many thanks. If you haven't already, could you create/file a > bug report at https://gcc.gnu.org/bugzilla/ which ensures this > doesn't get lost/forgotten. It provides a PR number for tracking > discussions, and patches/fixes

[PING][PATCH v2 2/2] libstdc++: Use new built-in trait __is_signed

2023-09-01 Thread Ken Matsui via Gcc-patches
Ping for the use of __is_signed built-in. Sincerely, Ken Matsui On Wed, Jul 12, 2023 at 6:45 PM Ken Matsui wrote: > > This patch lets libstdc++ use new built-in trait __is_signed. > > libstdc++-v3/ChangeLog: > > * include/std/type_traits (is_signed): Use __is_signed built-in trait. >

[PATCH v8 1/4] spec: add a spec function to join arguments

2023-09-01 Thread Ben Boeckel via Gcc-patches
When passing `-o` flags to other options, the typical `-o foo` spelling leaves a leading whitespace when replacing elsewhere. This ends up creating flags spelled as `-some-option-with-arg= foo.ext` which doesn't parse properly. When attempting to make a spec function to just remove the leading whit

[PATCH v8 0/4] P1689R5 support

2023-09-01 Thread Ben Boeckel via Gcc-patches
Hi, This patch series adds initial support for ISO C++'s [P1689R5][], a format for describing C++ module requirements and provisions based on the source code. This is required because compiling C++ with modules is not embarrassingly parallel and need to be ordered to ensure that `import some_modul

[PATCH v8 2/4] p1689r5: initial support

2023-09-01 Thread Ben Boeckel via Gcc-patches
This patch implements support for [P1689R5][] to communicate to a build system the C++20 module dependencies to build systems so that they may build `.gcm` files in the proper order. Support is communicated through the following three new flags: - `-fdeps-format=` specifies the format for the out

[PATCH v8 3/4] c++modules: report imported CMI files as dependencies

2023-09-01 Thread Ben Boeckel via Gcc-patches
They affect the build, so report them via `-MF` mechanisms. gcc/cp/ * module.cc (do_import): Report imported CMI files as dependencies. gcc/testsuite/ * g++.dg/modules/depreport-1_a.C: New test. * g++.dg/modules/depreport-1_b.C: New test. * g++.dg/modules

[PATCH v8 4/4] c++modules: report module mapper files as a dependency

2023-09-01 Thread Ben Boeckel via Gcc-patches
It affects the build, and if used as a static file, can reliably be tracked using the `-MF` mechanism. gcc/cp/: * mapper-client.cc, mapper-client.h (open_module_client): Accept dependency tracking and track module mapper files as dependencies. * module.cc (make_map

Re: [PATCH] RISC-V: zicond: remove bogus opt2 pattern

2023-09-01 Thread Jeff Law via Gcc-patches
On 8/31/23 11:57, Vineet Gupta wrote: On 8/31/23 06:51, Jeff Law wrote: On 8/30/23 15:57, Vineet Gupta wrote: This was tripping up gcc.c-torture/execute/pr60003.c at -O1 since the pattern semantics can't be expressed by zicond instructions. This involves test code snippet:    if (a

Re: [PATCH] Add Types to Un-Typed Pic Instructions:

2023-09-01 Thread Jeff Law via Gcc-patches
On 8/31/23 17:01, Edwin Lu wrote: Related Discussion: https://inbox.sourceware.org/gcc-patches/12fb5088-3f28-0a69-de1e-f387371a5...@gmail.com/ This patch updates the pic instructions to ensure that no insn is left without a type attribute. Tested for regressions using rv32/64 multilib with n

[PATCH] c++, v2: Diagnose [basic.scope.block]/2 violations even in compound-stmt of function-try-block [PR52953]

2023-09-01 Thread Jakub Jelinek via Gcc-patches
On Thu, Aug 31, 2023 at 03:52:22PM -0400, Jason Merrill wrote: > On 8/31/23 03:20, Jakub Jelinek wrote: > > As the following testcase shows, while check_local_shadow diagnoses most of > > the [basic.scope.block]/2 violations, it doesn't diagnose when parameter's > > name is redeclared inside of the

Re: [PATCH] ipa-sra: Allow IPA-SRA in presence of returns which will be removed

2023-09-01 Thread Martin Jambor
Hello and ping. Thanks, Martin On Fri, Aug 18 2023, Martin Jambor wrote: > Hi, > > testing on 32bit arm revealed that even the simplest case of PR 110378 > was still not resolved there because destructors were returning this > pointer. Needless to say, the return value of those destructors of

Re: [PATCH] ipa: Self-DCE of uses of removed call LHSs (PR 108007)

2023-09-01 Thread Martin Jambor
Hello and ping. Thanks, Martin On Fri, May 12 2023, Martin Jambor wrote: > Hi, > > PR 108007 is another manifestation where we rely on DCE to clean-up > after IPA-SRA and if the user explicitely switches DCE off, IPA-SRA > can leave behind statements which are fed uninitialized values and > tr

[PATCH] c++, v2: Diagnose [basic.scope.block]/2 violations even for block externs [PR52953]

2023-09-01 Thread Jakub Jelinek via Gcc-patches
On Thu, Aug 31, 2023 at 05:46:28PM -0400, Jason Merrill wrote: > I've suggested this to Core. Thanks. > > So, I'm not really sure what to do. Intuitively the patch seems right > > because even block externs redeclare stuff and change meaning of the > > identifiers and void foo () { int i; extern

Re: [PATCH]AArch64 xorsign: Fix scalar xorsign lowering

2023-09-01 Thread Richard Sandiford via Gcc-patches
Tamar Christina writes: > Hi All, > > In GCC-9 our scalar xorsign pattern broke and we didn't notice it because the > testcase was not strong enough. With this commit > > 8d2d39587d941a40f25ea0144cceb677df115040 is the first bad commit > commit 8d2d39587d941a40f25ea0144cceb677df115040 > Author: S

Re: [PATCH][Ada] Fix syntax errors in expect.c

2023-09-01 Thread Arnaud Charlet via Gcc-patches
Change is OK, thanks! > Noticed trivial syntax errors in gcc/ada/expect.c when tried to compile gcc > 13.2 as cross-compiler for target i686-pc-msdosdjgpp. > > Errors were there since > > Tiedostossa, joka sisällytettiin kohdasta expect.c:54: > expect.c:Funktio ”__gnat_waitpid”: > expect.c:353:1

Re: [PING][PATCH] LoongArch: initial ada support on linux

2023-09-01 Thread Arnaud Charlet via Gcc-patches
> gcc/ChangeLog: > > * ada/Makefile.rtl: Add LoongArch support. > * ada/libgnarl/s-linux__loongarch.ads: New. > * ada/libgnat/system-linux-loongarch.ads: New. > * config/loongarch/loongarch.h: mark normalized options > passed from driver to gnat1 as explicit for multi

[PING][PATCH v2] Add clang's invalid-noreturn warning flag (gnu.org)

2023-09-01 Thread Julian Waters via Gcc-patches
Hi all, this is a gentle ping for the following patch: https://gcc.gnu.org/pipermail/gcc-patches/2023-August/627913.html

RE: [PATCH]AArch64 xorsign: Fix scalar xorsign lowering

2023-09-01 Thread Tamar Christina via Gcc-patches
> -Original Message- > From: Richard Sandiford > Sent: Friday, September 1, 2023 2:36 PM > To: Tamar Christina > Cc: gcc-patches@gcc.gnu.org; nd ; Richard Earnshaw > ; Marcus Shawcroft > ; Kyrylo Tkachov > Subject: Re: [PATCH]AArch64 xorsign: Fix scalar xorsign lowering > > Tamar Chr

[PATCH] c++, v3: Diagnose [basic.scope.block]/2 violations even in compound-stmt of function-try-block [PR52953]

2023-09-01 Thread Jakub Jelinek via Gcc-patches
On Fri, Sep 01, 2023 at 03:24:54PM +0200, Jakub Jelinek via Gcc-patches wrote: > So like this? > > It actually changes behaviour on the > void foo (int x) try {} catch (int x) {} case, where previously > this triggered the >|| (TREE_CODE (old) == PARM_DECL >&& (

Re: [PATCH] analyzer: Add support of placement new and improved operator new [PR105948,PR94355]

2023-09-01 Thread Benjamin Priour via Gcc-patches
Patch has been updated as per your suggestions and successfully regstrapped on x86_64-linux-gnu. call_details::maybe_get_arg_region is now /* If argument IDX's svalue at the callsite is of pointer type, return the region it points to. Otherwise return NULL. */ const region * call_detail

Re: [PATCH] analyzer: implement reference count checking for CPython plugin [PR107646]

2023-09-01 Thread David Malcolm via Gcc-patches
On Fri, 2023-09-01 at 04:49 +0200, Hans-Peter Nilsson wrote: > (Looks like this was committed as r14-3580-g597b9ec69bca8a) > > > Cc: g...@gcc.gnu.org, gcc-patches@gcc.gnu.org, Eric Feng > > > > From: Eric Feng via Gcc > > > gcc/testsuite/ChangeLog: > >   PR analyzer/107646 > > * gcc.dg/

[committed] libstdc++: Use a loop in atomic_ref::compare_exchange_strong [PR111077]

2023-09-01 Thread Jonathan Wakely via Gcc-patches
Tested x86_64-linux. Pushed to trunk. Backport to gcc-13 needed too. -- >8 -- We need to use a loop in std::atomic_ref::compare_exchange_strong in order to properly implement the C++20 requirement that padding bits do not participate when checking the value for equality. The variable being modifi

[committed] libstdc++: Use std::string::__resize_and_overwrite in std::filesystem

2023-09-01 Thread Jonathan Wakely via Gcc-patches
Tested x86_64-linux. Pushed to trunk. -- >8 -- There are a few places in the std::filesystem code that use a string as a buffer for OS APIs to write to. We can use the new extension __resize_and_overwrite to avoid redundant initialization of those buffers. libstdc++-v3/ChangeLog: * src/

Re: [PATCH] libstdc++: fix memory clobbering in std::vector [PR110879]

2023-09-01 Thread Jonathan Wakely via Gcc-patches
On Thu, 17 Aug 2023 at 08:43, Vladimir Palevich wrote: > > On Thu, 17 Aug 2023 at 01:51, Jonathan Wakely wrote: > > > > On 09/08/23 01:34 +0300, Vladimir Palevich wrote: > > >Because of the recent change in _M_realloc_insert and _M_default_append, > > >call > > >to deallocate was ordered after a

Re: [PATCH]AArch64 xorsign: Fix scalar xorsign lowering

2023-09-01 Thread Richard Sandiford via Gcc-patches
Tamar Christina writes: >> -Original Message- >> From: Richard Sandiford >> Sent: Friday, September 1, 2023 2:36 PM >> To: Tamar Christina >> Cc: gcc-patches@gcc.gnu.org; nd ; Richard Earnshaw >> ; Marcus Shawcroft >> ; Kyrylo Tkachov >> Subject: Re: [PATCH]AArch64 xorsign: Fix scalar x

Re: [committed] libstdc++: Fix compare_exchange_padding.cc test for std::atomic_ref

2023-09-01 Thread Jonathan Wakely via Gcc-patches
On Mon, 31 Oct 2022 at 15:34, Eric Botcazou wrote: > > > The test was only failing for me with -m32 (and not -m64), so I didn't > > notice until now. That probably means we should make the test fail more > > reliably if the padding isn't being cleared. > > The tests fail randomly for me on SPARC64/

Re: [PATCH] analyzer: Add support of placement new and improved operator new [PR105948,PR94355]

2023-09-01 Thread David Malcolm via Gcc-patches
On Fri, 2023-09-01 at 16:48 +0200, Benjamin Priour wrote: > Patch has been updated as per your suggestions and successfully > regstrapped > on x86_64-linux-gnu. > > call_details::maybe_get_arg_region is now > /* If argument IDX's svalue at the callsite is of pointer type, >     return the region i

Re: [RFC] libstdc++: Make --enable-libstdcxx-backtrace=auto default to yes

2023-09-01 Thread Jonathan Wakely via Gcc-patches
On Fri, 1 Sept 2023 at 12:16, Jonathan Wakely wrote: > > On Wed, 23 Aug 2023 at 17:03, Jonathan Wakely via Libstdc++ > wrote: > > > > Any objections to this? It's a C++23 feture, so should be enabled by > > default. > > I've pushed this to trunk, so let's see what breaks! This modules header bro

Re: [PATCH] libstdc++: fix memory clobbering in std::vector [PR110879]

2023-09-01 Thread Jonathan Wakely via Gcc-patches
At Marek and Jason's suggestion I've moved the new test to a subdir: c++: Move new test to 'opt' sub-directory gcc/testsuite/ChangeLog: * g++.dg/pr110879.C: Moved to... * g++.dg/opt/pr110879.C: ...here.

[committed] libstdc++: Add -Wno-self-move to two filesystem tests

2023-09-01 Thread Jonathan Wakely via Gcc-patches
Tested x86_64-linux. Pushed to trunk. -- >8 -- libstdc++-v3/ChangeLog: * testsuite/27_io/filesystem/iterators/91067.cc: Add -Wno-self-move to options. * testsuite/27_io/filesystem/path/assign/copy.cc: Likewise. --- libstdc++-v3/testsuite/27_io/filesystem/iterators/91067.

[committed] libstdc++: Fix debug-mode tests for constexpr algorithms

2023-09-01 Thread Jonathan Wakely via Gcc-patches
Tested x86_64-linux. Pushed to trunk. -- >8 -- These tests started failing at some point: FAIL: 25_algorithms/copy/debug/constexpr_neg.cc (test for errors, line 49) FAIL: 25_algorithms/copy/debug/constexpr_neg.cc (test for excess errors) FAIL: 25_algorithms/equal/debug/constexpr_neg.cc (test fo

[PATCH] c++: Move consteval folding to cp_fold_r

2023-09-01 Thread Marek Polacek via Gcc-patches
Bootstrapped/regtested on x86_64-pc-linux-gnu, ok for trunk? -- >8 -- In the review of P2564: it turned out that in order to correctly handle an example in the paper, we should stop doing immediate evaluation in build_over_call a

[PATCH 1/2] VR-VALUES: Rename op0/op1 to op1/op2 for test_for_singularity

2023-09-01 Thread Andrew Pinski via Gcc-patches
As requested and make easier to understand with the new ranger code, rename the arguments op0/op1 to op1/op2. OK? Bootstrapped and tested on x86_64-linux-gnu with no regressions gcc/ChangeLog: * vr-values.cc (test_for_singularity): Rename arguments op0/op1 to op1/op2. --- gcc/vr

[PATCH 2/2] VR-VALUES: Rewrite test_for_singularity using range_op_handler

2023-09-01 Thread Andrew Pinski via Gcc-patches
So it turns out there was a simplier way of starting to improve VRP to start to fix PR 110131, PR 108360, and PR 108397. That was rewrite test_for_singularity to use range_op_handler and Value_Range. This patch implements that and OK? Bootstrapped and tested on x86_64-linux-gnu with no regression

  1   2   >