[PATCH v3] Introduce -finline-stringops

2023-09-22 Thread Alexandre Oliva
On Sep 21, 2023, Alexandre Oliva wrote: > On Sep 15, 2023, Alexandre Oliva wrote: >> On Jun 22, 2023, Alexandre Oliva wrote: >>> On Jun 2, 2023, Alexandre Oliva wrote: Introduce -finline-stringops >>> Ping? https://gcc.gnu.org/pipermail/gcc-patches/2023-June/620472.html >> Ping? >

Re: [PATCH] RISC-V/testsuite: Fix ILP32 RVV failures from missing

2023-09-22 Thread Jeff Law
On 9/22/23 17:18, Maciej W. Rozycki wrote: In non-multilib installations system headers may not be available for compilation options using a non-default model, causing build errors such as: In file included from .../include/features.h:527, from .../include/assert.h:35,

[Bug tree-optimization/111543] `(a & b) & ~a` could be optimized before reassociation

2023-09-22 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111543 --- Comment #2 from Andrew Pinski --- /* (X & ~Y) & Y -> 0 */ (simplify (bit_and:c (bit_and @0 @1) @2) (with { bool wascmp; } (if (bitwise_inverted_equal_p (@0, @2, wascmp) || bitwise_inverted_equal_p (@1, @2, wascmp)) { wascmp ?

Re: Re: [Committed] RISC-V: Support VLS INT <-> FP conversions

2023-09-22 Thread 钟居哲
Confirm it is a latent bug already existed long time ago but we were lucky that we didn't trigger this issue before. This patch didn't involve a new bug. Li pan from intel will send a patch fix it soon. Thanks for report. juzhe.zh...@rivai.ai From: Edwin Lu Date: 2023-09-23 06:38 To:

[Committed] RISC-V: Add VLS unary combine patterns

2023-09-22 Thread Juzhe-Zhong
gcc/ChangeLog: * config/riscv/autovec-opt.md: Add VLS modes for conditional ABS/SQRT. gcc/testsuite/ChangeLog: * gcc.target/riscv/rvv/autovec/vls/cond_abs-1.c: New test. * gcc.target/riscv/rvv/autovec/vls/cond_sqrt-1.c: New test. --- gcc/config/riscv/autovec-opt.md

Re: [PATCH v3] RISC-V: Suport FP floor auto-vectorization

2023-09-22 Thread 钟居哲
LGTM. juzhe.zh...@rivai.ai From: pan2.li Date: 2023-09-23 09:19 To: gcc-patches CC: juzhe.zhong; pan2.li; yanzhang.wang; kito.cheng Subject: [PATCH v3] RISC-V: Suport FP floor auto-vectorization From: Pan Li This patch would like to support auto-vectorization for the floor API in math.h.

[PATCH v3] RISC-V: Suport FP floor auto-vectorization

2023-09-22 Thread pan2 . li
From: Pan Li This patch would like to support auto-vectorization for the floor API in math.h. It depends on the -ffast-math option. When we would like to call floor/floorf like v2 = floor (v1), we will convert it into below insns (reference the implementation of llvm). * vfcvt.x.f v3, v1, RDN

RE: [PATCH v1] RISC-V: Remove FP run test for ceil.

2023-09-22 Thread Li, Pan2
Committed, thanks Juzhe. Pan From: 钟居哲 Sent: Saturday, September 23, 2023 9:07 AM To: Li, Pan2 ; gcc-patches Cc: Li, Pan2 ; Wang, Yanzhang ; kito.cheng Subject: Re: [PATCH v1] RISC-V: Remove FP run test for ceil. Ok

Re: [PATCH v1] RISC-V: Remove FP run test for ceil.

2023-09-22 Thread 钟居哲
Ok juzhe.zh...@rivai.ai From: pan2.li Date: 2023-09-23 09:06 To: gcc-patches CC: juzhe.zhong; pan2.li; yanzhang.wang; kito.cheng Subject: [PATCH v1] RISC-V: Remove FP run test for ceil. From: Pan Li FP16 is not well reconciled when linking. gcc/testsuite/ChangeLog: *

[PATCH v1] RISC-V: Remove FP run test for ceil.

2023-09-22 Thread pan2 . li
From: Pan Li FP16 is not well reconciled when linking. gcc/testsuite/ChangeLog: * gcc.target/riscv/rvv/autovec/unop/math-ceil-run-0.c: Remove. Signed-off-by: Pan Li --- .../riscv/rvv/autovec/unop/math-ceil-run-0.c | 39 --- 1 file changed, 39 deletions(-) delete

[PATCH] PHIOPT: Fix minmax_replacement for three way

2023-09-22 Thread Andrew Pinski
So when diamond bb support was added to minmax_replacement in r13-1950-g9bb19e143cfe, the code was not expecting the alt_middle_bb not to exist if it was empty (for threeway_p). So when factor_out_conditional_conversion was used to factor out conversions, it turns out the assumption for

Re: [PATCH v2] RISC-V: Suport FP floor auto-vectorization

2023-09-22 Thread 钟居哲
LGTM. But I think you should remove FP16 run tests. So plz send a patch first remove FP16 run test of CEIL first. juzhe.zh...@rivai.ai From: pan2.li Date: 2023-09-23 08:40 To: gcc-patches CC: juzhe.zhong; pan2.li; yanzhang.wang; kito.cheng Subject: [PATCH v2] RISC-V: Suport FP floor

[PATCH v2] RISC-V: Suport FP floor auto-vectorization

2023-09-22 Thread pan2 . li
From: Pan Li This patch would like to support auto-vectorization for the floor API in math.h. It depends on the -ffast-math option. When we would like to call floor/floorf like v2 = floor (v1), we will convert it into below insns (reference the implementation of llvm). * vfcvt.x.f v3, v1, RDN

[PATCH v4] c++: Check for indirect change of active union member in constexpr [PR101631,PR102286]

2023-09-22 Thread Nathaniel Shead
Now that bootstrap has finished, I have gotten regressions in the following libstdc++ tests: Running libstdc++:libstdc++-dg/conformance.exp ... FAIL: 20_util/bitset/access/constexpr.cc -std=gnu++23 (test for excess errors) FAIL: 20_util/bitset/access/constexpr.cc -std=gnu++26 (test for excess

Re: [Committed] RISC-V: Extend VLS modes in 'VWEXTI' iterator

2023-09-22 Thread Patrick O'Neill
Hi Juzhe, I'm seeing a few new regressions from this patch on glibc rv32gcv. I filed a bugzilla for the ICE: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111546 Patrick On 9/19/23 19:24, Juzhe-Zhong wrote: This patch extends 'VWEXT' iterator so that we will support integer extension/integer

[Bug target/111545] [14 Regression] RISC-V gfortran.dg/host_assoc_function_7.f09 Illegal instruction error

2023-09-22 Thread ewlu at rivosinc dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111545 --- Comment #3 from Edwin Lu --- (In reply to JuzheZhong from comment #2) > Could you give me the code to reproduce this issue? Testcase file:

[Bug target/111546] [14 Regression] ICE: gfortran.dg/overload_5.f90:53:2: internal compiler error: in emit_move_insn, at expr.cc:4219 since r14-4163-gbea89f78f2f

2023-09-22 Thread patrick at rivosinc dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111546 --- Comment #1 from Patrick O'Neill --- Also checked to still be present on trunk at hash r14-4231-gfd35d72a3dc

[Bug target/111546] New: [14 Regression] ICE: gfortran.dg/overload_5.f90:53:2: internal compiler error: in emit_move_insn, at expr.cc:4219 since r14-4163-gbea89f78f2f

2023-09-22 Thread patrick at rivosinc dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111546 Bug ID: 111546 Summary: [14 Regression] ICE: gfortran.dg/overload_5.f90:53:2: internal compiler error: in emit_move_insn, at expr.cc:4219 since r14-4163-gbea89f78f2f

[PATCH] RISC-V/testsuite: Fix ILP32 RVV failures from missing

2023-09-22 Thread Maciej W. Rozycki
In non-multilib installations system headers may not be available for compilation options using a non-default model, causing build errors such as: In file included from .../include/features.h:527, from .../include/assert.h:35, from

[Bug target/111545] [14 Regression] RISC-V gfortran.dg/host_assoc_function_7.f09 Illegal instruction error

2023-09-22 Thread juzhe.zhong at rivai dot ai via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111545 JuzheZhong changed: What|Removed |Added CC||juzhe.zhong at rivai dot ai --- Comment

Re: [Committed] RISC-V: Support VLS INT <-> FP conversions

2023-09-22 Thread Edwin Lu
Hi Juzhe, I was testing this patch and found it introduced a gfortran regression in gfortran.dg/host_assoc_function_7.f90. More info here: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111545 Edwin On 9/20/2023 7:17 PM, Juzhe-Zhong wrote: Support INT <-> FP VLS auto-vectorization patterns.

gcc-12-20230922 is now available

2023-09-22 Thread GCC Administrator via Gcc
Snapshot gcc-12-20230922 is now available on https://gcc.gnu.org/pub/gcc/snapshots/12-20230922/ and on various mirrors, see http://gcc.gnu.org/mirrors.html for details. This snapshot has been generated from the GCC 12 git branch with the following options: git://gcc.gnu.org/git/gcc.git branch

[Bug target/111545] [14 Regression] RISC-V gfortran.dg/host_assoc_function_7.f09 Illegal instruction error

2023-09-22 Thread ewlu at rivosinc dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111545 --- Comment #1 from Edwin Lu --- Created attachment 55971 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=55971=edit objdump of executable on good hash Here is the objdump of the executable created using the good hash

[Bug target/111545] New: [14 Regression] RISC-V gfortran.dg/host_assoc_function_7.f09 Illegal instruction error

2023-09-22 Thread ewlu at rivosinc dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111545 Bug ID: 111545 Summary: [14 Regression] RISC-V gfortran.dg/host_assoc_function_7.f09 Illegal instruction error Product: gcc Version: 14.0 Status:

[Bug c++/111544] [14 regression] assignment of read-only location after r14-4111-g6e92a6a2a72d3b

2023-09-22 Thread seurer at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111544 --- Comment #11 from seurer at gcc dot gnu.org --- From, the original I cut it down to this. Compiles OK with r14-4110, error with r14-4111. bad3.c: In member function 'NameIdPoolEnumerator& NameIdPoolEnumerator::operator=(const

[Bug c++/111544] [14 regression] assignment of read-only location after r14-4111-g6e92a6a2a72d3b

2023-09-22 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111544 --- Comment #10 from Andrew Pinski --- (In reply to Andrew Pinski from comment #7) > Actually this is the reduced testcase: > ``` > struct bs > { > int * const t; > }; > template > struct a > { > int * const t; > a

[Bug c++/111544] [14 regression] assignment of read-only location after r14-4111-g6e92a6a2a72d3b

2023-09-22 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111544 --- Comment #9 from Sam James --- (In reply to Sam James from comment #8) > https://github.com/apache/xerces-c/commit/ > bc3189892c2e700bd3298b77cd8a523080fa74bb https://issues.apache.org/jira/projects/XERCESC/issues/XERCESC-1259

[Bug c++/111544] [14 regression] assignment of read-only location after r14-4111-g6e92a6a2a72d3b

2023-09-22 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111544 --- Comment #8 from Sam James --- https://github.com/apache/xerces-c/commit/bc3189892c2e700bd3298b77cd8a523080fa74bb

[Bug c++/111544] [14 regression] assignment of read-only location after r14-4111-g6e92a6a2a72d3b

2023-09-22 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111544 --- Comment #7 from Andrew Pinski --- Actually this is the reduced testcase: ``` struct bs { int * const t; }; template struct a { int * const t; a (const a&, int *const tt, const a *c, const bs&); }; template a &

[Bug c++/111544] [14 regression] assignment of read-only location after r14-4111-g6e92a6a2a72d3b

2023-09-22 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111544 --- Comment #6 from Andrew Pinski --- MemoryManager* const fMemoryManager; So reduced: ``` template struct a { int * const t; void f(); }; template void a::f() { t = 0; } ``` Yes this is invalid code that GCC

[Bug c++/111544] [14 regression] assignment of read-only location after r14-4111-g6e92a6a2a72d3b

2023-09-22 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111544 --- Comment #5 from Sam James --- Created attachment 55969 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=55969=edit DGXMLScanner.ii Reproduced w/ DGXMLScanner.ii 1. wget

[Bug c++/111544] [14 regression] assignment of read-only location after r14-4111-g6e92a6a2a72d3b

2023-09-22 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111544 --- Comment #4 from Sam James --- Am trying to build xerces-c-2.5.0 but am struggling for other reasons due to its age...

[Bug c++/111544] [14 regression] assignment of read-only location after r14-4111-g6e92a6a2a72d3b

2023-09-22 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111544 Andrew Pinski changed: What|Removed |Added Component|other |c++ Keywords|rejects-valid

[Bug other/111544] [14 regression] assignment of read-only location after r14-4111-g6e92a6a2a72d3b

2023-09-22 Thread seurer at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111544 --- Comment #2 from seurer at gcc dot gnu.org --- I can't attach the whole thing but I am working on cutting it down.

[Bug middle-end/111497] [11/12/13/14 Regression] ICE building mariadb on i686 since r8-470

2023-09-22 Thread vmakarov at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111497 --- Comment #4 from Vladimir Makarov --- I've reproduced the bug. The problem is in combination of splitting pseudo live range and sharing rtl. I hope to fix this on the next Monday or Tuesday.

[Bug fortran/95710] ICE in gfc_type_is_extensible, at fortran/resolve.c:8848

2023-09-22 Thread anlauf at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95710 anlauf at gcc dot gnu.org changed: What|Removed |Added Status|NEW |ASSIGNED CC|

[PATCH] fortran: error recovery on duplicate declaration of class variable [PR95710]

2023-09-22 Thread Harald Anlauf
Dear all, the attached simple and obvious patch fixes several NULL pointer dereferences that are encountered for a duplicate declaration of a class variable. Another one from Gerhard's torture tests... Regtested on x86_64-pc-linux-gnu. I intend to commit within 24h unless there are comments.

[Bug middle-end/111427] [14 regression] gfortran.dg/vect/pr60510.f fails after r14-3999-g3c834d85f2ec42

2023-09-22 Thread vmakarov at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111427 --- Comment #1 from Vladimir Makarov --- Unfortunately, I did not manage to reproduce the bug.

[Bug other/111544] [14 regression] assignment of read-only location after r14-4111-g6e92a6a2a72d3b

2023-09-22 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111544 --- Comment #1 from Sam James --- Maybe attach a preprocessed version for completeness?

[Bug other/111544] New: [14 regression] assignment of read-only location after r14-4111-g6e92a6a2a72d3b

2023-09-22 Thread seurer at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111544 Bug ID: 111544 Summary: [14 regression] assignment of read-only location after r14-4111-g6e92a6a2a72d3b Product: gcc Version: 14.0 Status: UNCONFIRMED

[Bug tree-optimization/111543] `(a & b) & ~a` could be optimized before reassociation

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

[Bug tree-optimization/111543] `(a & b) & ~a` could be optimized before reassociation

2023-09-22 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111543 Andrew Pinski changed: What|Removed |Added Assignee|unassigned at gcc dot gnu.org |pinskia at gcc dot gnu.org

[Bug tree-optimization/111542] [11/12/13/14 Regression] (a==0)&(b==0) into `(a|b) == 0` optimization sometimes gets in the way of other optimizations

2023-09-22 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111542 Andrew Pinski changed: What|Removed |Added Target Milestone|--- |14.0 Summary|[11/12/13/14

[Bug tree-optimization/111542] [11/12/13/14 Regression]

2023-09-22 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111542 Andrew Pinski changed: What|Removed |Added Assignee|unassigned at gcc dot gnu.org |pinskia at gcc dot gnu.org

[Bug tree-optimization/111543] New: `(a & b) & ~a` could be optimized before reassociation

2023-09-22 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111543 Bug ID: 111543 Summary: `(a & b) & ~a` could be optimized before reassociation Product: gcc Version: 14.0 Status: UNCONFIRMED Keywords: missed-optimization Severity:

[Bug tree-optimization/111542] New: [11/12/13/14 Regression]

2023-09-22 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111542 Bug ID: 111542 Summary: [11/12/13/14 Regression] Product: gcc Version: 14.0 Status: UNCONFIRMED Keywords: missed-optimization Severity: normal Priority: P3

[Bug middle-end/111541] missing optimization x & ~c | (y | c) -> x | (y | c)

2023-09-22 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111541 Andrew Pinski changed: What|Removed |Added Status|UNCONFIRMED |NEW Last reconfirmed|

[Bug middle-end/111541] missing optimization x & ~c | (y | c) -> x | (y | c)

2023-09-22 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111541 Andrew Pinski changed: What|Removed |Added Severity|normal |enhancement --- Comment #1 from Andrew

[Bug c++/111538] Unhelpful message when returning initializer list when deducing the return type

2023-09-22 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111538 Andrew Pinski changed: What|Removed |Added Status|UNCONFIRMED |NEW Last reconfirmed|

[Bug ipa/108007] [11/12/13/14 Regression] wrong code at -Os and above with "-fno-dce -fno-tree-dce" on x86_64-linux-gnu

2023-09-22 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108007 --- Comment #15 from Andrew Pinski --- *** Bug 111540 has been marked as a duplicate of this bug. ***

[Bug c/111540] Segmentation fault with '-O3 -fno-dce -fno-tree-dce -fno-tree-sra'

2023-09-22 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111540 Andrew Pinski changed: What|Removed |Added Resolution|--- |DUPLICATE

[Bug target/109166] Built-in __atomic_test_and_set does not seem to be atomic on ARMv4T

2023-09-22 Thread hp at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109166 --- Comment #7 from Hans-Peter Nilsson --- (In reply to Hans-Peter Nilsson from comment #6) > The cause I guess, is just a bad fall-through in the arm/sync.md. Or rather, optabs.cc:expand_atomic_test_and_set, which makes this issue somewhat

Re: [pushed] c++: unroll pragma in templates [PR111529]

2023-09-22 Thread Andrew Pinski
On Fri, Sep 22, 2023 at 6:01 AM Jason Merrill wrote: > > Tested x86_64-pc-linux-gnu, applying to trunk. > > -- 8< -- > > We were failing to handle ANNOTATE_EXPR in tsubst_copy_and_build, leading to > problems with substitution of any wrapped expressions. > > Let's also not tell users that lambda

[Bug c++/108026] Confusing pedwarn with template lambda with -std=c++11

2023-09-22 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108026 Andrew Pinski changed: What|Removed |Added See Also||https://gcc.gnu.org/bugzill

[Bug target/109166] Built-in __atomic_test_and_set does not seem to be atomic on ARMv4T

2023-09-22 Thread hp at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109166 Hans-Peter Nilsson changed: What|Removed |Added Status|UNCONFIRMED |NEW Ever confirmed|0

[Bug middle-end/111541] New: missing optimization x & ~c | (y | c) -> x | (y | c)

2023-09-22 Thread vanyacpp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111541 Bug ID: 111541 Summary: missing optimization x & ~c | (y | c) -> x | (y | c) Product: gcc Version: 14.0 Status: UNCONFIRMED Severity: normal Priority: P3

[Bug c/111540] Segmentation fault with '-O3 -fno-dce -fno-tree-dce -fno-tree-sra'

2023-09-22 Thread 19373742 at buaa dot edu.cn via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111540 --- Comment #1 from CTC <19373742 at buaa dot edu.cn> --- Created attachment 55968 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=55968=edit The compiler output

[Bug c/111540] New: Segmentation fault with '-O3 -fno-dce -fno-tree-dce -fno-tree-sra'

2023-09-22 Thread 19373742 at buaa dot edu.cn via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111540 Bug ID: 111540 Summary: Segmentation fault with '-O3 -fno-dce -fno-tree-dce -fno-tree-sra' Product: gcc Version: 11.4.1 Status: UNCONFIRMED Severity: normal

Re: [PATCH 02/13] [APX EGPR] middle-end: Add index_reg_class with insn argument.

2023-09-22 Thread Vladimir Makarov
On 9/22/23 06:56, Hongyu Wang wrote: Like base_reg_class, INDEX_REG_CLASS also does not support backend insn. Add index_reg_class with insn argument for lra/reload usage. gcc/ChangeLog: * addresses.h (index_reg_class): New wrapper function like base_reg_class. *

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

2023-09-22 Thread Vladimir Makarov
On 9/22/23 06:56, Hongyu Wang wrote: From: Kong Lingling Current reload infrastructure does not support selective base_reg_class for backend insn. Add new macros with insn parameters to base_reg_class for lra/reload usage. gcc/ChangeLog: * addresses.h (base_reg_class): Add insn

[Bug c++/111504] compare operator not defined for recursive data types on C++20

2023-09-22 Thread xgao at nvidia dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111504 --- Comment #3 from Xiang Gao --- Cross posted at: https://github.com/llvm/llvm-project/issues/67056

[Bug c++/111531] Bound member function with multiple inheritance documentation should be clearer

2023-09-22 Thread paulhaile3 at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111531 --- Comment #4 from Paul Haile --- The only time I could imagine allowing type mismatch would be in allowing the function pointer to allow void * in type erased contexts. e.g. typedef void (*b_fptr)(void *);

[PATCH v4] c++: Check for indirect change of active union member in constexpr [PR101631,PR102286]

2023-09-22 Thread Nathaniel Shead
On Fri, Sep 22, 2023 at 02:21:15PM +0100, Jason Merrill wrote: > On 9/21/23 09:41, Nathaniel Shead wrote: > > I've updated the error messages, and also fixed another bug I found > > while retesting (value-initialised unions weren't considered to have any > > active member yet). > > > >

[Bug tree-optimization/110311] [14 Regression] regression in tree-optimizer

2023-09-22 Thread juergen.reuter at desy dot de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110311 --- Comment #56 from Jürgen Reuter --- What do we do now? We know the offending commit, and the commit that fixed (or "fixed") it. Closing? Do we understand what happened here, so why it went wrong and why it got fixed?

[Bug c++/111539] New: __is_range_adaptor_closure_fn is too loosely defined

2023-09-22 Thread hewillk at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111539 Bug ID: 111539 Summary: __is_range_adaptor_closure_fn is too loosely defined Product: gcc Version: 14.0 Status: UNCONFIRMED Severity: normal Priority: P3

[Bug c++/111357] [11/12/13/14 Regression] __integer_pack fails to work with values of dependent type convertible to integers in noexcept context

2023-09-22 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111357 --- Comment #11 from CVS Commits --- The trunk branch has been updated by Jason Merrill : https://gcc.gnu.org/g:fd35d72a3dcd5ba14d81a1890236acd0145497e1 commit r14-4231-gfd35d72a3dcd5ba14d81a1890236acd0145497e1 Author: Jason Merrill Date:

[pushed] c++ __integer_pack conversion again [PR111357]

2023-09-22 Thread Jason Merrill
Tested x86_64-pc-linux-gnu, applying to trunk. -- 8< -- As Jakub pointed out, the real problem here is that in a partial substitution we're forgetting the conversion to the type of the non-type template argument, because maybe_convert_nontype_argument doesn't do anything with value-dependent

[Bug c++/111538] New: Unhelpful message when returning initializer list when deducing the return type

2023-09-22 Thread barry.revzin at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111538 Bug ID: 111538 Summary: Unhelpful message when returning initializer list when deducing the return type Product: gcc Version: 13.1.0 Status: UNCONFIRMED

[pushed] c++: constexpr and designated initializer

2023-09-22 Thread Jason Merrill
Tested x86_64-pc-linux-gnu, applying to trunk. -- 8< -- The change of active member being non-constant (before C++20) results in a CONSTRUCTOR with a null value for the first field, don't crash. gcc/cp/ChangeLog: * constexpr.cc (free_constructor): Handle null ce->value.

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

2023-09-22 Thread Jason Merrill
On 9/21/23 09:41, Nathaniel Shead wrote: I've updated the error messages, and also fixed another bug I found while retesting (value-initialised unions weren't considered to have any active member yet). Bootstrapped and regtested on x86_64-pc-linux-gnu. -- >8 -- This patch adds checks for

[Bug c++/111529] [11/12/13/14 Regression] ICE on bool conversion in an unrolled loop condition inside template lambda nested in another template scope

2023-09-22 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111529 --- Comment #5 from CVS Commits --- The trunk branch has been updated by Jason Merrill : https://gcc.gnu.org/g:9c62af101e11e1cce573c2b3d2e18b403412dbc8 commit r14-4229-g9c62af101e11e1cce573c2b3d2e18b403412dbc8 Author: Jason Merrill Date:

[pushed] c++: unroll pragma in templates [PR111529]

2023-09-22 Thread Jason Merrill
Tested x86_64-pc-linux-gnu, applying to trunk. -- 8< -- We were failing to handle ANNOTATE_EXPR in tsubst_copy_and_build, leading to problems with substitution of any wrapped expressions. Let's also not tell users that lambda templates are available in C++14. PR c++/111529

License of libgcc/config/sparc/lb1spc.S?

2023-09-22 Thread Sebastian Huber
Hello, under which license is libgcc/config/sparc/lb1spc.S? The header says: /* This is an assembly language implementation of mulsi3, divsi3, and modsi3 for the sparc processor. These routines are derived from the SPARC Architecture Manual, version 8, slightly edited to match the

RE: [PATCH v2] RISC-V: Refine the code gen for ceil auto vectorization.

2023-09-22 Thread Li, Pan2
Committed, thanks Juzhe. Pan From: juzhe.zh...@rivai.ai Sent: Friday, September 22, 2023 8:19 PM To: Li, Pan2 ; gcc-patches Cc: Li, Pan2 ; Wang, Yanzhang ; kito.cheng Subject: Re: [PATCH v2] RISC-V: Refine the code gen for ceil auto vectorization. LGTM.

Re: [PATCH v2] RISC-V: Refine the code gen for ceil auto vectorization.

2023-09-22 Thread juzhe.zh...@rivai.ai
LGTM. juzhe.zh...@rivai.ai From: pan2.li Date: 2023-09-22 20:16 To: gcc-patches CC: juzhe.zhong; pan2.li; yanzhang.wang; kito.cheng Subject: [PATCH v2] RISC-V: Refine the code gen for ceil auto vectorization. From: Pan Li We vectorized below ceil code already. void test_ceil (float *out,

[PATCH v2] RISC-V: Refine the code gen for ceil auto vectorization.

2023-09-22 Thread pan2 . li
From: Pan Li We vectorized below ceil code already. void test_ceil (float *out, float *in, int count) { for (unsigned i = 0; i < count; i++) out[i] = __builtin_ceilf (in[i]); } Before this patch: vfmv.v.xv4,fa0 // can be removed vfabs.v v0,v1 vmv1r.v v2,v1 // can be

[Bug c++/111531] Bound member function with multiple inheritance documentation should be clearer

2023-09-22 Thread paulhaile3 at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111531 --- Comment #3 from Paul Haile --- Fair enough definitely could be intentional. However, In this example renaming typedef void (*b_fptr)(B *); to typedef void (*b_fptr)(A *); gets rid of the error. It seems restricting the binding such

RE: [PATCH v1] RISC-V: Refine the code gen for ceil auto vectorization.

2023-09-22 Thread Li, Pan2
Sure thing, will send V2 for this. Pan From: juzhe.zh...@rivai.ai Sent: Friday, September 22, 2023 7:26 PM To: Li, Pan2 ; gcc-patches Cc: Li, Pan2 ; Wang, Yanzhang ; kito.cheng Subject: Re: [PATCH v1] RISC-V: Refine the code gen for ceil auto vectorization. I prefer change

[Bug middle-end/98710] missing optimization (x | c) & ~(y | c) -> x & ~(y | c)

2023-09-22 Thread vanyacpp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98710 --- Comment #8 from Ivan Sorokin --- > How often these show up, I have no idea. Perhaps I should have written this in the original message. The original expression "(x | c) & ~(y | c)" is obviously a reduced version of what happens in real

Re: [PATCH v2 1/2] c++: Initial support for P0847R7 (Deducing This) [PR102609]

2023-09-22 Thread Jason Merrill
On 9/21/23 07:28, waffl3x wrote: This seems like a reasonable place for it since 'this' is supposed to precede the decl-specifiers, and since we are parsing initial attributes here rather than in the caller. You will want to give an error if found_decl_spec is set. And elsewhere complain about

Re: [PATCH v1] RISC-V: Refine the code gen for ceil auto vectorization.

2023-09-22 Thread juzhe.zh...@rivai.ai
I prefer change expand_vec_copysign into emit_vec_copysign。 Likewise, emit_fabs. ...etc. juzhe.zh...@rivai.ai From: pan2.li Date: 2023-09-22 19:19 To: gcc-patches CC: juzhe.zhong; pan2.li; yanzhang.wang; kito.cheng Subject: [PATCH v1] RISC-V: Refine the code gen for ceil auto vectorization.

[PATCH v1] RISC-V: Refine the code gen for ceil auto vectorization.

2023-09-22 Thread pan2 . li
From: Pan Li We vectorized below ceil code already. void test_ceil (float *out, float *in, int count) { for (unsigned i = 0; i < count; i++) out[i] = __builtin_ceilf (in[i]); } Before this patch: vfmv.v.xv4,fa0 // can be removed vfabs.v v0,v1 vmv1r.v v2,v1 // can be

[Bug middle-end/98710] missing optimization (x | c) & ~(y | c) -> x & ~(y | c)

2023-09-22 Thread vanyacpp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98710 --- Comment #7 from Ivan Sorokin --- (In reply to Andrew Pinski from comment #6) > Fixed. Thank you!

[PATCH 09/13] [APX EGPR] Handle legacy insn that only support GPR16 (1/5)

2023-09-22 Thread Hongyu Wang
From: Kong Lingling These legacy insn in opcode map0/1 only support GPR16, and do not have vex/evex counterpart, directly adjust constraints and add gpr32 attr to patterns. insn list: 1. xsave/xsave64, xrstor/xrstor64 2. xsaves/xsaves64, xrstors/xrstors64 3. xsavec/xsavec64 4.

[PATCH 13/13] [APX EGPR] Handle vex insns that only support GPR16 (5/5)

2023-09-22 Thread Hongyu Wang
From: Kong Lingling These vex insn may have legacy counterpart that could support EGPR, but they do not have evex counterpart. Split out its vex part from patterns and set the vex part to non-EGPR supported by adjusting constraints and attr_gpr32. insn list: 1. vmovmskpd/vmovmskps 2. vpmovmskb

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

2023-09-22 Thread Hongyu Wang
For vector move insns like vmovdqa/vmovdqu, their evex counterparts requrire explicit suffix 64/32/16/8. The usage of these instruction are prohibited under AVX10_1 or AVX512F, so for we select vmovaps/vmovups for vector load/store insns that contains EGPR if ther is no AVX512VL, and keep the

[PATCH 10/13] [APX EGPR] Handle legacy insns that only support GPR16 (2/5)

2023-09-22 Thread Hongyu Wang
From: Kong Lingling These legacy insns in opcode map2/3 have vex but no evex counterpart, disable EGPR for them by adjusting alternatives and attr_gpr32. insn list: 1. phaddw/vphaddw, phaddd/vphaddd, phaddsw/vphaddsw 2. phsubw/vphsubw, phsubd/vphsubd, phsubsw/vphsubsw 3. psignb/vpsginb,

[PATCH 06/13] [APX EGPR] Add backend hook for base_reg_class/index_reg_class.

2023-09-22 Thread Hongyu Wang
From: Kong Lingling Add backend helper functions to verify if a rtx_insn can adopt EGPR to its base/index reg of memory operand. The verification rule goes like 1. For asm insn, enable/disable EGPR by ix86_apx_inline_asm_use_gpr32. 2. Disable EGPR for unrecognized insn. 3. If

[PATCH 12/13] [APX_EGPR] Handle legacy insns that only support GPR16 (4/5)

2023-09-22 Thread Hongyu Wang
From: Kong Lingling The APX enabled hardware should also be AVX10 enabled, thus for map2/3 insns with evex counterpart, we assume auto promotion to EGPR under APX_F if the insn uses GPR32. So for below insns, we disabled EGPR usage for their sse mnenomics, while allowing egpr generation of their

[PATCH 04/13] [APX EGPR] Add 16 new integer general purpose registers

2023-09-22 Thread Hongyu Wang
From: Kong Lingling Extend GENERAL_REGS with extra r16-r31 registers like REX registers, named as REX2 registers. They will only be enabled under TARGET_APX_EGPR. gcc/ChangeLog: * config/i386/i386-protos.h (x86_extended_rex2reg_mentioned_p): New function prototype. *

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

2023-09-22 Thread Hongyu Wang
From: Kong Lingling Disable EGPR usage for below legacy insns in opcode map2/3 that have vex but no evex counterpart. insn list: 1. phminposuw/vphminposuw 2. ptest/vptest 3. roundps/vroundps, roundpd/vroundpd, roundss/vroundss, roundsd/vroundsd 4. pcmpestri/vpcmpestri, pcmpestrm/vpcmpestrm

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

2023-09-22 Thread Hongyu Wang
From: Kong Lingling Current reload infrastructure does not support selective base_reg_class for backend insn. Add new macros with insn parameters to base_reg_class for lra/reload usage. gcc/ChangeLog: * addresses.h (base_reg_class): Add insn argument and new macro

[PATCH 03/13] [APX_EGPR] Initial support for APX_F

2023-09-22 Thread Hongyu Wang
From: Kong Lingling Add -mapx-features= enumeration to separate subfeatures of APX_F. -mapxf is treated same as previous ISA flag, while it sets -mapx-features=apx_all that enables all subfeatures. gcc/ChangeLog: * common/config/i386/cpuinfo.h (XSTATE_APX_F): New macro.

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

2023-09-22 Thread Hongyu Wang
From: Kong Lingling In inline asm, we do not know if the insn can use EGPR, so disable EGPR usage by default via mapping the common reg/mem constraint to non-EGPR constraints. The full list of mapping goes like "g" -> "jrjmi" "r" -> "jr" "m" -> "jm" "<" -> "j<" ">" -> "j>" "o" ->

[PATCH 05/13] [APX EGPR] Add register and memory constraints that disallow EGPR

2023-09-22 Thread Hongyu Wang
From: Kong Lingling For APX, as we extended the GENERAL_REG_CLASS, new constraints are needed to restrict insns that cannot adopt EGPR either in its reg or memory operands. We added a series of constraints for general/backend ones that related to GPR usage. All of them are prefixed with "j" to

[PATCH 02/13] [APX EGPR] middle-end: Add index_reg_class with insn argument.

2023-09-22 Thread Hongyu Wang
Like base_reg_class, INDEX_REG_CLASS also does not support backend insn. Add index_reg_class with insn argument for lra/reload usage. gcc/ChangeLog: * addresses.h (index_reg_class): New wrapper function like base_reg_class. * doc/tm.texi: Document INSN_INDEX_REG_CLASS.

[PATCH v2 00/13] Support Intel APX EGPR

2023-09-22 Thread Hongyu Wang
Hi, This is a v2 patch for APX support which follows-up previous discussion in https://gcc.gnu.org/pipermail/gcc-patches/2023-August/628904.html As discussed in previous thread, the inverse approach to extend base/index reg support with new memory constraints requrires much more effort both in

[Bug c++/111471] Incorrect NTTP printing in the error messages

2023-09-22 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111471 --- Comment #3 from CVS Commits --- The releases/gcc-13 branch has been updated by Patrick Palka : https://gcc.gnu.org/g:b7d2bb488efbdeab42cf047d92cf0f9acdc1c5ec commit r13-7830-gb7d2bb488efbdeab42cf047d92cf0f9acdc1c5ec Author: Patrick Palka

[Bug analyzer/111537] New: ICE: in set_cell_span, at text-art/table.cc:148 with D front-end and -fanalyzer

2023-09-22 Thread ibuclaw at gdcproject dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111537 Bug ID: 111537 Summary: ICE: in set_cell_span, at text-art/table.cc:148 with D front-end and -fanalyzer Product: gcc Version: 14.0 Status: UNCONFIRMED

[Bug c++/111493] [concepts] multidimensional subscript operator inside requires is broken

2023-09-22 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111493 --- Comment #3 from CVS Commits --- The master branch has been updated by Patrick Palka : https://gcc.gnu.org/g:1fea14def849dd38b098b0e2d54e64801f9c1f43 commit r14-4225-g1fea14def849dd38b098b0e2d54e64801f9c1f43 Author: Patrick Palka Date:

  1   2   >