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

[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",

[Bug tree-optimization/23970] loop-invariant-motion is not doing it's work

2023-09-01 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=23970 --- Comment #3 from Richard Biener --- Unswitching does this as a separate transform now, the "hoist guards" transform. It's even done completely separate now: unsigned int tree_ssa_unswitch_loops (function *fun) { bool changed_unswitch =

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

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

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 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

[Bug middle-end/111243] The -Og option inlines functions, making for a poor debugging experience.

2023-09-01 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111243 --- Comment #3 from Richard Biener --- The problem is that -Og aimed at solving two problems that are often in conflict with each other - improving the debugging experience _and_ runtime performance. For the second goal it started as -O1 and

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

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 > >

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 > >

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 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。

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

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: CLZ when CLZ_DEFINED_VALUE_AT_ZERO is false

2023-09-01 Thread Jakub Jelinek via Gcc
On Fri, Sep 01, 2023 at 10:13:40AM +0200, Richard Biener via Gcc wrote: > The value of .CLZ (0) is undefined then. I belive your analysis is correct in > that both 63 - _35 might overflow and that dom3 (thus ranger) mis-computes > the range for _35. I wonder why we don't elide _36 ? _31 : 1 with

[Bug c++/111261] No warning for out of order class initialisation when using class initialisers

2023-09-01 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111261 --- Comment #4 from Jonathan Wakely --- The FE already has to do lookup for s in that initializer, so it knows that another member was found.

[Bug c++/111261] No warning for out of order class initialisation when using class initialisers

2023-09-01 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111261 --- Comment #3 from Jonathan Wakely --- (In reply to Richard Biener from comment #2) > In fact with trunk we diagnose this properly with -std=c++17 but not > -std=c++20. So it's probably because c++17 uses extern template for std::string and

Re: CLZ when CLZ_DEFINED_VALUE_AT_ZERO is false

2023-09-01 Thread Richard Biener via Gcc
On Thu, Aug 31, 2023 at 3:58 PM Krister Walfridsson via Gcc wrote: > > My translation validation tool reports some miscompilations related to the > internal call CLZ(0) when CLZ_DEFINED_VALUE_AT_ZERO is false, but I am not > sure I use the correct semantics... > > I started by modeling CLZ(0) as

[Bug target/111260] arm: ice in maybe_legitimize_operand, at optabs.cc:8054

2023-09-01 Thread dcb314 at hotmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111260 David Binderman changed: What|Removed |Added Keywords||needs-bisection --- Comment #1 from

C++ undefined behaviour sanitiser bug when compiled with optimization

2023-09-01 Thread Hannes Mühleisen
Hello, we ran into an issue with the following (rather benign) C++ snippet: #include #include struct Foo { void Bar() ; std::mutex some_lock; std::atomic some_number; }; void Foo::Bar() { some_lock.lock(); some_number++; some_lock.unlock(); } When compiling

[Bug fortran/111265] New: Compiler segfault with character array in deferred type, when returned by a function

2023-09-01 Thread mailling-lists-bd at posteo dot de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111265 Bug ID: 111265 Summary: Compiler segfault with character array in deferred type, when returned by a function Product: gcc Version: 13.2.1 Status: UNCONFIRMED

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

[Bug c++/111261] No warning for out of order class initialisation when using class initialisers

2023-09-01 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111261 Richard Biener changed: What|Removed |Added CC||hubicka at gcc dot gnu.org ---

[Bug libstdc++/111258] std::string cannot to be moved in constant evaluated expression

2023-09-01 Thread de34 at live dot cn via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111258 Jiang An changed: What|Removed |Added CC||de34 at live dot cn --- Comment #2 from

[Bug analyzer/111264] [14 regression] gcc.dg/plugin/analyzer_cpython_plugin.c breaks after r14-3580-g597b9ec69bca8a

2023-09-01 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111264 Richard Biener changed: What|Removed |Added Keywords||testsuite-fail Target Milestone|---

[Bug c++/111261] No warning for out of order class initialisation when using class initialisers

2023-09-01 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111261 Richard Biener changed: What|Removed |Added Keywords||diagnostic Ever confirmed|0

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

Re: Confusing location of error in source code

2023-09-01 Thread Jonathan Wakely via Gcc
On Thu, 31 Aug 2023, 17:05 Alejandro Colomar via Gcc, wrote: > Hi! > > I've been confused for some time with a compilation error that > pointed to a slightly-off location. I wasn't seeing that I used > a temporary variable in a constant expression. The code could be > reduced to: > > $ cat

[Bug tree-optimization/19832] don't remove an if when we know the value is the same as with the if (subtraction)

2023-09-01 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=19832 Andrew Pinski changed: What|Removed |Added Resolution|--- |FIXED Status|ASSIGNED

[Bug tree-optimization/19832] don't remove an if when we know the value is the same as with the if (subtraction)

2023-09-01 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=19832 --- Comment #11 from CVS Commits --- The trunk branch has been updated by Andrew Pinski : https://gcc.gnu.org/g:3d86e7f4a8aef1b864a51660825597eafe9059b1 commit r14-3606-g3d86e7f4a8aef1b864a51660825597eafe9059b1 Author: Andrew Pinski Date:

Re: [PATCH] MATCH [PR19832]: Optimize some `(a != b) ? a OP b : c`

2023-09-01 Thread Richard Biener via Gcc-patches
On Thu, Aug 31, 2023 at 7:25 PM Andrew Pinski via Gcc-patches wrote: > > This patch adds the following match patterns to optimize these: > /* (a != b) ? (a - b) : 0 -> (a - b) */ > /* (a != b) ? (a ^ b) : 0 -> (a ^ b) */ > /* (a != b) ? (a & b) : a -> (a & b) */ > /* (a != b) ? (a | b) : a ->

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

2023-09-01 Thread Richard Biener via Gcc-patches
On Thu, 31 Aug 2023, Andrew Pinski wrote: > On Thu, Aug 31, 2023 at 5:15?AM Richard Biener via Gcc-patches > wrote: > > > > On Thu, 31 Aug 2023, Filip Kastl wrote: > > > > > > The most obvious places would be right after SSA construction and > > > > before RTL expansion. > > > > Can you provide

<    1   2   3