[Bug tree-optimization/114203] [13/14 Regression] Miscompilation: A possible miscompilation in GCC 13 and 14 with option -Os
cvs-commit at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon Mar 4 10:45:29 GMT 2024
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114203
--- Comment #3 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Richard Biener <rguenth@gcc.gnu.org>:
https://gcc.gnu.org/g:cde50296a19b109909089b91d532d2c8455f5f10
commit r14-9293-gcde50296a19b109909089b91d532d2c8455f5f10
Author: Richard Biener <rguenther@suse.de>
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.
More information about the Gcc-bugs
mailing list