[Bug c++/66584] gcc differs in static, branch-prediction cost from icc in switch.
ebotcazou at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu Jun 18 17:45:00 GMT 2015
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66584
Eric Botcazou <ebotcazou at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|REOPENED |RESOLVED
Resolution|--- |WONTFIX
--- Comment #9 from Eric Botcazou <ebotcazou at gcc dot gnu.org> ---
> Perhaps I was unclear. I am asking that you point out to me in the gcc
> documentation where it comments regarding code generation for
> switch-statements, and that it might make clear that the lexographic
> "top-down" approach nor the default label are preferred but other, more
> complex heuristics are used that defeat static branch-prediction analysis. I
> do not think this is unreasonable.
I see, but documenting the code generation strategy in the user documentation
is not really appropriate, it is subject to change without notice and the doc
could be quickly out of sync. Moreover, it would be a slippery slope: if we
start to document this case and not the dozens of others, users would either
ask for the others or draw false conclusions from their absence.
So WONTFIX seems to be the best resolution here.
More information about the Gcc-bugs
mailing list