[Bug analyzer/110543] New: RFE: Add optional trim of the analyzer diagnostics through system headers.

2023-07-04 Thread vultkayn at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110543 Bug ID: 110543 Summary: RFE: Add optional trim of the analyzer diagnostics through system headers. Product: gcc Version: unknown Status: UNCONFIRMED Severity:

[Bug c++/110523] [14 Regression] ICE in redeclare_class_template, at cp/pt.cc:6391 on json-3.11.2

2023-07-04 Thread dcb314 at hotmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110523 --- Comment #7 from David Binderman --- I have tried to start a git bisect and the current range is g:f3d87219dd502d5c .. g:9757e4440bd8755d. This is 15 commits.

Re: wishlist: support for shorter pointers

2023-07-04 Thread Oleg Endo
> I think a C++ class (or rather, class template) with inline functions is > the way to go here. gcc's optimiser will give good code, and the C++ > class will let you get nice syntax to hide the messy details. > > There is no good way to do this in C. Named address spaces would be a >

Re: [PATCH v1] RISC-V: Use FRM_DYN when add the rounding mode operand

2023-07-04 Thread Robin Dapp via Gcc-patches
Hi Pan, in general this looks good to me. I would have expected the change in the other patch I just looked at though ;) Sure it's intrinsics this time but the same principle. Regards Robin

Re: [PATCH v2] RISC-V: Fix one bug for floating-point static frm

2023-07-04 Thread Robin Dapp via Gcc-patches
Hi Pan, I only just now got back to my mails and I'm a bit confused about the several patches related to rounding mode. > 1. By default, the RVV floating-point will take dyn mode. Here you are referring to 10.1 in the spec I assume. Could we add this as a comment in the code? > 2. DYN is

[Bug libstdc++/110542] New: use of allocated storage after deallocation in a constant expression: std::array of std::vector

2023-07-04 Thread hal.finkel.oss at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110542 Bug ID: 110542 Summary: use of allocated storage after deallocation in a constant expression: std::array of std::vector Product: gcc Version: 13.1.0 Status: UNCONFIRMED

[PATCH V4] VECT: Apply LEN_MASK_GATHER_LOAD/SCATTER_STORE into vectorizer

2023-07-04 Thread juzhe . zhong
From: Ju-Zhe Zhong Hi, Richard and Richi. Address comments from Richi. Make gs_info.ifn = LEN_MASK_GATHER_LOAD/LEN_MASK_SCATTER_STORE. I have fully tested these 4 format: length = vf is a dummpy length, mask = {-1,-1, ... } is a dummy mask. 1. no length, no mask LEN_MASK_GATHER_LOAD

RE: [v4] Streamer: Fix out of range memory access of machine mode

2023-07-04 Thread Li, Pan2 via Gcc-patches
Thanks Richard for reviewing. Hi Thomas, Looks Richard approved the V4 version of Streamer, could you please help to install it? Or I can help if you are in the middle of something. Thanks again for testing and fixing this issue entirely. Pan -Original Message- From: Richard Biener

Re: wishlist: support for shorter pointers

2023-07-04 Thread David Brown via Gcc
On 03/07/2023 18:42, Rafał Pietrak via Gcc wrote: Hi Ian, W dniu 3.07.2023 o 17:07, Ian Lance Taylor pisze: On Wed, Jun 28, 2023 at 11:21 PM Rafał Pietrak via Gcc wrote: [] I was thinking about that, and it doesn't look as requiring that deep rewrites. ABI spec, that  could

[PATCH v1] RISC-V: Use FRM_DYN when add the rounding mode operand

2023-07-04 Thread Pan Li via Gcc-patches
From: Pan Li This patch would like to take FRM_DYN const rtx as the rounding mode operand according to the RVV spec, which takes the dyn as the only rounding mode for floating-point. Signed-off-by: Pan Li gcc/ChangeLog: * config/riscv/riscv-vector-builtins.cc

[Bug c/110491] Wrong code at -O2 on x86_64-linux-gnu (a recent regression)

2023-07-04 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110491 Richard Biener changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution|---

[Bug c/110491] Wrong code at -O2 on x86_64-linux-gnu (a recent regression)

2023-07-04 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110491 --- Comment #3 from CVS Commits --- The master branch has been updated by Richard Biener : https://gcc.gnu.org/g:819285ef10a87d663f8c181c06aa88d1d9f75aed commit r14-2296-g819285ef10a87d663f8c181c06aa88d1d9f75aed Author: Richard Biener Date:

[PATCH] tree-optimization/110491 - PHI-OPT and undefs

2023-07-04 Thread Richard Biener via Gcc-patches
The following makes sure to not make conditional undefs in PHI arguments unconditional by folding cond ? arg1 : arg2. Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed. This might become redundant with the pending fix to reset flow-sensitive info. Richard. PR

Re: Re: [PATCH V3] VECT: Apply LEN_MASK_GATHER_LOAD/SCATTER_STORE into vectorizer

2023-07-04 Thread Richard Biener via Gcc-patches
On Tue, 4 Jul 2023, juzhe.zh...@rivai.ai wrote: > Hi, Richi. > > For GATHER_LOAD which doesn't have len and mask. > > Should I keep it as gather_load, then I support both gather_load and > len_mask_gather_load ? > > Or I should normalize it into len_mask_gather_load with length = vf and >

Re: [PATCH 6/19]middle-end: Don't enter piecewise expansion if VF is not constant.

2023-07-04 Thread Richard Biener via Gcc-patches
On Wed, 28 Jun 2023, Tamar Christina wrote: > Hi All, > > expand_vector_piecewise does not support VLA expansion as it has a hard assert > on the type not being VLA. > > Instead of just failing to expand and so the call marked unsupported we ICE. > This adjust it so we don't and can gracefully

Re: [PATCH 5/19]middle-end: Enable bit-field vectorization to work correctly when we're vectoring inside conds

2023-07-04 Thread Richard Biener via Gcc-patches
On Wed, 28 Jun 2023, Tamar Christina wrote: > Hi All, > > The bitfield vectorization support does not currently recognize bitfields > inside > gconds. This means they can't be used as conditions for early break > vectorization which is a functionality we require. > > This adds support for them

Re: [PATCH 4/19]middle-end: Fix scale_loop_frequencies segfault on multiple-exits

2023-07-04 Thread Richard Biener via Gcc-patches
On Wed, 28 Jun 2023, Tamar Christina wrote: > Hi All, > > There's an existing bug in loop frequency scaling where the if statement > checks > to see if there's a single exit, and records an dump file note but then > continues. > > It then tries to access the null pointer, which of course

Re: Re: [PATCH V3] VECT: Apply LEN_MASK_GATHER_LOAD/SCATTER_STORE into vectorizer

2023-07-04 Thread juzhe.zh...@rivai.ai
Hi, Richi. For GATHER_LOAD which doesn't have len and mask. Should I keep it as gather_load, then I support both gather_load and len_mask_gather_load ? Or I should normalize it into len_mask_gather_load with length = vf and mask = {1,1,1,1,1,...}, then I only need to support

[Bug tree-optimization/110541] New: Invalid VEC_PERM_EXPR mask element size

2023-07-04 Thread kristerw at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110541 Bug ID: 110541 Summary: Invalid VEC_PERM_EXPR mask element size Product: gcc Version: 14.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component:

Re: [PATCH 1/19]middle-end ifcvt: Support bitfield lowering of multiple-exit loops

2023-07-04 Thread Richard Biener via Gcc-patches
On Wed, 28 Jun 2023, Tamar Christina wrote: > Hi, > > With the patch enabling the vectorization of early-breaks, we'd like to allow > bitfield lowering in such loops, which requires the relaxation of allowing > multiple exits when doing so. In order to avoid a similar issue to PR107275, > the

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

2023-07-04 Thread Richard Biener via Gcc-patches
On Thu, 29 Jun 2023, Jiufu Guo wrote: > > Hi, > > Jiufu Guo writes: > > > Hi, > > > > Integer expression "(X - N * M) / N" can be optimized to "X / N - M" if > > there is no wrap/overflow/underflow and "X - N * M" has the same sign > > with "X". > > > > Compare with the previous version: > >

Re: [v4] Streamer: Fix out of range memory access of machine mode

2023-07-04 Thread Richard Biener via Gcc-patches
On Fri, 30 Jun 2023, Thomas Schwinge wrote: > Hi! > > On 2023-06-30T01:39:39+, "Li, Pan2" wrote: > > That?s very cool, thanks Thomas for help! > > :-) > > > Let?s wait the AMD test running result for the final version of the patch. > > That's all looking good, too. > > > From:

Re: Re: [PATCH V3] VECT: Apply LEN_MASK_GATHER_LOAD/SCATTER_STORE into vectorizer

2023-07-04 Thread Richard Biener via Gcc-patches
On Tue, 4 Jul 2023, juzhe.zh...@rivai.ai wrote: > Hi, Richi. > > >> Eh, it's obvious that we should have the "vectorized" form > >> also in the 'scalar' variant. If you think there's no reasonable > >> way to add a value for len or bias then instead re-order the > >> arguments so 'mask' comes

Re: Re: [PATCH V3] VECT: Apply LEN_MASK_GATHER_LOAD/SCATTER_STORE into vectorizer

2023-07-04 Thread juzhe.zh...@rivai.ai
Hi, Richi. >> Eh, it's obvious that we should have the "vectorized" form >> also in the 'scalar' variant. If you think there's no reasonable >> way to add a value for len or bias then instead re-order the >> arguments so 'mask' comes first and the len/bias pair last. I found this patch is buggy

[Bug c++/110523] [14 Regression] ICE in redeclare_class_template, at cp/pt.cc:6391 on json-3.11.2

2023-07-04 Thread dcb314 at hotmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110523 --- Comment #6 from David Binderman --- The only C++ related commit in that range is: commit db38b285ba61c5b888adc0d117177bfd774c1153 Author: Patrick Palka Date: Fri Jun 30 15:05:22 2023 -0400 c++: fix up caching of level lowered ttps

Re: [PATCH V3] VECT: Apply LEN_MASK_GATHER_LOAD/SCATTER_STORE into vectorizer

2023-07-04 Thread Richard Biener via Gcc-patches
On Tue, 4 Jul 2023, juzhe.zh...@rivai.ai wrote: > From: Ju-Zhe Zhong > > Hi, Richard and Richi. > > Address comments from Richard. > > Make gs_info.ifn = LEN_MASK_GATHER_LOAD/LEN_MASK_SCATTER_STORE. > > Since: > /* LEN_MASK_GATHER_LOAD/LEN_MASK_SCATTER_STORE are different >on

[Bug c/110491] Wrong code at -O2 on x86_64-linux-gnu (a recent regression)

2023-07-04 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110491 Richard Biener changed: What|Removed |Added Ever confirmed|0 |1 Assignee|unassigned at

[Bug c++/110523] [14 Regression] ICE in redeclare_class_template, at cp/pt.cc:6391 on json-3.11.2

2023-07-04 Thread dcb314 at hotmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110523 --- Comment #5 from David Binderman --- The compiler seems to break as follows: /home/dcb38/gcc/results.20230701/bin/gcc /home/dcb38/gcc/results.20230703.asan.ubsan/bin/gcc

[PATCH] Remove unnecessary check on scalar_niter == 0

2023-07-04 Thread Richard Biener via Gcc-patches
The following removes an unnecessary check. Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed. * tree-vect-loop.cc (vect_analyze_loop_costing): Remove check guarding scalar_niter underflow. --- gcc/tree-vect-loop.cc | 7 --- 1 file changed, 7 deletions(-) diff

[PATCH] Use mark_ssa_maybe_undefs in PHI-OPT

2023-07-04 Thread Richard Biener via Gcc-patches
The following removes gimple_uses_undefined_value_p and instead uses the conservative mark_ssa_maybe_undefs in PHI-OPT, the last user of the other API. Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed. * tree-ssa-phiopt.cc (pass_phiopt::execute): Mark SSA undefs.

[Bug c/110376] Wrong code at -O1 on x86_64-linux-gnu

2023-07-04 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110376 --- Comment #2 from CVS Commits --- The master branch has been updated by Richard Biener : https://gcc.gnu.org/g:d4800a23d8d14213f9e461cd47e97a5c7271b1a9 commit r14-2291-gd4800a23d8d14213f9e461cd47e97a5c7271b1a9 Author: Richard Biener Date:

[PATCH] tree-optimization/110376 - testcase for fixed bug

2023-07-04 Thread Richard Biener via Gcc-patches
This is a new testcase for the fixed bug. Tested on x86_64-unknown-linux-gnu, pushed. PR tree-optimization/110376 * gcc.dg/torture/pr110376.c: New testcase. --- gcc/testsuite/gcc.dg/torture/pr110376.c | 39 + 1 file changed, 39 insertions(+) create mode

[Bug middle-end/110228] [13/14 Regression] llvm-16 miscompiled due to an maybe uninitialized variable

2023-07-04 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110228 --- Comment #31 from Richard Biener --- (In reply to Zhendong Su from comment #30) > (In reply to Richard Biener from comment #29) > > I can't reproduce the original failure on trunk or with GCC 13.1, but the > > testcase from comment#16 is now

Re: [RFC] Bridging the gap between the Linux Kernel Memory Consistency Model (LKMM) and C11/C++11 atomics

2023-07-04 Thread Jonathan Wakely via Gcc
On Tue, 4 Jul 2023 at 10:47, Peter Zijlstra wrote: > > On Mon, Jul 03, 2023 at 03:20:31PM -0400, Olivier Dion wrote: > > > int x = 0; > > int y = 0; > > int r0, r1; > > > > int dummy; > > > > void t0(void) > > { > > __atomic_store_n(, 1, __ATOMIC_RELAXED); > > > >

[Bug c++/110523] [14 Regression] ICE in redeclare_class_template, at cp/pt.cc:6391 on json-3.11.2

2023-07-04 Thread dcb314 at hotmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110523 David Binderman changed: What|Removed |Added CC||dcb314 at hotmail dot com ---

Re: [PATCH V3] VECT: Apply LEN_MASK_GATHER_LOAD/SCATTER_STORE into vectorizer

2023-07-04 Thread juzhe.zh...@rivai.ai
Oh. Sorry for incorrect typo in commit log. >> Address comments from Richard. Change it into "Address comments from Richi." :). Thanks. juzhe.zh...@rivai.ai From: juzhe.zhong Date: 2023-07-04 17:54 To: gcc-patches CC: richard.sandiford; rguenther; Ju-Zhe Zhong Subject: [PATCH V3] VECT:

[Bug target/104914] [MIPS] wrong comparison with scrabbled int value

2023-07-04 Thread syq at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104914 --- Comment #5 from YunQiang Su --- Another possible fix is to emit a SLL for extendsidi2, but I am worrying about it may break something else.

[Bug middle-end/110228] [13/14 Regression] llvm-16 miscompiled due to an maybe uninitialized variable

2023-07-04 Thread zhendong.su at inf dot ethz.ch via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110228 --- Comment #30 from Zhendong Su --- (In reply to Richard Biener from comment #29) > I can't reproduce the original failure on trunk or with GCC 13.1, but the > testcase from comment#16 is now fixed. I also cannot reproduce the testcase > from

Re: Re: [PATCH V2] VECT: Apply LEN_MASK_GATHER_LOAD/SCATTER_STORE into vectorizer

2023-07-04 Thread juzhe.zh...@rivai.ai
Hi, Richi. Thanks so much. I have addressed comments and sent V3 patch: https://gcc.gnu.org/pipermail/gcc-patches/2023-July/623566.html Thanks. juzhe.zh...@rivai.ai From: Richard Biener Date: 2023-07-04 17:27 To: Ju-Zhe Zhong CC: gcc-patches; richard.sandiford Subject: Re: [PATCH V2] VECT:

[PATCH V3] VECT: Apply LEN_MASK_GATHER_LOAD/SCATTER_STORE into vectorizer

2023-07-04 Thread juzhe . zhong
From: Ju-Zhe Zhong Hi, Richard and Richi. Address comments from Richard. Make gs_info.ifn = LEN_MASK_GATHER_LOAD/LEN_MASK_SCATTER_STORE. Since: /* LEN_MASK_GATHER_LOAD/LEN_MASK_SCATTER_STORE are different on arguments before and after vectorized. Before vectorized:

[PATCH] MIPS: Adjust mips16e2 related tests for ifcvt costing changes

2023-07-04 Thread Jie Mei
A mips16e2 related test fails after the ifcvt change. The mips16e2 addition also causes a test for unrelated module to fail. This patch adjusts branch costs when running the two affected tests. These tests should not require the -mbranch-cost option, and this issue needs to be addressed.

Re: [RFC] Bridging the gap between the Linux Kernel Memory Consistency Model (LKMM) and C11/C++11 atomics

2023-07-04 Thread Peter Zijlstra
On Mon, Jul 03, 2023 at 03:20:31PM -0400, Olivier Dion wrote: > int x = 0; > int y = 0; > int r0, r1; > > int dummy; > > void t0(void) > { > __atomic_store_n(, 1, __ATOMIC_RELAXED); > > __atomic_exchange_n(, 1, __ATOMIC_SEQ_CST); >

[Bug tree-optimization/110540] New: [14 Regression] Dead Code Elimination Regression since r14-1163-gd8b058d3ca4

2023-07-04 Thread theodort at inf dot ethz.ch via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110540 Bug ID: 110540 Summary: [14 Regression] Dead Code Elimination Regression since r14-1163-gd8b058d3ca4 Product: gcc Version: 14.0 Status: UNCONFIRMED Severity:

[Bug tree-optimization/110531] Vect: slp_done_for_suggested_uf is not initialized in tree-vect-loop.cc

2023-07-04 Thread linkw at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110531 --- Comment #11 from Kewen Lin --- (In reply to Hao Liu from comment #10) > > foo is just an example for not getting inlined, the point here is extra > > cost paid. > > My point is that the case is different from the original case in >

[Bug tree-optimization/110539] New: [14 Regression] Dead Code Elimination Regression at since r14-338-g1dd154f6407

2023-07-04 Thread theodort at inf dot ethz.ch via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110539 Bug ID: 110539 Summary: [14 Regression] Dead Code Elimination Regression at since r14-338-g1dd154f6407 Product: gcc Version: 14.0 Status: UNCONFIRMED

[Bug tree-optimization/110531] Vect: slp_done_for_suggested_uf is not initialized in tree-vect-loop.cc

2023-07-04 Thread hliu at amperecomputing dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110531 --- Comment #10 from Hao Liu --- > foo is just an example for not getting inlined, the point here is extra cost > paid. My point is that the case is different from the original case in tree-vect-loop.cc. For example, change the case as

Re: [PATCH V2] VECT: Apply LEN_MASK_GATHER_LOAD/SCATTER_STORE into vectorizer

2023-07-04 Thread Richard Biener via Gcc-patches
On Tue, 4 Jul 2023, juzhe.zh...@rivai.ai wrote: > From: Ju-Zhe Zhong > > Hi, Richard and Richi. > > The len_mask_gather_load/len_mask_scatter_store patterns have been added. > Now, this patch applies them into vectorizer. > > Here is the example: > > void > f (int *restrict a, >int

Re: [PATCH] Fortran: fixes for procedures with ALLOCATABLE,INTENT(OUT) arguments [PR92178]

2023-07-04 Thread Mikael Morin
Le 04/07/2023 à 01:56, Steve Kargl a écrit : On Mon, Jul 03, 2023 at 10:49:36PM +0200, Harald Anlauf via Fortran wrote: Indeed, this is a nice demonstration. While playing, I was wondering whether the following code is conforming: program p call s ((1)) contains subroutine s (x)

[Bug tree-optimization/110538] New: [14 Regression] Dead Code Elimination Regression since r14-368-ge1366a7e4ce

2023-07-04 Thread theodort at inf dot ethz.ch via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110538 Bug ID: 110538 Summary: [14 Regression] Dead Code Elimination Regression since r14-368-ge1366a7e4ce Product: gcc Version: 14.0 Status: UNCONFIRMED Severity:

[Bug tree-optimization/110531] Vect: slp_done_for_suggested_uf is not initialized in tree-vect-loop.cc

2023-07-04 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110531 --- Comment #9 from CVS Commits --- The master branch has been updated by Hao Liu : https://gcc.gnu.org/g:2c12ccf800fc7890925402d30a02f0fa9e2627cc commit r14-2290-g2c12ccf800fc7890925402d30a02f0fa9e2627cc Author: Hao Liu Date: Tue Jul 4

[Bug tree-optimization/101912] -Wmaybe-uninitialized false alarm in tzdb localtime.c

2023-07-04 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101912 Richard Biener changed: What|Removed |Added Target Milestone|13.2|14.0

[Bug tree-optimization/97108] [10/11/12/13/14 Regression] -Wmaybe-uninitialized false positive

2023-07-04 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97108 Bug 97108 depends on bug 101912, which changed state. Bug 101912 Summary: -Wmaybe-uninitialized false alarm in tzdb localtime.c https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101912 What|Removed |Added

[Bug middle-end/24639] [meta-bug] bug to track all Wuninitialized issues

2023-07-04 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=24639 Bug 24639 depends on bug 101912, which changed state. Bug 101912 Summary: -Wmaybe-uninitialized false alarm in tzdb localtime.c https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101912 What|Removed |Added

[Bug tree-optimization/101912] -Wmaybe-uninitialized false alarm in tzdb localtime.c

2023-07-04 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101912 Richard Biener changed: What|Removed |Added Status|REOPENED|RESOLVED Resolution|---

[Bug middle-end/110228] [13/14 Regression] llvm-16 miscompiled due to an maybe uninitialized variable

2023-07-04 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110228 Richard Biener changed: What|Removed |Added Priority|P3 |P2 --- Comment #29 from Richard

[Bug middle-end/110228] [13/14 Regression] llvm-16 miscompiled due to an maybe uninitialized variable

2023-07-04 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110228 --- Comment #28 from CVS Commits --- The master branch has been updated by Richard Biener : https://gcc.gnu.org/g:b083203f053f1666e9cc1ded2abdf4e1688d1ec0 commit r14-2289-gb083203f053f1666e9cc1ded2abdf4e1688d1ec0 Author: Richard Biener Date:

[PATCH] tree-optimization/110228 - avoid undefs in ifcombine more thoroughly

2023-07-04 Thread Richard Biener via Gcc-patches
The following replaces the simplistic gimple_uses_undefined_value_p with the conservative mark_ssa_maybe_undefs approach as already used by LIM and IVOPTs. This is to avoid exposing an unconditional uninitialized read on a path from entry by if-combine. Boostrapped and tested on

[Bug tree-optimization/110531] Vect: slp_done_for_suggested_uf is not initialized in tree-vect-loop.cc

2023-07-04 Thread linkw at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110531 --- Comment #8 from Kewen Lin --- (In reply to Hao Liu from comment #7) > > int foo() { > > bool a = true; > > bool b; > > if (a || b) > > return 1; > > b = true; > > return 0; > > } > > > > still has the warning, it looks

[Bug target/104914] [MIPS] wrong comparison with scrabbled int value

2023-07-04 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104914 Andrew Pinski changed: What|Removed |Added CC||pinskia at gcc dot gnu.org --- Comment

Re: [PATCH] Vect: avoid using uninitialized variable (PR tree-optimization/110531)

2023-07-04 Thread Richard Biener via Gcc-patches
On Tue, Jul 4, 2023 at 10:51 AM Hao Liu OS via Gcc-patches wrote: > > slp_done_for_suggested_uf is used in vect_analyze_loop_2 without > initialization, which is undefined behavior. Initialize it to false > according to the discussion. OK > gcc/ChangeLog: > PR tree-optimization/110531

[Bug tree-optimization/110436] [14 Regression] ICE in vectorizable_live_operation, at tree-vect-loop.cc:10170

2023-07-04 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110436 Richard Biener changed: What|Removed |Added Status|NEW |RESOLVED Resolution|---

Re: [PATCH 2/2] PR 110487: `(a !=/== CST1 ? CST2 : CST3)` pattern for type safety

2023-07-04 Thread Richard Biener via Gcc-patches
On Sat, Jul 1, 2023 at 10:23 AM Andrew Pinski via Gcc-patches wrote: > > The problem here is we might produce some values out of the type's > min/max (and/or valid values, e.g. signed booleans). The fix is to > use an integer type which has the same precision and signedness > as the original

Re: [PATCH V2] i386: Inline function with default arch/tune to caller

2023-07-04 Thread Uros Bizjak via Gcc-patches
On Tue, Jul 4, 2023 at 10:32 AM Hongyu Wang wrote: > > > In a follow-up patch, can you please document inlining rules involving > > -march and -mtune to "x86 Function Attributes" section? Currently, the > > inlining rules at the end of "target function attribute" section does > > not even mention

Re: [PATCH v2] RISC-V: Fix one bug for floating-point static frm

2023-07-04 Thread juzhe.zh...@rivai.ai
LGTM. juzhe.zh...@rivai.ai From: pan2.li Date: 2023-07-04 16:08 To: gcc-patches CC: juzhe.zhong; rdapp.gcc; jeffreyalaw; pan2.li; yanzhang.wang; kito.cheng Subject: [PATCH v2] RISC-V: Fix one bug for floating-point static frm From: Pan Li This patch would like to fix one bug to align below

[PATCH] Vect: avoid using uninitialized variable (PR tree-optimization/110531)

2023-07-04 Thread Hao Liu OS via Gcc-patches
slp_done_for_suggested_uf is used in vect_analyze_loop_2 without initialization, which is undefined behavior. Initialize it to false according to the discussion. gcc/ChangeLog: PR tree-optimization/110531 * tree-vect-loop.cc (vect_analyze_loop_1): initialize

[Bug target/110533] [x86-64] naked with -O0 and register-passed struct/int128 clobbers parameters/callee-saved regs

2023-07-04 Thread ubizjak at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110533 --- Comment #2 from Uroš Bizjak --- (In reply to Andrew Pinski from comment #1) > >clobbering other parameters and callee-saved registers. > > > (insn 2 8 3 2 (set (reg:DI 84) > (reg:DI 5 di [ aD.2522 ])) "/app/example.cpp":3:25 -1 >

Re: [PATCH v1] RISC-V: Refine the insn pattern of fsrm

2023-07-04 Thread juzhe.zh...@rivai.ai
I prefer to defer this patch when you implementing dynamic rounding mode. juzhe.zh...@rivai.ai From: pan2.li Date: 2023-07-04 16:41 To: gcc-patches CC: juzhe.zhong; rdapp.gcc; jeffreyalaw; pan2.li; yanzhang.wang; kito.cheng Subject: [PATCH v1] RISC-V: Refine the insn pattern of fsrm From:

RE: [PATCH] x86: Enable ENQCMD and UINTR for march=sierraforest.

2023-07-04 Thread Cui, Lili via Gcc-patches
> -Original Message- > From: Hongtao Liu > Sent: Tuesday, July 4, 2023 4:27 PM > To: Cui, Lili > Cc: gcc-patches@gcc.gnu.org > Subject: Re: [PATCH] x86: Enable ENQCMD and UINTR for march=sierraforest. > > On Tue, Jul 4, 2023 at 4:15 PM Cui, Lili wrote: > > > > From: Lili Cui > > > >

[PATCH v1] RISC-V: Refine the insn pattern of fsrm

2023-07-04 Thread Pan Li via Gcc-patches
From: Pan Li This patch would like to introduce 2 new patter of fsrm with SImode, aka: 1. fsrmsi_backup 2. fsrmsi_restore Both patterns accept the imm and reg format, and then leverage the imm format instead of reg when RVV floating-point static rounding mode. Signed-off-by: Pan Li

[Bug tree-optimization/110436] [14 Regression] ICE in vectorizable_live_operation, at tree-vect-loop.cc:10170

2023-07-04 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110436 --- Comment #5 from CVS Commits --- The master branch has been updated by Richard Biener : https://gcc.gnu.org/g:729aa4fa48d627c4344764676edad3b65d40a003 commit r14-2288-g729aa4fa48d627c4344764676edad3b65d40a003 Author: Richard Biener Date:

[PATCH] tree-optimization/110436 - bogus live/relevant for unused pattern

2023-07-04 Thread Richard Biener via Gcc-patches
When we compute liveness and relevantness we have to make sure to handle live but not relevant stmts in a way we can later vectorize them. When the stmt uses only operands that do not need vectorization we can just leave such stmts in place - but not in the case they are recognized as patterns.

Re: [PATCH] tree-optimization/110310 - move vector epilogue disabling to analysis phase

2023-07-04 Thread Richard Biener via Gcc-patches
On Tue, 4 Jul 2023, Richard Sandiford wrote: > Richard Biener writes: > > On Tue, 4 Jul 2023, Richard Biener wrote: > > > >> On Mon, 3 Jul 2023, Richard Sandiford wrote: > >> > >> > Richard Biener writes: > >> > > The following removes late deciding to elide vectorized epilogues to > >> > >

[Bug target/104914] [MIPS] wrong comparison with scrabbled int value

2023-07-04 Thread syq at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104914 --- Comment #3 from YunQiang Su --- Ohhh, I think that the real problem is that: why DINS is used instead of INS when work with an INT?

Re: [PATCH V2] i386: Inline function with default arch/tune to caller

2023-07-04 Thread Hongyu Wang via Gcc-patches
> In a follow-up patch, can you please document inlining rules involving > -march and -mtune to "x86 Function Attributes" section? Currently, the > inlining rules at the end of "target function attribute" section does > not even mention -march and -mtune. Maybe a subsubsection "Inlining > rules"

Re: [PATCH] x86: Enable ENQCMD and UINTR for march=sierraforest.

2023-07-04 Thread Hongtao Liu via Gcc-patches
On Tue, Jul 4, 2023 at 4:15 PM Cui, Lili wrote: > > From: Lili Cui > > Hi Maintainer, > > This patch is to enable ENQCMD and UINTR for march=sierraforest according to > Intel ISE. > > Bootstrapped and regtested. Ok for trunk? And I will backport this patch to > GCC13. Ok. > > Thanks, > Lili. >

[PATCH] x86: Enable ENQCMD and UINTR for march=sierraforest.

2023-07-04 Thread Cui, Lili via Gcc-patches
From: Lili Cui Hi Maintainer, This patch is to enable ENQCMD and UINTR for march=sierraforest according to Intel ISE. Bootstrapped and regtested. Ok for trunk? And I will backport this patch to GCC13. Thanks, Lili. Enable ENQCMD and UINTR for march=sierraforest according to Intel ISE

RE: [PATCH v1] RISC-V: Fix one bug for floating-point static frm

2023-07-04 Thread Li, Pan2 via Gcc-patches
Update PATCH V2 for DYN in needed as below. https://gcc.gnu.org/pipermail/gcc-patches/2023-July/623543.html Pan From: Li, Pan2 Sent: Tuesday, July 4, 2023 2:50 PM To: juzhe.zh...@rivai.ai; gcc-patches Cc: Robin Dapp ; jeffreyalaw ; Wang, Yanzhang ; kito.cheng Subject: RE: [PATCH v1] RISC-V:

[Bug tree-optimization/110531] Vect: slp_done_for_suggested_uf is not initialized in tree-vect-loop.cc

2023-07-04 Thread hliu at amperecomputing dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110531 --- Comment #7 from Hao Liu --- > int foo() { > bool a = true; > bool b; > if (a || b) > return 1; > b = true; > return 0; > } > > still has the warning, it looks something can be improved (guess we prefer > not to emit

[COMMITTED] ada: Do not unnecessarily use component-wise loop for slice assignment

2023-07-04 Thread Marc Poulhiès via Gcc-patches
From: Eric Botcazou This relaxes the condition under which Expand_Assign_Array leaves the assignment to or from an array slice untouched. The main prerequisite for the code generator is that everything be aligned on byte boundaries and Is_Possibly_Unaligned_Slice is too strong a predicate for

[COMMITTED] ada: Small adjustments to new procedure Expand_Unchecked_Union_Equality

2023-07-04 Thread Marc Poulhiès via Gcc-patches
From: Eric Botcazou The procedure is not stable under repeated invocation. Now it may be called twice on the same node, for example during the expansion of the renaming of the predefined equality operator after the unchecked union type is frozen. gcc/ada/ * exp_ch4.ads

[COMMITTED] ada: Fix list of inherited subprograms in query for GNATprove

2023-07-04 Thread Marc Poulhiès via Gcc-patches
From: Yannick Moy The query Inherited_Subprograms was returning a list containing some subprograms whose overridding was also in the list, when interfaces was present. This was an issue for GNATprove. Now propose a mode for this function to filter out overridden primitives. gcc/ada/ *

[PATCH v2] RISC-V: Fix one bug for floating-point static frm

2023-07-04 Thread Pan Li via Gcc-patches
From: Pan Li This patch would like to fix one bug to align below items of spec. 1. By default, the RVV floating-point will take dyn mode. 2. DYN is invalid in FRM register for RVV floating-point. When mode switching the function entry and exit, it will take DYN as the frm mode. Signed-off-by:

Re: [PATCH] tree-optimization/110310 - move vector epilogue disabling to analysis phase

2023-07-04 Thread Richard Sandiford via Gcc-patches
Richard Biener writes: > On Tue, 4 Jul 2023, Richard Biener wrote: > >> On Mon, 3 Jul 2023, Richard Sandiford wrote: >> >> > Richard Biener writes: >> > > The following removes late deciding to elide vectorized epilogues to >> > > the analysis phase and also avoids altering the epilogues niter.

[PATCH V2] VECT: Apply LEN_MASK_GATHER_LOAD/SCATTER_STORE into vectorizer

2023-07-04 Thread juzhe . zhong
From: Ju-Zhe Zhong Hi, Richard and Richi. The len_mask_gather_load/len_mask_scatter_store patterns have been added. Now, this patch applies them into vectorizer. Here is the example: void f (int *restrict a, int *restrict b, int n, int base, int step, int *restrict cond) { for (int

[Bug tree-optimization/107004] [12 Regression] GCC12 warning in OOB access: array subscript is partly outside array bounds

2023-07-04 Thread sbouchex at infovista dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107004 --- Comment #7 from sbouchex --- (In reply to sbouchex from comment #6) > The same testcase is failing on : > > [...] > g++ --version > g++ (GCC) 13.1.1 20230614 (Red Hat 13.1.1-4) > [...] > > [...] > [root@dev-sbo-eva-ol8 CorrCommon]# g++

[Bug tree-optimization/107004] [12 Regression] GCC12 warning in OOB access: array subscript is partly outside array bounds

2023-07-04 Thread sbouchex at infovista dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107004 sbouchex changed: What|Removed |Added CC||sbouchex at infovista dot com --- Comment

Re: [PATCH] vect: Treat vector widening IFN calls as 'simple' [PR110436]

2023-07-04 Thread Richard Biener via Gcc-patches
On Tue, 4 Jul 2023, Richard Biener wrote: > On Mon, 3 Jul 2023, Andre Vieira (lists) wrote: > > > Hi, > > > > This patch makes the vectorizer treat any vector widening IFN as simple, > > like > > it did with the tree codes VEC_WIDEN_*. > > > > I wasn't sure whether I should make all IFN's

Re: [PATCH] vect: Treat vector widening IFN calls as 'simple' [PR110436]

2023-07-04 Thread Richard Biener via Gcc-patches
On Mon, 3 Jul 2023, Andre Vieira (lists) wrote: > Hi, > > This patch makes the vectorizer treat any vector widening IFN as simple, like > it did with the tree codes VEC_WIDEN_*. > > I wasn't sure whether I should make all IFN's simple and then exclude some > (like GOMP_ ones), or include more

Re: [PATCH] tree-optimization/110310 - move vector epilogue disabling to analysis phase

2023-07-04 Thread Richard Biener via Gcc-patches
On Tue, 4 Jul 2023, Richard Biener wrote: > On Mon, 3 Jul 2023, Richard Sandiford wrote: > > > Richard Biener writes: > > > The following removes late deciding to elide vectorized epilogues to > > > the analysis phase and also avoids altering the epilogues niter. > > > The costing part from

[Bug middle-end/110495] fre introduces signed wrap for vector

2023-07-04 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110495 Richard Biener changed: What|Removed |Added Resolution|--- |FIXED Status|ASSIGNED

[Bug tree-optimization/53947] [meta-bug] vectorizer missed-optimizations

2023-07-04 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53947 Bug 53947 depends on bug 110310, which changed state. Bug 110310 Summary: vector epilogue handling is inefficient https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110310 What|Removed |Added

[Bug tree-optimization/110310] vector epilogue handling is inefficient

2023-07-04 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110310 Richard Biener changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution|---

[Bug middle-end/110495] fre introduces signed wrap for vector

2023-07-04 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110495 --- Comment #4 from CVS Commits --- The master branch has been updated by Richard Biener : https://gcc.gnu.org/g:f703d2fd3f03890a180e8cc04df087c208999e81 commit r14-2282-gf703d2fd3f03890a180e8cc04df087c208999e81 Author: Richard Biener Date:

[Bug tree-optimization/110310] vector epilogue handling is inefficient

2023-07-04 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110310 --- Comment #6 from CVS Commits --- The master branch has been updated by Richard Biener : https://gcc.gnu.org/g:0682a32c026f1e246eb07bb8066abca4636f01d8 commit r14-2281-g0682a32c026f1e246eb07bb8066abca4636f01d8 Author: Richard Biener Date:

[PATCH][v2] middle-end/110495 - avoid associating constants with (VL) vectors

2023-07-04 Thread Richard Biener via Gcc-patches
When trying to associate (v + INT_MAX) + INT_MAX we are using the TREE_OVERFLOW bit to check for correctness. That isn't working for VECTOR_CSTs and it can't in general when one considers VL vectors. It looks like it should work for COMPLEX_CSTs but I didn't try to single out _Complex int in

Re: [PATCH] tree-optimization/110310 - move vector epilogue disabling to analysis phase

2023-07-04 Thread Richard Biener via Gcc-patches
On Mon, 3 Jul 2023, Richard Sandiford wrote: > Richard Biener writes: > > The following removes late deciding to elide vectorized epilogues to > > the analysis phase and also avoids altering the epilogues niter. > > The costing part from vect_determine_partial_vectors_and_peeling is > > moved to

[Bug middle-end/110228] [13/14 Regression] llvm-16 miscompiled due to an maybe uninitialized variable

2023-07-04 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110228 Richard Biener changed: What|Removed |Added Status|NEW |ASSIGNED

[Bug tree-optimization/110531] Vect: slp_done_for_suggested_uf is not initialized in tree-vect-loop.cc

2023-07-04 Thread linkw at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110531 --- Comment #6 from Kewen Lin --- It's an arguable topic, I can't find the thread that previously some reviewers told me it's not always good to initialize the local variable. IIRC, the case is that I initialized one variable at the top, but

RE: [PATCH v1] RISC-V: Fix one bug for floating-point static frm

2023-07-04 Thread Li, Pan2 via Gcc-patches
Thanks Juzhe, passed all the test of riscv.exp and rvv.exp, will commit it with the reverted one with the final approval. Pan From: juzhe.zh...@rivai.ai Sent: Tuesday, July 4, 2023 1:53 PM To: Li, Pan2 ; gcc-patches Cc: Robin Dapp ; jeffreyalaw ; Li, Pan2 ; Wang, Yanzhang ; kito.cheng

Re: ping^^^^: [PATCH V2] rs6000: Enhance lowpart/highpart DI->SF by mtvsrws/mtvsrd

2023-07-04 Thread Jiufu Guo via Gcc-patches
Hi, I just submit a new version: https://gcc.gnu.org/pipermail/gcc-patches/2023-July/623533.html So, we could ignore this ping and check the new version. BR, Jeff (Jiufu Guo) Jiufu Guo via Gcc-patches writes: > Hi, > > Gentle ping ... > > Jiufu Guo via Gcc-patches writes: > >> Gentle

<    1   2   3   >