This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/59521] __builtin_expect not effective in switch
- From: "tetra2005 at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 07 Jul 2017 05:40:50 +0000
- Subject: [Bug middle-end/59521] __builtin_expect not effective in switch
- Auto-submitted: auto-generated
- References: <bug-59521-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59521
Yuri Gribov <tetra2005 at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |tetra2005 at gmail dot com
--- Comment #2 from Yuri Gribov <tetra2005 at gmail dot com> ---
Created attachment 41698
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=41698&action=edit
Draft patch (not working)
This can be added easily but I ran into a block in combine_predictions_for_bb
which resets predictions whenever block has more than one outgoing edge and
predictor is not strong enough (like e.g. noreturn predictor).