Re: Using ranger from cfgexpand

2023-09-02 Thread Jeff Law via Gcc
On 9/2/23 18:40, Andrew Pinski via Gcc wrote: Hi, I was trying to use the ranger from inside of cfgexpand but since at this point we have a mix of RTL and gimple basic blocks, things fall over very fast. First does it make sense to use the ranger from expand or should we change the gimple

Using ranger from cfgexpand

2023-09-02 Thread Andrew Pinski via Gcc
Hi, I was trying to use the ranger from inside of cfgexpand but since at this point we have a mix of RTL and gimple basic blocks, things fall over very fast. First does it make sense to use the ranger from expand or should we change the gimple IR in isel instead if we have a better way of doing

gcc-13-20230902 is now available

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

[PATCH 1/3] Improve ssa_name_has_boolean_range slightly

2023-09-02 Thread Andrew Pinski via Gcc-patches
Right now ssa_name_has_boolean_range compares the range to range_true_and_false but instead we would get the nonzero bits and compare that to 1 instead (<=u 1). The nonzerobits comparison can be done in similar fashion. Note I think get_nonzero_bits is redundant as the range queury will return a

[PATCH 3/3] MATCH: Replace all uses of ssa_name_has_boolean_range with zero_one_valued_p

2023-09-02 Thread Andrew Pinski via Gcc-patches
This replaces all uses of ssa_name_has_boolean_range with zero_one_valued_p except for the one in the definition of zero_one_valued_p. This simplifies the code in general and makes only one way of saying we have a range of [0,1]. Note this depends on the patch that adds ssa_name_has_boolean_range

[PATCH 2/3] MATCH: Improve zero_one_valued_p by using ssa_name_has_boolean_range

2023-09-02 Thread Andrew Pinski via Gcc-patches
Currently zero_one_valued_p uses tree_nonzero_bits which uses the global ranges of the SSA Names. We can improve this via using ssa_name_has_boolean_range which uses the local ranges which are used while handling folding during VRP and other passes. OK? Bootstrapped and tested on x86_64 with no

[Bug tree-optimization/52708] suboptimal code with __builtin_constant_p

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

☠ Buildbot (Sourceware): gccrust - failed '! grep ...' (failure) (master)

2023-09-02 Thread builder--- via Gcc-rust
A failed build has been detected on builder gccrust-gentoo-sparc while building gccrust. Full details are available at: https://builder.sourceware.org/buildbot/#builders/241/builds/954 Build state: failed '! grep ...' (failure) Revision: abf727d29eb7d70e238fd837921f2e5fb4e3fec0 Worker:

[Bug tree-optimization/67628] [tree-optimization] (a && b) && c shows better codegen than a && (b && c)

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

[Bug tree-optimization/105832] [13/14 Regression] Dead Code Elimination Regression at -O3 (trunk vs. 12.1.0)

2023-09-02 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105832 --- Comment #15 from Andrew Pinski --- So there is a pattern for: /* Simplify ((C <> x) & D) != 0 where C and D are power of two constants, either to false if D is smaller (unsigned comparison) than C, or to x == log2 (D) - log2 (C).

[Bug c++/111274] ice in fixup_blocks_walker with -O1 and -fopenmp

2023-09-02 Thread dcb314 at hotmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111274 --- Comment #6 from David Binderman --- $ git bisect good 143151ac2013c22e 53891f18f32588d86ba0ec1c5e6206df63be714b is the first bad commit commit 53891f18f32588d86ba0ec1c5e6206df63be714b Author: Sandra Loosemore Date: Thu Aug 24 17:35:00

[Bug c++/111274] ice in fixup_blocks_walker with -O1 and -fopenmp

2023-09-02 Thread dcb314 at hotmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111274 --- Comment #3 from David Binderman --- All the OpenMP commits in that range are by Sandra Loosemore . Not sure yet, but a likely candidate so far.

[Bug c++/111274] ice in fixup_blocks_walker with -O1 and -fopenmp

2023-09-02 Thread sandra at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111274 sandra at gcc dot gnu.org changed: What|Removed |Added Last reconfirmed||2023-09-02

[Bug libstdc++/83077] sso-string @ gnu-versioned-namespace.

2023-09-02 Thread iains at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83077 --- Comment #9 from Iain Sandoe --- (In reply to Iain Sandoe from comment #8) > (In reply to François Dumont from comment #7) > > Sure, if you follow the email thread you'll see my latest patch: > > > >

[Bug c++/111274] ice in fixup_blocks_walker with -O1 and -fopenmp

2023-09-02 Thread sandra at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111274 --- Comment #8 from sandra at gcc dot gnu.org --- Created attachment 55832 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=55832=edit first attempt at fix

[Bug c++/111274] ice in fixup_blocks_walker with -O1 and -fopenmp

2023-09-02 Thread sandra at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111274 --- Comment #9 from sandra at gcc dot gnu.org --- The problem is that it's tripping over a BIND_EXPR with a null BIND_EXPR_BLOCK. The attached patch stops the testcase from ICE'ing but hasn't been otherwise tested yet. I'm not sure what a null

[Bug analyzer/110529] Analyzer fails to handle computed goto

2023-09-02 Thread dmalcolm at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110529 David Malcolm changed: What|Removed |Added Status|UNCONFIRMED |NEW

[Bug tree-optimization/111273] Spurious array-bounds error when copying data using _GLIBCXX_DEBUG iterators

2023-09-02 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111273 --- Comment #1 from Jonathan Wakely --- That's not an error, it's a warning. It's only an error because you asked for it to be an error.

RE: [PATCH v1] RISC-V: Support FP MAX/MIN autovec for VLS mode

2023-09-02 Thread Li, Pan2 via Gcc-patches
Committed, thanks Kito. Pan From: Kito Cheng Sent: Saturday, September 2, 2023 11:41 PM To: Li, Pan2 Cc: gcc-patches@gcc.gnu.org; juzhe.zh...@rivai.ai; Wang, Yanzhang Subject: Re: [PATCH v1] RISC-V: Support FP MAX/MIN autovec for VLS mode Ok Pan Li via Gcc-patches

[Bug c++/111274] ice in fixup_blocks_walker with -O1 and -fopenmp

2023-09-02 Thread dcb314 at hotmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111274 --- Comment #1 from David Binderman --- Reduced C++ code seems to be: struct _Vector_base { ~_Vector_base(); }; int ColumnSmallestLastOrdering_OMP_i_MaxNumThreads, ColumnSmallestLastOrdering_OMP_i_MaxDegree; void

[Bug analyzer/111213] -Wanalyzer-out-of-bounds false negative with `return arr[9];` at -O1 and above

2023-09-02 Thread dmalcolm at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111213 David Malcolm changed: What|Removed |Added Summary|-Wanalyzer-out-of-bounds|-Wanalyzer-out-of-bounds

[Bug tree-optimization/110131] [12/13/14 Regression] Missed Dead Code Elimination when using __builtin_unreachable since r12-6924-gc2b610e7c6c

2023-09-02 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110131 --- Comment #9 from Andrew Pinski --- (In reply to Andrew Pinski from comment #4) > So maybe: > ``` > (simplify > (cond > (eq:c@3 (convert1? @0) INTEGER_CST@1) > (convert2? @0) > INTEGER_CST@2 > ) > (if (INTEGRAL_TYPE_P (type)) >

[Bug middle-end/104986] [12/13/14 Regression] bogus writing 1 byte into a region of size 0 with -fwrapv and -O2 -fpeel-loops since r12-4698-gf6d012338bf87f42

2023-09-02 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104986 Andrew Pinski changed: What|Removed |Added Keywords||needs-bisection Known to work|

[Bug tree-optimization/110413] [14 Regression] Missed Dead Code Elimination when using __builtin_unreachable since r14-1880-g827e208fa64

2023-09-02 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110413 --- Comment #2 from Andrew Pinski --- I noticed on many of these, the return value of the static function is an address (constant). Seems like we could do something like IPA-CCP for return values. And that will fix almost all of them ...

[Bug tree-optimization/111275] New: ifcombine and reassociation does not like to produce `a ^ b` sometimes

2023-09-02 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111275 Bug ID: 111275 Summary: ifcombine and reassociation does not like to produce `a ^ b` sometimes Product: gcc Version: 14.0 Status: UNCONFIRMED Keywords:

[Bug tree-optimization/111276] New: rewrite_to_defined_overflow rewrites already defined code

2023-09-02 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111276 Bug ID: 111276 Summary: rewrite_to_defined_overflow rewrites already defined code Product: gcc Version: 14.0 Status: UNCONFIRMED Keywords: compile-time-hog,

[Bug tree-optimization/111276] rewrite_to_defined_overflow rewrites already defined code

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

[Bug middle-end/63311] [11/12 Regression] -O1 optimization introduces valgrind warning

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

[Bug tree-optimization/103536] Suboptimal codegen for && and || combination.

2023-09-02 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103536 --- Comment #4 from Andrew Pinski --- Note with `--param=logical-op-non-short-circuit=0` this is optimized earlier due to getting many bb instead of ``` _1 = a_4(D) | b_5(D); if (_1 != 0) goto ; [INV] else goto ; [INV] : _2

[Bug c++/111274] ice in fixup_blocks_walker with -O1 and -fopenmp

2023-09-02 Thread dcb314 at hotmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111274 --- Comment #2 from David Binderman --- In git, there are 71 commits, so trying g:c28c579f0dd9cd27.

[Bug tree-optimization/110131] [12/13/14 Regression] Missed Dead Code Elimination when using __builtin_unreachable since r12-6924-gc2b610e7c6c

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

[Bug tree-optimization/25643] VRP does not remove -fbounds-check for Fortran

2023-09-02 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=25643 --- Comment #14 from Andrew Pinski --- So the difference now is: ``` void f0(int n, float *v) { int i; if (n <= 0) return; else { i = 1; do { if (i > n) __builtin_abort (); v[i] = 0.0; i++;

Re: [PATCH v1] RISC-V: Support FP MAX/MIN autovec for VLS mode

2023-09-02 Thread Kito Cheng via Gcc-patches
Ok Pan Li via Gcc-patches 於 2023年9月2日 週六,16:54寫道: > From: Pan Li > > This patch would like to allow the VLS mode autovec for the > floating-point binary operation MAX/MIN. > > Given below code example: > > test (float *out, float *in1, float *in2) > { > for (int i = 0; i < 128; i++) >

[Bug rtl-optimization/99199] [11/12/13/14 Regression] Very large boolean expression leads to quite a few return statements

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

[Bug rtl-optimization/31889] compiler misses opportunity to combine multiple identical function return paths

2023-09-02 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=31889 --- Comment #6 from Andrew Pinski --- (In reply to Andrew Pinski from comment #5) > Except it is no longer fixed by that. That broke in GCC 10. It broke in GCC 10 because we now have: ``` if (_10 < _12) goto ; [1.04%] else goto ;

[Bug c++/111274] ice in fixup_blocks_walker with -O1 and -fopenmp

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

[Bug c++/102609] [C++23] P0847R7 - Deducing this

2023-09-02 Thread gasper.azman at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102609 --- Comment #19 from Gašper Ažman --- Correct, the use of the capture is the source of the error, not the instantiation with an unrelated type. On Sat, Sep 2, 2023, 09:54 waffl3x at protonmail dot com < gcc-bugzi...@gcc.gnu.org> wrote: >

[Bug c++/111274] ice in fixup_blocks_walker with -O1 and -fopenmp

2023-09-02 Thread dcb314 at hotmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111274 --- Comment #4 from David Binderman --- Git range is g:4024ddbe50c2d1cb .. g:87f9b6c2cfd7b829, so 9 commits left.

Re: [PATCH 9/12] libgcc _BitInt support [PR102989]

2023-09-02 Thread Jakub Jelinek via Gcc-patches
On Fri, Sep 01, 2023 at 09:48:22PM +, Joseph Myers wrote: > This patch is OK with these fixes. Thanks, here is an updated patch, thanks for catching the _Decimal128 bug. Will post testsuite additions/adjustment patch as follow-up on Monday. 2023-09-02 Jakub Jelinek PR c/102989

Re: [PATCH 14/12] libgcc _BitInt helper documentation [PR102989]

2023-09-02 Thread Jakub Jelinek via Gcc-patches
On Fri, Sep 01, 2023 at 09:32:22PM +, Joseph Myers wrote: > This patch is OK with those fixes. Thanks, here is the updated patch. Queued with the rest of approved patches. 2023-09-02 Jakub Jelinek PR c/102989 gcc/ * doc/libgcc.texi (Bit-precise integer arithmetic

[pushed] wwwdocs: *: Use "back end" instead of "backend"

2023-09-02 Thread Gerald Pfeifer
Per http://gcc.gnu.org/codingconventions.html#Spelling Pushed. Gerald --- htdocs/egcs-1.0/index.html| 2 +- htdocs/egcs-1.1/features.html | 2 +- htdocs/egcs-1.1/index.html| 2 +- htdocs/gcc-11/changes.html| 2 +- htdocs/gcc-12/changes.html| 2 +-

[Bug c++/111274] New: ice in fixup_blocks_walker with -O1 and -fopenmp

2023-09-02 Thread dcb314 at hotmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111274 Bug ID: 111274 Summary: ice in fixup_blocks_walker with -O1 and -fopenmp Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3

[PATCH 1/2] LoongArch: Optimize switch with sign-extended index.

2023-09-02 Thread Lulu Cheng
The patch refers to the submission of RISCV 7bbce9b50302959286381d9177818642bceaf301. gcc/ChangeLog: * config/loongarch/loongarch.cc (loongarch_extend_comparands): In unsigned QImode test, check for sign extended subreg and/or constant operands, and do a sign extend in

[PATCH] MATCH: `(nop_convert)-(convert)a` into -(convert)a if we are converting from something smaller

2023-09-02 Thread Andrew Pinski via Gcc-patches
This allows removal of one conversion and in the case of booleans, might be able to remove the negate and the other conversion later on. OK? Bootstrapped and tested on x86_64-linux-gnu with no regressions. PR tree-optimization/107137 gcc/ChangeLog: * match.pd

[Bug tree-optimization/107137] (unsigned)-(int)(bool_var) should be optimized to -(unsigned)bool_var

2023-09-02 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107137 Andrew Pinski changed: What|Removed |Added URL|https://gcc.gnu.org/piperma |https://gcc.gnu.org/piperma

[Bug libstdc++/83077] sso-string @ gnu-versioned-namespace.

2023-09-02 Thread fdumont at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83077 --- Comment #7 from François Dumont --- Sure, if you follow the email thread you'll see my latest patch: https://gcc.gnu.org/pipermail/gcc-patches/2023-August/628399.html

[Bug tree-optimization/107765] missing (int)-(unsigned)int_val to just -int_val if int_val is known not to contain INT_MIN

2023-09-02 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107765 --- Comment #5 from Andrew Pinski --- (In reply to Andrew Pinski from comment #4) > (In reply to Andrew Pinski from comment #2) > > Patch posted: > > https://gcc.gnu.org/pipermail/gcc-patches/2023-September/629018.html > > What I can do is

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

2023-09-02 Thread Eric Botcazou via Gcc-patches
> This should be fixed now. I rewrote the test to check the padding byte > directly, instead of inspecting a copy of it which might not preserve > the padding bits. Great, thanks! -- Eric Botcazou

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

2023-09-02 Thread waffl3x via Gcc-patches
Hey Jakub, thanks for the response and criticism, as soon as I am back at a computer I will address the issues you raised, I have a few questions though. I apologize in advanced for any errors in formatting this message, I'm writing it from a hotel room on a phone so errors are inevitable, but

[Bug c++/102609] [C++23] P0847R7 - Deducing this

2023-09-02 Thread waffl3x at protonmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102609 --- Comment #18 from waffl3x --- (In reply to Gašper Ažman from comment #17) > Read through the patch quickly, want to suggest a few tests. > > When a lambda has captures, the explicit object parameter is used to get at > them *silently*, if

[Bug libstdc++/83077] sso-string @ gnu-versioned-namespace.

2023-09-02 Thread iains at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83077 --- Comment #8 from Iain Sandoe --- (In reply to François Dumont from comment #7) > Sure, if you follow the email thread you'll see my latest patch: > > https://gcc.gnu.org/pipermail/gcc-patches/2023-August/628399.html Well, I thought I have

[Bug tree-optimization/107765] missing (int)-(unsigned)int_val to just -int_val if int_val is known not to contain INT_MIN

2023-09-02 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107765 Andrew Pinski changed: What|Removed |Added URL|https://gcc.gnu.org/piperma |

[PATCH v2] LoongArch: Support storing floating-point zero into MEM[base + index].

2023-09-02 Thread Guo Jie
v2: Modify commit message. gcc/ChangeLog: * config/loongarch/loongarch.md: Support 'G' -> 'k' in movsf_hardfloat and movdf_hardfloat. gcc/testsuite/ChangeLog: * gcc.target/loongarch/const-double-zero-stx.c: New test. --- gcc/config/loongarch/loongarch.md

[Bug libstdc++/111050] [11/12/13/14 Regression] ABI break in _Hash_node_value_base since GCC 11

2023-09-02 Thread fdumont at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111050 --- Comment #3 from François Dumont --- For sure _Hash_node layout didn't change, that's why I couldn't think of any abi issue here. I see that you already had the solution ! It was some kind of test then, I failed :-). Did you try it ? If

Re: [PATCH 1/2] LoongArch: Optimize switch with sign-extended index.

2023-09-02 Thread WANG Xuerui
On 9/2/23 14:24, Lulu Cheng wrote: The patch refers to the submission of RISCV 7bbce9b50302959286381d9177818642bceaf301. gcc/ChangeLog: * config/loongarch/loongarch.cc (loongarch_extend_comparands): In unsigned QImode test, check for sign extended subreg and/or constant

[PATCH v1] RISC-V: Support FP MAX/MIN autovec for VLS mode

2023-09-02 Thread Pan Li via Gcc-patches
From: Pan Li This patch would like to allow the VLS mode autovec for the floating-point binary operation MAX/MIN. Given below code example: test (float *out, float *in1, float *in2) { for (int i = 0; i < 128; i++) out[i] = in1[i] > in2[i] ? in1[i] : in2[i]; // Or out[i] = fmax