[Bug tree-optimization/114203] [13 Regression] Miscompilation: A possible miscompilation in GCC 13 and 14 with option -Os

2024-03-04 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114203

Richard Biener  changed:

   What|Removed |Added

  Known to work||14.0
Summary|[13/14 Regression]  |[13 Regression]
   |Miscompilation: A possible  |Miscompilation: A possible
   |miscompilation in GCC 13|miscompilation in GCC 13
   |and 14 with option -Os  |and 14 with option -Os
  Known to fail||13.2.0
   Priority|P3  |P2

[Bug tree-optimization/114203] [13 Regression] Miscompilation: A possible miscompilation in GCC 13 and 14 with option -Os

2024-03-21 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114203

--- Comment #4 from GCC Commits  ---
The releases/gcc-13 branch has been updated by Richard Biener
:

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

commit r13-8482-ga729b1227bc8c84cd91a3b8c9c9d11bc43d415de
Author: Richard Biener 
Date:   Mon Mar 4 10:38:31 2024 +0100

tree-optimization/114203 - wrong CLZ niter computation

For precision less than int we apply the adjustment to make it defined
at zero after the adjustment to make it compute CLZ rather than CTZ.
That's wrong.

PR tree-optimization/114203
* tree-ssa-loop-niter.cc (build_cltz_expr): Apply CTZ->CLZ
adjustment before making the result defined at zero.

* gcc.dg/torture/pr114203.c: New testcase.

(cherry picked from commit cde50296a19b109909089b91d532d2c8455f5f10)

[Bug tree-optimization/114203] [13 Regression] Miscompilation: A possible miscompilation in GCC 13 and 14 with option -Os

2024-03-21 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114203

Richard Biener  changed:

   What|Removed |Added

  Known to work||13.2.1
 Resolution|--- |FIXED
 Status|ASSIGNED|RESOLVED

--- Comment #5 from Richard Biener  ---
Fixed.  Thanks for reporting.