[Bug tree-optimization/111383] [12/13/14 Regression] Wrong code at -Os on x86_64-linux-gnu since r12-5138-ge82c382971

2023-10-20 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111383
Bug 111383 depends on bug 110233, which changed state.

Bug 110233 Summary: [12/13/14 Regression] Wrong code at -Os on x86_64-linux-gnu
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110233

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |DUPLICATE

[Bug tree-optimization/111383] [12/13/14 Regression] Wrong code at -Os on x86_64-linux-gnu since r12-5138-ge82c382971

2023-10-20 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111383

--- Comment #7 from CVS Commits  ---
The master branch has been updated by Richard Biener :

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

commit r14-4791-ga1fc2cc0a8a8b97dbc3dc6715fd4f384d9204845
Author: Richard Biener 
Date:   Fri Oct 20 15:52:09 2023 +0200

tree-optimization/111383 - testcase for fixed PR

PR tree-optimization/111383
PR tree-optimization/110243
gcc/testsuite/
* gcc.dg/torture/pr111383.c: New testcase.

[Bug tree-optimization/111383] [12/13/14 Regression] Wrong code at -Os on x86_64-linux-gnu since r12-5138-ge82c382971

2023-10-20 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111383

Richard Biener  changed:

   What|Removed |Added

 Resolution|--- |DUPLICATE
 Status|NEW |RESOLVED

--- Comment #6 from Richard Biener  ---
Fixed by r14-4789-g44e7e4498c3cdc.

*** This bug has been marked as a duplicate of bug 110243 ***

[Bug tree-optimization/111383] [12/13/14 Regression] Wrong code at -Os on x86_64-linux-gnu since r12-5138-ge82c382971

2023-09-17 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111383

Andrew Pinski  changed:

   What|Removed |Added

 Depends on||110233

--- Comment #5 from Andrew Pinski  ---
PR 110233 is almost likely a dup, where IV-OPTS is doing reassociation
incorrectly.


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110233
[Bug 110233] [12/13/14 Regression] Wrong code at -Os on x86_64-linux-gnu

[Bug tree-optimization/111383] [12/13/14 Regression] Wrong code at -Os on x86_64-linux-gnu since r12-5138-ge82c382971

2023-09-12 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111383

--- Comment #4 from Andrew Pinski  ---
I think iv-opts is changing:
(d - 1625015511) + (d - 1625015341)

into (2*d - N) which introduces an overflow ...

[Bug tree-optimization/111383] [12/13/14 Regression] Wrong code at -Os on x86_64-linux-gnu since r12-5138-ge82c382971

2023-09-12 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111383

--- Comment #3 from Andrew Pinski  ---
-fwrapv also allows causes the correct code to happen.

The difference with/without -fwrapv is:
  _7 = _6 + -1625040257;
  if (_7 <= 6)

vs
  if (_6 <= 1625040263)

[Bug tree-optimization/111383] [12/13/14 Regression] Wrong code at -Os on x86_64-linux-gnu since r12-5138-ge82c382971

2023-09-12 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111383

Andrew Pinski  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
 Ever confirmed|0   |1
   Last reconfirmed||2023-09-12

--- Comment #2 from Andrew Pinski  ---
Note -fno-ivopts causes the wrong code to go away ...
So it must be the IR that IV-opts produces causes the wrong code to happen.

[Bug tree-optimization/111383] [12/13/14 Regression] Wrong code at -Os on x86_64-linux-gnu since r12-5138-ge82c382971

2023-09-12 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111383

Richard Biener  changed:

   What|Removed |Added

   Keywords||wrong-code
Summary|Wrong code at -Os on|[12/13/14 Regression] Wrong
   |x86_64-linux-gnu since  |code at -Os on
   |r12-5138-ge82c382971|x86_64-linux-gnu since
   ||r12-5138-ge82c382971
   Target Milestone|--- |12.4