Re: [PATCH] Move substitute_and_fold over to use simple_dce_from_worklist

2023-06-25 Thread Jan-Benedict Glaw
Hi Andrew, On Fri, 2023-05-05 08:17:19 -0700, Andrew Pinski via Gcc-patches wrote: > While looking into a different issue, I noticed that it > would take until the second forwprop pass to do some > forward proping and it was because the ssa name was > used more than once but the second

[Bug tree-optimization/110223] Missed optimization vectorizing booleans comparisons

2023-06-25 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110223 Andrew Pinski changed: What|Removed |Added Ever confirmed|0 |1 Status|UNCONFIRMED

[Bug middle-end/85563] [10/11/12/13/14 regression] -Wmaybe-uninitialized false alarm regression with __builtin_unreachable and GCC 8

2023-06-25 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85563 --- Comment #25 from Andrew Pinski --- (In reply to Richard Biener from comment #23) > > So somewhat of a pass ordering issue. The next CSE is DOM and then PRE. I was going to say this is related to PR 110405 but pointers don't record ranges

[Bug target/110407] [12/13/14 Regression] Overaligned struct return depending on different versions of GCC

2023-06-25 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110407 Andrew Pinski changed: What|Removed |Added Target Milestone|--- |12.4

[Bug target/110407] [12/13/14 Regression] Overaligned struct return depending on different versions of GCC

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

[Bug target/110406] d: Wrong code-gen returning POD structs by value

2023-06-25 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110406 --- Comment #7 from Andrew Pinski --- (In reply to Andrew Pinski from comment #6) > Which itself is GCC 12+ regression too ... I filed that as PR 110407, let's see what the x86 backend folks say ...

[Bug target/110407] New: [12/13/14 Regression] Overaligned struct return depending on different versions of GCC

2023-06-25 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110407 Bug ID: 110407 Summary: [12/13/14 Regression] Overaligned struct return depending on different versions of GCC Product: gcc Version: 14.0 Status: UNCONFIRMED

[Bug target/110406] d: Wrong code-gen returning POD structs by value

2023-06-25 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110406 Andrew Pinski changed: What|Removed |Added Keywords||ABI --- Comment #6 from Andrew Pinski

[Bug target/110406] d: Wrong code-gen returning POD structs by value

2023-06-25 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110406 --- Comment #5 from Andrew Pinski --- (In reply to ibuclaw from comment #3) > (In reply to Andrew Pinski from comment #2) > > >structs have been set the wrong mode > > > > No, they don't have wrong mode, just the x86_64 backend is broken, see

Re: [PATCH] RISC-V: Add an experimental vector calling convention

2023-06-25 Thread Lehua Ding
Hi Juzhe, Thanks for taking the time to review the code. I will address comments 1, 2, 3. For comment 4, it is necessary to implement these hooks. The purpose is to mark functions that use vector registers to pass arguments and return value so that they can be recognized by the linker. Send the

[PATCH] RISC-V: Remove redundant vcond patterns

2023-06-25 Thread Juzhe-Zhong
Previously, Richi has suggested that vcond patterns are only needed when target support comparison + select consuming 1 instruction. Now, I do the experiments on removing those "vcond" patterns, it works perfectly. All testcases PASS. Really appreicate Richi helps us recognize such issue. Now

[Bug target/110406] d: Wrong code-gen returning POD structs by value

2023-06-25 Thread ibuclaw at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110406 --- Comment #4 from ibuclaw at gcc dot gnu.org --- It would be good if TYPE_MODE no longer had such a strong influence though. In the meantime, I ought to restore behaviour to how it was in 12.x

[Bug target/110406] d: Wrong code-gen returning POD structs by value

2023-06-25 Thread ibuclaw at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110406 --- Comment #3 from ibuclaw at gcc dot gnu.org --- (In reply to Andrew Pinski from comment #2) > >structs have been set the wrong mode > > No, they don't have wrong mode, just the x86_64 backend is broken, see bug > 102027 comment #7

[Bug target/110406] d: Wrong code-gen returning POD structs by value

2023-06-25 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110406 --- Comment #2 from Andrew Pinski --- >structs have been set the wrong mode No, they don't have wrong mode, just the x86_64 backend is broken, see bug 102027 comment #7 specifically.

[PATCH] SSCV: Add LEN_MASK_STORE into SCCVN

2023-06-25 Thread juzhe . zhong
From: Ju-Zhe Zhong Hi, this patch is to add LEN_MASK_STORE into SCCVN. LEN_MASK_STORE is predicated by both len and mask together. My understanding is that LEN_MASK_STORE has same rhs_off and offset as MASK_STORE. The size = MIN (length (deduced from mask), (len + bias)). Not sure my

[PATCH] i386: Relax inline requirement for functions with different target attrs

2023-06-25 Thread Hongyu Wang via Gcc-patches
Hi, For function with different target attributes, current logic rejects to inline the callee when any arch or tune is mismatched. Relax the condition to honor just prefer_vecotr_width_type and other flags that may cause safety issue so caller can get more optimization opportunity.

[Bug d/110406] d: Wrong code-gen returning POD structs by value

2023-06-25 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110406 --- Comment #1 from Andrew Pinski --- Techincally the type mode should not be used by the backend to decide how a struct is returned or not.

[PATCH] SCCVN: Fix repeating variable name "len"

2023-06-25 Thread juzhe . zhong
From: Ju-Zhe Zhong Line 3292: has variable name "len": tree mask = NULL_TREE, len = NULL_TREE, bias = NULL_TREE; Line 3349: has variable name "len": HOST_WIDE_INT start = 0, len = 0; Since they are never used simultaneously, such issue is not recognized for now. However, I want to add

[PATCH] i386: Sync tune_string with arch_string for target attribute arch=*

2023-06-25 Thread Hongyu Wang via Gcc-patches
Hi, For function with target attribute arch=*, current logic will set its tune to -mtune from command line so all target_clones will get same tuning flags which would affect the performance for each clone. Override tune with arch if tune was not explicitly specified to get proper tuning flags for

Re: Re: [PATCH 1/2] allow target to check shrink-wrap-separate enabled or not

2023-06-25 Thread Fei Gao
hi Jeff Please see my earlier reply here. https://www.mail-archive.com/gcc-patches@gcc.gnu.org/msg310656.html Maybe you scrolled past it in so many emails:) BR,  Fei On 2023-06-25 21:36  Jeff Law wrote: > > > >On 6/20/23 03:40, Fei Gao wrote: >> gcc/ChangeLog: >> >>  * shrink-wrap.cc

[Bug d/110406] New: d: Wrong code-gen returning POD structs by value

2023-06-25 Thread ibuclaw at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110406 Bug ID: 110406 Summary: d: Wrong code-gen returning POD structs by value Product: gcc Version: 13.1.0 Status: UNCONFIRMED Severity: normal Priority: P3

[Bug d/110359] d: Suboptimal codegen for __builtin_expect(cond, false) since PR96435

2023-06-25 Thread ibuclaw at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110359 ibuclaw at gcc dot gnu.org changed: What|Removed |Added Resolution|--- |FIXED

[committed] d: Suboptimal codegen for __builtin_expect(cond, false)

2023-06-25 Thread Iain Buclaw via Gcc-patches
Hi, Since PR96435, both boolean objects and expressions have been evaluated in the following way by the D front-end. (*(ubyte*)_or_expr) & 1 It has been noted that sometimes this can cause the back-end to optimize in non-obvious ways - in particular with __builtin_expect. This @safe

[Bug d/110359] d: Suboptimal codegen for __builtin_expect(cond, false) since PR96435

2023-06-25 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110359 --- Comment #5 from CVS Commits --- The releases/gcc-10 branch has been updated by Iain Buclaw : https://gcc.gnu.org/g:ab134ecb05c6cf1d7a0aee58e7649a93a87c9874 commit r10-11475-gab134ecb05c6cf1d7a0aee58e7649a93a87c9874 Author: Iain Buclaw

[Bug d/110359] d: Suboptimal codegen for __builtin_expect(cond, false) since PR96435

2023-06-25 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110359 --- Comment #4 from CVS Commits --- The releases/gcc-11 branch has been updated by Iain Buclaw : https://gcc.gnu.org/g:a0c4bd656e0fce16d62877e0eb53ac11b1924d0c commit r11-10875-ga0c4bd656e0fce16d62877e0eb53ac11b1924d0c Author: Iain Buclaw

[Bug d/110359] d: Suboptimal codegen for __builtin_expect(cond, false) since PR96435

2023-06-25 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110359 --- Comment #3 from CVS Commits --- The releases/gcc-12 branch has been updated by Iain Buclaw : https://gcc.gnu.org/g:0f54a73b998b72f7c8452a63730ec3b16fc47854 commit r12-9730-g0f54a73b998b72f7c8452a63730ec3b16fc47854 Author: Iain Buclaw

[PATCH V2] DSE: Add LEN_MASK_STORE analysis into DSE

2023-06-25 Thread juzhe . zhong
From: Ju-Zhe Zhong gcc/ChangeLog: * tree-ssa-dse.cc (initialize_ao_ref_for_dse): Add LEN_MASK_STORE. (dse_optimize_stmt): Ditto. --- gcc/tree-ssa-dse.cc | 27 +++ 1 file changed, 27 insertions(+) diff --git a/gcc/tree-ssa-dse.cc b/gcc/tree-ssa-dse.cc

[PATCH] GIMPLE_FOLD: Fix gimple fold for LEN_MASK_{LOAD,STORE}

2023-06-25 Thread juzhe . zhong
From: Ju-Zhe Zhong Hi, previous I made a mistake on GIMPLE_FOLD of LEN_MASK_{LOAD,STORE}. We should fold LEN_MASK_{LOAD,STORE} (bias+len) == vf (nunits instead of bytesize) && mask = all trues mask into: MEM_REF [...]. This patch added testcase to test gimple fold of

[Bug d/110359] d: Suboptimal codegen for __builtin_expect(cond, false) since PR96435

2023-06-25 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110359 --- Comment #2 from CVS Commits --- The releases/gcc-13 branch has been updated by Iain Buclaw : https://gcc.gnu.org/g:9599da719abe4e990fb9cb7ad9d1abc19a5f0429 commit r13-7479-g9599da719abe4e990fb9cb7ad9d1abc19a5f0429 Author: Iain Buclaw

Re: [PATCH 3/3] [aarch64] Adjust testcase to match assembly output after r14-2007.

2023-06-25 Thread Hongtao Liu via Gcc-patches
On Mon, Jun 26, 2023 at 9:31 AM liuhongt via Gcc-patches wrote: > > The new assembly looks better than original one, so I adjust those testcases. > Ok for trunk? > > gcc/testsuite/ChangeLog: > > PR tree-optimization/110371 > PR tree-optimization/110018 > *

[PATCH 1/3] Use cvt_op to save intermediate type operand instead of "subtle" vec_dest.

2023-06-25 Thread liuhongt via Gcc-patches
When there're multiple operands in vec_oprnds0, vec_dest will be overwrited to vectype_out, but in multi_step_cvt case, cvt_type is expected. It caused an ICE when verify_gimple_in_cfg. Bootstrapped and regtested on x86_64-pc-linux-gnu{-m32,} and aarch64-linux-gnu. Ok for trunk? gcc/ChangeLog:

[PATCH 3/3] [aarch64] Adjust testcase to match assembly output after r14-2007.

2023-06-25 Thread liuhongt via Gcc-patches
The new assembly looks better than original one, so I adjust those testcases. Ok for trunk? gcc/testsuite/ChangeLog: PR tree-optimization/110371 PR tree-optimization/110018 * gcc.target/aarch64/sve/unpack_fcvt_signed_1.c: Scan scvt + sxtw instead of scvt + zip1 +

[PATCH 2/3] Don't use intermiediate type for FIX_TRUNC_EXPR when ftrapping-math.

2023-06-25 Thread liuhongt via Gcc-patches
> > Hmm, good question. GENERIC has a direct truncation to unsigned char > > for example, the C standard generally says if the integral part cannot > > be represented then the behavior is undefined. So I think we should be > > safe here (0x1.0p32 doesn't fit an int). > > We should be following

[Bug d/110359] d: Suboptimal codegen for __builtin_expect(cond, false) since PR96435

2023-06-25 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110359 --- Comment #1 from CVS Commits --- The master branch has been updated by Iain Buclaw : https://gcc.gnu.org/g:ab98db1e8c1b997414539f41b7fb814019497d8d commit r14-2082-gab98db1e8c1b997414539f41b7fb814019497d8d Author: Iain Buclaw Date: Mon

[Bug d/110113] gdc -fpreview=dip1021 crash in d/dmd/root/aav.d:127 dmd_aaGetRvalue from DsymbolTable::lookup(Identifier const*)

2023-06-25 Thread ibuclaw at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110113 ibuclaw at gcc dot gnu.org changed: What|Removed |Added Status|ASSIGNED|RESOLVED

[GCC13][committed] d: Fix crash in d/dmd/root/aav.d:127 dmd_aaGetRvalue from DsymbolTable::lookup (PR110113)

2023-06-25 Thread Iain Buclaw via Gcc-patches
Hi, This backports patch from upstream dmd mainline for fixing PR110113. The data being Mem.xrealloc'd contains many Array(T) fields, some of which have self references in their data.ptr field thanks to the smallarray optimization used by Array. Naturally then, the memcpy from old GC data to

[Bug d/110113] gdc -fpreview=dip1021 crash in d/dmd/root/aav.d:127 dmd_aaGetRvalue from DsymbolTable::lookup(Identifier const*)

2023-06-25 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110113 --- Comment #12 from CVS Commits --- The releases/gcc-12 branch has been updated by Iain Buclaw : https://gcc.gnu.org/g:016047f54713dc601c661ab57c78a26da3759608 commit r12-9729-g016047f54713dc601c661ab57c78a26da3759608 Author: Iain Buclaw

[Bug d/110113] gdc -fpreview=dip1021 crash in d/dmd/root/aav.d:127 dmd_aaGetRvalue from DsymbolTable::lookup(Identifier const*)

2023-06-25 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110113 --- Comment #11 from CVS Commits --- The releases/gcc-13 branch has been updated by Iain Buclaw : https://gcc.gnu.org/g:ae3a4cefd855512b10b833a56f275b701bacdb34 commit r13-7478-gae3a4cefd855512b10b833a56f275b701bacdb34 Author: Iain Buclaw

Re: [PATCH 1/5] x86: use VPTERNLOG for further bitwise two-vector operations

2023-06-25 Thread Hongtao Liu via Gcc-patches
On Sun, Jun 25, 2023 at 9:35 PM Jan Beulich wrote: > > On 25.06.2023 09:30, Hongtao Liu wrote: > > On Sun, Jun 25, 2023 at 3:23 PM Hongtao Liu wrote: > >> > >> On Sun, Jun 25, 2023 at 3:13 PM Hongtao Liu wrote: > >>> > >>> On Sun, Jun 25, 2023 at 1:52 PM Jan Beulich wrote: > > On

[committed] d: Merge upstream dmd, druntime a45f4e9f43, phobos 106038f2e.

2023-06-25 Thread Iain Buclaw via Gcc-patches
Hi, This patch merges the D front-end and run-time library with upstream dmd 5f7552bb28, and standard library with phobos 106038f2e. Synchronizing with the latest bug fixes in the v2.103.1 release. D front-end changes: - Import dmd v2.103.1. - Deprecated invalid special token

[Bug c++/110403] dependent function constexpr inside vector_size __attribute__ does not compile

2023-06-25 Thread janezz55 at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110403 --- Comment #1 from Janez Zemva --- Here is a possible workaround: #define S__(x) ((x) | (x) >> 1 | (x) >> 2 | (x) >> 3 | (x) >> 4) #define BITCEIL(x) ((x) & (x) - 1 ? (S__(x) & ~(S__(x) >> 1)) << 1 : (x)) template using array_t __attribute__

[Bug target/94617] Simple if condition not optimized

2023-06-25 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94617 --- Comment #11 from Andrew Pinski --- Note funky_bandpass in GCC 13+ no longer produces an imull but rather does neg/and instead: movl%edx, %eax cmpl%edx, %edi setle %dl cmpl%esi, %eax setl

gcc-14-20230625 is now available

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

[Bug target/94617] Simple if condition not optimized

2023-06-25 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94617 --- Comment #10 from Andrew Pinski --- For the first function (vanilla_bandpass), GCC 12+ produces now: movq%rcx, %rax cmpl%edx, %edi jg .L2 cmpl%esi, %edx cmovl %r8, %rax .L2:

☠ Buildbot (Sourceware): gccrust - failed compile (failure) (master)

2023-06-25 Thread builder--- via Gcc-rust
A new failure has been detected on builder gccrust-rawhide-x86_64 while building gccrust. Full details are available at: https://builder.sourceware.org/buildbot/#builders/132/builds/1110 Build state: failed compile (failure) Revision: 210557d8a4129e2b240cbbcc84c0edb18b81a397 Worker: bb1-1

[Bug middle-end/89921] The jump threading increases the size a lot when having an huge inline-asm

2023-06-25 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89921 Andrew Pinski changed: What|Removed |Added Last reconfirmed|2019-04-03 00:00:00 |2023-6-25 --- Comment #4 from Andrew

[Bug tree-optimization/84470] test for address of member being null not eliminated

2023-06-25 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84470 Andrew Pinski changed: What|Removed |Added Target Milestone|--- |9.0 Status|NEW

[Bug middle-end/21474] missed optimizations when comparing address to NULL

2023-06-25 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=21474 Andrew Pinski changed: What|Removed |Added Known to work||10.1.0, 9.1.0 Status|NEW

RE: Issue generating GCC coverage report since r14-1625-geba3565ce6d766

2023-06-25 Thread Martin Jambor
Hi Roger, sorry for late reply, rather unexpectedly I found myself traveling last week. On Fri, Jun 16 2023, Roger Sayle wrote: > Hi Martin, > It's great to hear from you. My apologies for the inconvenience. > I believe that the problem has been solved by Jakub's patch: >

[Bug middle-end/110148] [14 Regression] TSVC s242 regression between g:c0df96b3cda5738afbba3a65bb054183c5cd5530 and g:e4c986fde56a6248f8fbe6cf0704e1da34b055d8

2023-06-25 Thread hubicka at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110148 --- Comment #4 from Jan Hubicka --- zen3 fma requires all inputs to be ready to start execution, separate multiply+add can start multiplication earlier. Not sure if that explains the difference.

[Bug target/87104] missed &, == optimization makes Emacs ~0.4% slower on x86-64

2023-06-25 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87104 --- Comment #15 from Andrew Pinski --- Note in the original testcase, I noticed we don't do some "VRP/nonzero bits" optimization so I filed PR 110405 for that. It does not change the other transformation.

[Bug tree-optimization/110405] missing nonzerobits on branch

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

[Bug tree-optimization/110405] New: missing nonzerobits on branch

2023-06-25 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110405 Bug ID: 110405 Summary: missing nonzerobits on branch Product: gcc Version: 14.0 Status: UNCONFIRMED Keywords: missed-optimization Severity: enhancement

Re: [PATCH] RISCV: Add -m(no)-omit-leaf-frame-pointer support.

2023-06-25 Thread Stefan O'Rear via Gcc-patches
On Sun, Jun 25, 2023, at 8:49 AM, Jeff Law wrote: > On 6/24/23 19:40, Stefan O'Rear wrote: >> On Sat, Jun 24, 2023, at 11:01 AM, Jeff Law via Gcc-patches wrote: >>> On 6/21/23 02:14, Wang, Yanzhang wrote: Hi Jeff, sorry for the late reply. > The long branch handling is done at the

[Bug fortran/110360] ABI issue with character,value dummy argument

2023-06-25 Thread anlauf at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110360 --- Comment #14 from anlauf at gcc dot gnu.org --- After r14-2064, gcc-testresults shows the following for big-endian Power platforms: Running target unix/-m32 FAIL: gfortran.dg/value_9.f90 -O0 execution test FAIL: gfortran.dg/value_9.f90

[Bug c++/110404] Feature request: add a new option which is like -ftrivial-auto-var-init=zero but zero-initialize instead of zero-fill

2023-06-25 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110404 Andrew Pinski changed: What|Removed |Added Severity|normal |enhancement Summary|Feature

[Bug middle-end/110375] -ftrivial-auto-var-init=zero issues with pointers to data members

2023-06-25 Thread dangelog at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110375 --- Comment #5 from Giuseppe D'Angelo --- Done in https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110404 .

[Bug c++/110404] New: Feature request: make -ftrivial-auto-var-init=zero zero-initialize, not zero-fill

2023-06-25 Thread dangelog at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110404 Bug ID: 110404 Summary: Feature request: make -ftrivial-auto-var-init=zero zero-initialize, not zero-fill Product: gcc Version: 13.1.0 Status: UNCONFIRMED

Re: [PATCH v5 3/5] p1689r5: initial support

2023-06-25 Thread Ben Boeckel via Gcc
On Fri, Jun 23, 2023 at 14:31:17 -0400, Jason Merrill wrote: > On 6/20/23 15:46, Ben Boeckel wrote: > > On Tue, Feb 14, 2023 at 16:50:27 -0500, Jason Merrill wrote: > >> On 1/25/23 13:06, Ben Boeckel wrote: > > >>> Header units (including the standard library headers) are 100% > >>> unsupported

Re: [PATCH v5 3/5] p1689r5: initial support

2023-06-25 Thread Ben Boeckel via Gcc-patches
On Fri, Jun 23, 2023 at 14:31:17 -0400, Jason Merrill wrote: > On 6/20/23 15:46, Ben Boeckel wrote: > > On Tue, Feb 14, 2023 at 16:50:27 -0500, Jason Merrill wrote: > >> On 1/25/23 13:06, Ben Boeckel wrote: > > >>> Header units (including the standard library headers) are 100% > >>> unsupported

[Bug rtl-optimization/110307] ICE in move_insn, at haifa-sched.cc:5473 when building Ruby on alpha with -fPIC -O2 (or -fpeephole2 -fschedule-insns2)

2023-06-25 Thread amonakov at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110307 --- Comment #13 from Alexander Monakov --- Note to self: check how control_flow_insn_p relates.

Re: [PATCH v5 5/5] c++modules: report module mapper files as a dependency

2023-06-25 Thread Ben Boeckel via Gcc
On Fri, Jun 23, 2023 at 10:44:11 -0400, Jason Merrill wrote: > On 1/25/23 16:06, Ben Boeckel wrote: > > It affects the build, and if used as a static file, can reliably be > > tracked using the `-MF` mechanism. > > Hmm, this seems a bit like making all .o depend on the Makefile; it Technically

Re: [PATCH v5 5/5] c++modules: report module mapper files as a dependency

2023-06-25 Thread Ben Boeckel via Gcc-patches
On Fri, Jun 23, 2023 at 10:44:11 -0400, Jason Merrill wrote: > On 1/25/23 16:06, Ben Boeckel wrote: > > It affects the build, and if used as a static file, can reliably be > > tracked using the `-MF` mechanism. > > Hmm, this seems a bit like making all .o depend on the Makefile; it Technically

[Bug rtl-optimization/110307] ICE in move_insn, at haifa-sched.cc:5473 when building Ruby on alpha with -fPIC -O2 (or -fpeephole2 -fschedule-insns2)

2023-06-25 Thread matoro_gcc_bugzilla at matoro dot tk via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110307 --- Comment #12 from matoro --- Just tested applying this patch on top of 13 and it worked! Thanks so much for the help!

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

2023-06-25 Thread Ben Boeckel via Gcc
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: > >> On 1/25/23 16:06, Ben Boeckel wrote: > >>> They affect the build, so report them via `-MF` mechanisms. > >> > >> Why isn't this

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

2023-06-25 Thread Ben Boeckel via Gcc-patches
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: > >> On 1/25/23 16:06, Ben Boeckel wrote: > >>> They affect the build, so report them via `-MF` mechanisms. > >> > >> Why isn't this

Re: [PATCH] Improve DSE to handle stores before __builtin_unreachable ()

2023-06-25 Thread Jan Hubicka via Gcc-patches
> > Also as discussed some time ago, the volatile loads between traps has > > effect of turning previously pure/const functions into non-const which > > is somewhat sad, so it is still on my todo list to change it this stage1 > > to something more careful. We discussed internal functions

[Bug tree-optimization/110396] Compile-time hog with -O2 and -O3

2023-06-25 Thread luydorarko at vusra dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110396 --- Comment #3 from luydorarko at vusra dot com --- (In reply to Andrew Pinski from comment #2) > This is basically a dup of bug 102253. The problem is there is a known > scalability issues with large loop depth. > > How did you generate this

[Bug c/110402] Bogus -Waddress warning that pointer comparison is always true

2023-06-25 Thread lsof at mailbox dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110402 --- Comment #4 from lsof at mailbox dot org --- I retract my previous comment about `[key] != 0` being possibly false, since in C it is undefined behavior to perform pointer arithmetic on the null pointer even with an addend of zero. But I still

[Bug c/110402] Bogus -Waddress warning that pointer comparison is always true

2023-06-25 Thread lsof at mailbox dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110402 --- Comment #3 from lsof at mailbox dot org --- (In reply to Andrew Pinski from comment #2) > We warn about: > ``` > struct m { float *v; int t; }; > > _Bool chk1(struct m *m, int key) { > return >v[key]; > } > ``` > ``` > : In function

RE: [PATCH v2] RISC-V: fix expand function of vlmul_ext RVV intrinsic

2023-06-25 Thread Li, Pan2 via Gcc-patches
Committed, thanks Jeff. Pan -Original Message- From: Gcc-patches On Behalf Of Jeff Law via Gcc-patches Sent: Sunday, June 25, 2023 8:55 PM To: juzhe.zh...@rivai.ai; Li Xu ; gcc-patches Cc: kito.cheng ; palmer ; zhengyu Subject: Re: [PATCH v2] RISC-V: fix expand function of

Re: [PATCH] RISC-V: Add an experimental vector calling convention

2023-06-25 Thread 钟居哲
Thanks for doing this. A couple comments here: 1. -riscv_init_cumulative_args (CUMULATIVE_ARGS *cum, - tree fntype ATTRIBUTE_UNUSED, - rtx libname ATTRIBUTE_UNUSED, - tree fndecl, +riscv_init_cumulative_args

RE: [PATCH] RISC-V: Optimize VSETVL codegen of SELECT_VL with LEN_MASK_{LOAD,STORE}

2023-06-25 Thread Li, Pan2 via Gcc-patches
Committed, thanks Jeff. Pan -Original Message- From: Gcc-patches On Behalf Of Jeff Law via Gcc-patches Sent: Sunday, June 25, 2023 8:57 PM To: Juzhe-Zhong ; gcc-patches@gcc.gnu.org Cc: kito.ch...@gmail.com; kito.ch...@sifive.com; pal...@dabbelt.com; pal...@rivosinc.com;

RE: [PATCH V2] RISC-V: Enable len_mask{load, store} and remove len_{load, store}

2023-06-25 Thread Li, Pan2 via Gcc-patches
Committed, thanks Jeff. Pan -Original Message- From: Gcc-patches On Behalf Of Jeff Law via Gcc-patches Sent: Sunday, June 25, 2023 8:53 PM To: Juzhe-Zhong ; gcc-patches@gcc.gnu.org Cc: kito.ch...@gmail.com; kito.ch...@sifive.com; pal...@dabbelt.com; pal...@rivosinc.com;

RE: [PATCH] internal-fn: Fix bug of BIAS argument index

2023-06-25 Thread Li, Pan2 via Gcc-patches
Committed, thanks Jeff. Pan -Original Message- From: Gcc-patches On Behalf Of Jeff Law via Gcc-patches Sent: Sunday, June 25, 2023 8:48 PM To: juzhe.zh...@rivai.ai; gcc-patches@gcc.gnu.org Cc: richard.sandif...@arm.com; rguent...@suse.de Subject: Re: [PATCH] internal-fn: Fix bug of

[Bug ada/110314] Gnat failed assertion and Allocators with discriminant

2023-06-25 Thread franckbehaghel_gcc at protonmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110314 --- Comment #5 from Franck Behaghel --- Marc, Could you consider and review this patch ? Regards,

[Bug ada/110314] Gnat failed assertion and Allocators with discriminant

2023-06-25 Thread franckbehaghel_gcc at protonmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110314 --- Comment #4 from Franck Behaghel --- Created attachment 55399 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=55399=edit patch

Re: [PATCH 1/2] allow target to check shrink-wrap-separate enabled or not

2023-06-25 Thread Jeff Law via Gcc-patches
On 6/20/23 03:40, Fei Gao wrote: gcc/ChangeLog: * shrink-wrap.cc (try_shrink_wrapping_separate):call use_shrink_wrapping_separate. (use_shrink_wrapping_separate): wrap the condition check in use_shrink_wrapping_separate. * shrink-wrap.h

Re: [PATCH 1/5] x86: use VPTERNLOG for further bitwise two-vector operations

2023-06-25 Thread Jan Beulich via Gcc-patches
On 25.06.2023 09:30, Hongtao Liu wrote: > On Sun, Jun 25, 2023 at 3:23 PM Hongtao Liu wrote: >> >> On Sun, Jun 25, 2023 at 3:13 PM Hongtao Liu wrote: >>> >>> On Sun, Jun 25, 2023 at 1:52 PM Jan Beulich wrote: On 25.06.2023 06:42, Hongtao Liu wrote: > On Wed, Jun 21, 2023 at 2:26 

[Bug rtl-optimization/110400] Reuse vector register for both scalar and vector value.

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

[Bug target/98453] aarch64: Missed opportunity for STP for vec_duplicate

2023-06-25 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98453 Andrew Pinski changed: What|Removed |Added Target Milestone|--- |14.0 Resolution|---

[Bug c++/110401] [10/11/12/13/14 Regression] Unhelpful "goto is not a constant expression" in ill-formed pre c++20 constexpr function template

2023-06-25 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110401 Andrew Pinski changed: What|Removed |Added Summary|Unhelpful "goto is not a|[10/11/12/13/14 Regression]

[PING][RISCV] [PR target/110201] Fix operand types for various scalar crypto insns

2023-06-25 Thread Jeff Law via Gcc-patches
Ping. With RISCV tag this time. Forwarded Message Subject: [PR target/110201] Fix operand types for various scalar crypto insns Date: Mon, 19 Jun 2023 16:34:28 -0600 From: Jeff Law To: gcc-patches@gcc.gnu.org A handful of the scalar crypto instructions are supposed to

Re: [PATCH] cprop_hardreg: fix ORIGINAL_REGNO/REG_ATTRS/REG_POINTER handling

2023-06-25 Thread Jeff Law via Gcc-patches
On 6/22/23 05:11, Philipp Tomsich wrote: From: Manolis Tsamis Fixes: 6a2e8dcbbd4bab3 Propagation for the stack pointer in regcprop was enabled in 6a2e8dcbbd4bab3, but set ORIGINAL_REGNO/REG_ATTRS/REG_POINTER for stack_pointer_rtx which caused regression (e.g., PR 110313, PR 110308). This

[Bug c/110402] Bogus -Waddress warning that pointer comparison is always true

2023-06-25 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110402 Andrew Pinski changed: What|Removed |Added Keywords||diagnostic --- Comment #2 from Andrew

Re: [PATCH] RISC-V: Optimize VSETVL codegen of SELECT_VL with LEN_MASK_{LOAD,STORE}

2023-06-25 Thread Jeff Law via Gcc-patches
On 6/25/23 06:20, Juzhe-Zhong wrote: This patch is depending on LEN_MASK_{LOAD,STORE} patch: https://gcc.gnu.org/pipermail/gcc-patches/2023-June/622742.html After enabling the LEN_MASK_{LOAD,STORE}, I notice that there is a case that VSETVL PASS need to be optimized: void f (int32_t

Re: [PATCH v2] RISC-V: fix expand function of vlmul_ext RVV intrinsic

2023-06-25 Thread Jeff Law via Gcc-patches
On 6/25/23 03:13, juzhe.zh...@rivai.ai wrote: LGTM. Thanks for fixing it. Agreed. I didn't see the V2 had already been posted. Hi, Jeff: I saw Li Xu is frequently helping RVV support in GCC. Is it possible to give him the write access? Yes, we can do that with the normal process. Li

Re: [PATCH V2] RISC-V: Enable len_mask{load, store} and remove len_{load, store}

2023-06-25 Thread Jeff Law via Gcc-patches
On 6/25/23 02:39, Juzhe-Zhong wrote: This patch enable len_mask_{load,store} to support flow-control in RVV auto-vectorization. Consider this following case: void f (int32_t *__restrict a, int32_t *__restrict b, int32_t *__restrict cond, int n) { for (int i = 0; i < n; i++)

Re: [PATCH] RISC-V: force arg and target to reg rtx under -O0

2023-06-25 Thread Jeff Law via Gcc-patches
On 6/24/23 21:43, juzhe.zh...@rivai.ai wrote: Hi, Li. Appreciate for catching this! I think it's better: -emit_insn (gen_rtx_SET (gen_lowpart (e.vector_mode (), e.target), src)); +emit_move_insn (gen_lowpart (e.vector_mode (), e.target), src); do this to fix this issue. Agreed. Assuming a

Re: [PATCH] RISCV: Add -m(no)-omit-leaf-frame-pointer support.

2023-06-25 Thread Jeff Law via Gcc-patches
On 6/24/23 19:40, Stefan O'Rear wrote: On Sat, Jun 24, 2023, at 11:01 AM, Jeff Law via Gcc-patches wrote: On 6/21/23 02:14, Wang, Yanzhang wrote: Hi Jeff, sorry for the late reply. The long branch handling is done at the assembler level. So the clobbering of $ra isn't visible to the

Re: [PATCH] internal-fn: Fix bug of BIAS argument index

2023-06-25 Thread Jeff Law via Gcc-patches
On 6/24/23 21:36, juzhe.zh...@rivai.ai wrote: From: Ju-Zhe Zhong When trying to enable LEN_MASK_{LOAD,STORE} in RISC-V port, I found I made a mistake in case of argument index of BIAS. This patch is an obvious fix, Ok for trunk ? gcc/ChangeLog: * internal-fn.cc

[PATCH] RISC-V: Add an experimental vector calling convention

2023-06-25 Thread Lehua Ding
This patch adds an experimental vector calling convention proposal that the user can enable with --param=riscv-vector-abi option. The details of this proposal can be viewed at this link: https://github.com/riscv-non-isa/riscv-elf-psabi-doc/pull/389 . Please help me to review this proposal, thank

[PATCH] RISC-V: Optimize VSETVL codegen of SELECT_VL with LEN_MASK_{LOAD, STORE}

2023-06-25 Thread Juzhe-Zhong
This patch is depending on LEN_MASK_{LOAD,STORE} patch: https://gcc.gnu.org/pipermail/gcc-patches/2023-June/622742.html After enabling the LEN_MASK_{LOAD,STORE}, I notice that there is a case that VSETVL PASS need to be optimized: void f (int32_t *__restrict a, int32_t *__restrict b,

[PATCH] modula-2: Amend the handling of failed select() calls in RTint [PR108835].

2023-06-25 Thread Iain Sandoe via Gcc-patches
Tested on various affected Darwin versions and on x86_64-linux-gnu OK for trunk? OK for 13.2? thanks Iain --- 8< --- When we make a select() that fails, there is an attempt to (a) diagnose why and (b) make a fallback. These actions are causing some tests to hang on some Darwin versions, this is

[Bug c++/110403] New: constant expression inside vector_size __attribute__ does not compile

2023-06-25 Thread janezz55 at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110403 Bug ID: 110403 Summary: constant expression inside vector_size __attribute__ does not compile Product: gcc Version: 14.0 Status: UNCONFIRMED Severity: normal

[Bug middle-end/83172] -Wstack-size= doesn't detect the correct stack size with VLA or alloca

2023-06-25 Thread muecker at gwdg dot de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83172 Martin Uecker changed: What|Removed |Added CC||muecker at gwdg dot de --- Comment #5

[Bug c/110402] Bogus -Waddress warning that pointer comparison is always true

2023-06-25 Thread schwab--- via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110402 --- Comment #1 from Andreas Schwab --- The error message does not match anything from the test case.

[Bug c/110402] New: Bogus -Waddress warning that pointer comparison is always true

2023-06-25 Thread lsof at mailbox dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110402 Bug ID: 110402 Summary: Bogus -Waddress warning that pointer comparison is always true Product: gcc Version: 13.1.1 Status: UNCONFIRMED Severity: normal

[committed] MAINTAINERS: Add myself to write after approval

2023-06-25 Thread Lehua Ding
ChangeLog: * MAINTAINERS: Add Lehua Ding to write after approval --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index 4825ee449ae..bac773ad0af 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -394,6 +394,7 @@ Chris Demetriou

[pushed] configure, Darwin: Ensure overrides to host-pie are passed to gcc configure.

2023-06-25 Thread Iain Sandoe via Gcc-patches
Tested on i686, powerpc, x86_64 and aarch64 darwin (for versions requiring PIE and also some that default to non-PIE). Also tested on x86_64-linux-gnu with and without --enable-host-pie. pushed to master, thanks Iain --- 8< --- The latest versions of Darwin on the Aarch64 platform mandate

  1   2   >