[Bug middle-end/115277] [13/14/15 regression] ICF needs to match loop bound estimates

2024-07-22 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115277

--- Comment #6 from GCC Commits  ---
The releases/gcc-14 branch has been updated by Jan Hubicka
:

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

commit r14-10487-gc5397d343ff1365fcebcf3ebabe140608874aac3
Author: Jan Hubicka 
Date:   Mon Jul 22 18:01:57 2024 +0200

Compare loop bounds in ipa-icf

Hi,
this testcase shows another poblem with missing comparators for metadata
in ICF. With value ranges available to loop optimizations during early
opts we can estimate number of iterations based on guarding condition that
can be split away by the fnsplit pass. This patch disables ICF when
number of iteraitons does not match.

Bootstrapped/regtesed x86_64-linux, will commit it shortly

gcc/ChangeLog:

PR ipa/115277
* ipa-icf-gimple.cc (func_checker::compare_loops): compare loop
bounds.

gcc/testsuite/ChangeLog:

* gcc.c-torture/compile/pr115277.c: New test.

(cherry picked from commit 0d19fbc7b0760ce665fa6a88cd40cfa0311358d7)

[Bug middle-end/115277] [13/14/15 regression] ICF needs to match loop bound estimates

2024-07-22 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115277

Sam James  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2024-07-22
 Ever confirmed|0   |1

--- Comment #5 from Sam James  ---
honza, should that be in execute/ instead?

[Bug middle-end/115277] [13/14/15 regression] ICF needs to match loop bound estimates

2024-07-22 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115277

--- Comment #4 from GCC Commits  ---
The master branch has been updated by Jan Hubicka :

https://gcc.gnu.org/g:0d19fbc7b0760ce665fa6a88cd40cfa0311358d7

commit r15-2200-g0d19fbc7b0760ce665fa6a88cd40cfa0311358d7
Author: Jan Hubicka 
Date:   Mon Jul 22 18:01:57 2024 +0200

Compare loop bounds in ipa-icf

Hi,
this testcase shows another poblem with missing comparators for metadata
in ICF. With value ranges available to loop optimizations during early
opts we can estimate number of iterations based on guarding condition that
can be split away by the fnsplit pass. This patch disables ICF when
number of iteraitons does not match.

Bootstrapped/regtesed x86_64-linux, will commit it shortly

gcc/ChangeLog:

PR ipa/115277
* ipa-icf-gimple.cc (func_checker::compare_loops): compare loop
bounds.

gcc/testsuite/ChangeLog:

* gcc.c-torture/compile/pr115277.c: New test.

[Bug middle-end/115277] [13/14/15 regression] ICF needs to match loop bound estimates

2024-05-30 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115277

Richard Biener  changed:

   What|Removed |Added

   Target Milestone|--- |13.4

[Bug middle-end/115277] [13/14/15 regression] ICF needs to match loop bound estimates

2024-05-30 Thread hubicka at ucw dot cz via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115277

--- Comment #3 from Jan Hubicka  ---
> What about gcc 13?
GCC 13 also misoptimizes.
Honza

[Bug middle-end/115277] [13/14/15 regression] ICF needs to match loop bound estimates

2024-05-30 Thread jamborm at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115277

--- Comment #2 from Martin Jambor  ---
(In reply to Jan Hubicka from comment #1)
> Reproduces on 14 and trunk. GCC 12 is not able to determine the loop bound
> during early optimizations

What about gcc 13?

[Bug middle-end/115277] [13/14/15 regression] ICF needs to match loop bound estimates

2024-05-29 Thread hubicka at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115277

Jan Hubicka  changed:

   What|Removed |Added

Summary|ICF needs to match loop |[13/14/15 regression] ICF
   |bound estimates |needs to match loop bound
   ||estimates

--- Comment #1 from Jan Hubicka  ---
Reproduces on 14 and trunk. GCC 12 is not able to determine the loop bound
during early optimizations