[Bug tree-optimization/114099] [14 regression] ICE in find_uses_to_rename_use when building darktable-4.6.1

2024-02-25 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114099

Andrew Pinski  changed:

   What|Removed |Added

   Last reconfirmed||2024-02-25
   Keywords||needs-bisection
 Status|UNCONFIRMED |NEW
  Component|middle-end  |tree-optimization
 Ever confirmed|0   |1
   Target Milestone|--- |14.0

--- Comment #6 from Andrew Pinski  ---
Confirmed.

[Bug tree-optimization/114099] [14 regression] ICE in find_uses_to_rename_use when building darktable-4.6.1

2024-02-25 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114099

Andrew Pinski  changed:

   What|Removed |Added

 CC||tnfchris at gcc dot gnu.org

--- Comment #7 from Andrew Pinski  ---
Note the difference between noreturn vs __builtin_unreachable BB is the
noreturn bb has:
  # _21 = PHI <_2(4)>
  m = _21;

But the one with unreachable does not.
It feels like that difference is causing the issue here. Replacing unreachable
with another noreturn function removes the ICE even.

I am 99% sure this is related to the early out vect changes too.

[Bug tree-optimization/114099] [14 regression] ICE in find_uses_to_rename_use when building darktable-4.6.1

2024-02-25 Thread tnfchris at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114099

--- Comment #8 from Tamar Christina  ---
Created attachment 57537
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=57537&action=edit
uses.patch

new code seems sensitive to visitation order as get_virtual_phi returns NULL
for blocks which don't define or use a virtual PHI.

testing patch.

[Bug tree-optimization/114099] [14 regression] ICE in find_uses_to_rename_use when building darktable-4.6.1

2024-02-26 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114099

Richard Biener  changed:

   What|Removed |Added

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

--- Comment #9 from Richard Biener  ---
Let me handle this as well.

[Bug tree-optimization/114099] [14 regression] ICE in find_uses_to_rename_use when building darktable-4.6.1

2024-02-26 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114099

--- Comment #10 from GCC Commits  ---
The master branch has been updated by Richard Biener :

https://gcc.gnu.org/g:fb68e2cac1283f731a3a979cb714621afb1ddfcc

commit r14-9182-gfb68e2cac1283f731a3a979cb714621afb1ddfcc
Author: Richard Biener 
Date:   Mon Feb 26 12:27:42 2024 +0100

tree-optimization/114099 - virtual LC PHIs and early exit vect

In some cases exits can lack LC PHI nodes for the virtual operand.
We have to create them when the epilog loop requires them which also
allows us to remove some only halfway correct fixups.  This is the
variant triggering for alternate exits.

PR tree-optimization/114099
* tree-vect-loop-manip.cc (slpeel_tree_duplicate_loop_to_edge_cfg):
Create and fill in a needed virtual LC PHI for the alternate
exits.  Remove code dealing with that missing.

* gcc.dg/vect/vect-early-break_120-pr114099.c: New testcase.

[Bug tree-optimization/114099] [14 regression] ICE in find_uses_to_rename_use when building darktable-4.6.1

2024-02-26 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114099

Richard Biener  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED

--- Comment #11 from Richard Biener  ---
Fixed.