[Bug tree-optimization/109604] [14 Regression] ICE during GIMPLE pass: phiopt since r14-169-g84325f1c6aa3c5

2023-04-24 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109604

Andrew Pinski  changed:

   What|Removed |Added

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

--- Comment #5 from Andrew Pinski  ---
Fixed.

[Bug tree-optimization/109604] [14 Regression] ICE during GIMPLE pass: phiopt since r14-169-g84325f1c6aa3c5

2023-04-24 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109604

--- Comment #4 from CVS Commits  ---
The trunk branch has been updated by Andrew Pinski :

https://gcc.gnu.org/g:2f58dd71d1b8e23f28a43360742519e92ee0c8d5

commit r14-199-g2f58dd71d1b8e23f28a43360742519e92ee0c8d5
Author: Andrew Pinski 
Date:   Thu Apr 20 09:23:25 2023 -0700

PHIOPT: Move check on diamond bb to tree_ssa_phiopt_worker from
minmax_replacement

This moves the check to make sure on the diamond shaped form bbs that
the the two middle bbs are only for that diamond shaped form earlier
in the shared code.
Also remove the redundant check for single_succ_p since that was already
done before hand.
The next patch will simplify the code even further and remove redundant
checks.

PR tree-optimization/109604

gcc/ChangeLog:

* tree-ssa-phiopt.cc (tree_ssa_phiopt_worker): Move the
diamond form check from ...
(minmax_replacement): Here.

gcc/testsuite/ChangeLog:

* gcc.c-torture/compile/pr109604-1.c: New test.
* gcc.c-torture/compile/pr109604-2.c: New test.

[Bug tree-optimization/109604] [14 Regression] ICE during GIMPLE pass: phiopt since r14-169-g84325f1c6aa3c5

2023-04-24 Thread dcb314 at hotmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109604

--- Comment #3 from David Binderman  ---
Another test case, this time in C++:

struct {
  int second;
} selectPlayer_playerRes;
int selectPlayer_playerRes_0;
int selectPlayer() {
  if (selectPlayer_playerRes_0 && selectPlayer_playerRes.second >= 0)
return selectPlayer_playerRes.second;
  else
return -1;
}

[Bug tree-optimization/109604] [14 Regression] ICE during GIMPLE pass: phiopt since r14-169-g84325f1c6aa3c5

2023-04-24 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109604

--- Comment #2 from Andrew Pinski  ---
I had already posted a fix for this (and approved already):
https://gcc.gnu.org/pipermail/gcc-patches/2023-April/616499.html

I will add the testcase.

[Bug tree-optimization/109604] [14 Regression] ICE during GIMPLE pass: phiopt since r14-169-g84325f1c6aa3c5

2023-04-24 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109604

Andrew Pinski  changed:

   What|Removed |Added

   Keywords||ice-on-valid-code
   Assignee|unassigned at gcc dot gnu.org  |pinskia at gcc dot 
gnu.org
 Status|NEW |ASSIGNED

[Bug tree-optimization/109604] [14 Regression] ICE during GIMPLE pass: phiopt since r14-169-g84325f1c6aa3c5

2023-04-24 Thread marxin at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109604

Martin Liška  changed:

   What|Removed |Added

Summary|[14 Regression] ice during  |[14 Regression] ICE during
   |GIMPLE pass: phiopt |GIMPLE pass: phiopt since
   ||r14-169-g84325f1c6aa3c5
   Last reconfirmed||2023-04-24
 Status|UNCONFIRMED |NEW
 Ever confirmed|0   |1
 CC||marxin at gcc dot gnu.org

--- Comment #1 from Martin Liška  ---
Started with r14-169-g84325f1c6aa3c5.