[Bug tree-optimization/125202] [14/15/16/17 Regression] wrong code at -O1

2026-06-26 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=125202

Jakub Jelinek  changed:

   What|Removed |Added

   Target Milestone|14.4|14.5

--- Comment #7 from Jakub Jelinek  ---
GCC 14.4 is being released, retargeting bugs to GCC 14.5.

[Bug tree-optimization/125202] [14/15/16/17 Regression] wrong code at -O1

2026-05-08 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=125202

Drea Pinski  changed:

   What|Removed |Added

 Status|NEW |ASSIGNED
   Assignee|unassigned at gcc dot gnu.org  |pinskia at gcc dot 
gnu.org

--- Comment #6 from Drea Pinski  ---
Maybe something like r15-5916 is needed for cfgcleanup ...
I will give this a look this weekend.

[Bug tree-optimization/125202] [14/15/16/17 Regression] wrong code at -O1

2026-05-07 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=125202

--- Comment #5 from Drea Pinski  ---
(In reply to Kael Franco from comment #3)
> f2d6beb7a4ddf18dd95fdcc336181a8702a9f55f is the first bad commit.
> It makes testcase segfault instead of hang.

https://gcc.gnu.org/cgit/gcc/commit/?id=f2d6beb7a4ddf18dd95fdcc336181a8702a9f55f

So i think this exposed the issue. 
get_max_loop_iterations_int is returning the wrong value.

So someone does not updates niter correctly. Maybe cfgcleanup removing the
conditional which is not needed.

We only remove it after the loop creation because of the predicate there.

Let me look to see if I can fix that too.

[Bug tree-optimization/125202] [14/15/16/17 Regression] wrong code at -O1

2026-05-07 Thread kaelfandrew at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=125202

--- Comment #4 from Kael Franco  ---
(In reply to Kael Franco from comment #3)
> f2d6beb7a4ddf18dd95fdcc336181a8702a9f55f is the first bad commit.
> It makes testcase segfault instead of hang.
> 
> Need to apply these 3 commits to git bisect to the first bad commit:
> 9970b576b7e4ae337af1268395ff221348c4b34a
> 046776dac7cc74bdbab36f450af80644a045858a
> 51b9a0f7dfd2441a30e0ebfd4b30f18f86b4ea54

This is my git bisect log:

git bisect start
# status: waiting for both good and bad commits
# good: [8e08c7886eed5824bebd0e011526ec302d622844] ipa: Fix double
reference-count decrements for the same edge (PR 107769, PR 109318)
git bisect good 8e08c7886eed5824bebd0e011526ec302d622844
# status: waiting for bad commit, 1 good commit known
# bad: [17ef8f931d69752503ec98e707e85e8a67857e1c] fortran: Fix character SPREAD
intrinsic lowering [PR109788]
git bisect bad 17ef8f931d69752503ec98e707e85e8a67857e1c
# bad: [2514a331835e055a963fd059dc5770e5ae500af0] arm: vld1q_types_x3 ACLE
intrinsics
git bisect bad 2514a331835e055a963fd059dc5770e5ae500af0
# bad: [4271b7422fd901f603e13371e4fff1e1807b1578] Daily bump.
git bisect bad 4271b7422fd901f603e13371e4fff1e1807b1578
# bad: [c4deccd44655c5d748dfed200a37f2b678c32fe8] rs6000: Remove duplicate
expression [PR106907]
git bisect bad c4deccd44655c5d748dfed200a37f2b678c32fe8
# bad: [be373b5488d0b158a4837ff2d53012a923d8f152] arm: [MVE intrinsics]
factorize vsriq
git bisect bad be373b5488d0b158a4837ff2d53012a923d8f152
# bad: [f385252b2336a4a57a30fddf82e558c73bcc85cc] tree-optimization/109672 -
properly check emulated plus during vect
git bisect bad f385252b2336a4a57a30fddf82e558c73bcc85cc
# good: [2abc7b68ae9e5becf9ef7c1776293a11d05f3229] MAINTAINERS: fix sorting of
names
git bisect good 2abc7b68ae9e5becf9ef7c1776293a11d05f3229
# good: [efa1276480d2b12725c32614e97d3a506e393bb3] libstdc++: Remove obsolete
options from Doxygen config
git bisect good efa1276480d2b12725c32614e97d3a506e393bb3
# bad: [065be0ffbcd676b635d492f4679e635b6ece4fe4] RISC-V: Add divmod expansion
support
git bisect bad 065be0ffbcd676b635d492f4679e635b6ece4fe4
# bad: [9ffddbfc738a941ca3d32187a0e3f2616c7dd522] Implement range-op entry for
sin/cos
git bisect bad 9ffddbfc738a941ca3d32187a0e3f2616c7dd522
# bad: [ba9975a259656d099b67ad2b9c69bf970be2b210] PHIOPT: Move
store_elim_worker into pass_cselim::execute
git bisect bad ba9975a259656d099b67ad2b9c69bf970be2b210
# good: [b5f04a4db59f61f416f23801902cbf4d0f50dc15] Use CONFIG_SHELL-/bin/sh in
genmultilib
git bisect good b5f04a4db59f61f416f23801902cbf4d0f50dc15
# bad: [b26ce75ef5498398f44641ed6ebef49ff65ba77b] MAINTAINERS: Change my email
address.
git bisect bad b26ce75ef5498398f44641ed6ebef49ff65ba77b
# bad: [f2d6beb7a4ddf18dd95fdcc336181a8702a9f55f] Unloop loops that no longer
loops in tree-ssa-loop-ch
git bisect bad f2d6beb7a4ddf18dd95fdcc336181a8702a9f55f
# good: [65369ab62cee68eb7f6ef65e3d12d1969a9e20ee] tree-optimization/109170 -
bogus use-after-free with __builtin_expect
git bisect good 65369ab62cee68eb7f6ef65e3d12d1969a9e20ee
# first bad commit: [f2d6beb7a4ddf18dd95fdcc336181a8702a9f55f] Unloop loops
that no longer loops in tree-ssa-loop-ch

[Bug tree-optimization/125202] [14/15/16/17 Regression] wrong code at -O1

2026-05-07 Thread kaelfandrew at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=125202

Kael Franco  changed:

   What|Removed |Added

 CC||kaelfandrew at gmail dot com

--- Comment #3 from Kael Franco  ---
f2d6beb7a4ddf18dd95fdcc336181a8702a9f55f is the first bad commit.
It makes testcase segfault instead of hang.

Need to apply these 3 commits to git bisect to the first bad commit:
9970b576b7e4ae337af1268395ff221348c4b34a
046776dac7cc74bdbab36f450af80644a045858a
51b9a0f7dfd2441a30e0ebfd4b30f18f86b4ea54