This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/66584] gcc differs in static, branch-prediction cost from icc in switch.
- From: "jmcguiness at liquidcapital dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 18 Jun 2015 10:40:56 +0000
- Subject: [Bug c++/66584] gcc differs in static, branch-prediction cost from icc in switch.
- Auto-submitted: auto-generated
- References: <bug-66584-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66584
--- Comment #1 from Jason McG <jmcguiness at liquidcapital dot com> ---
(In reply to Jason McG from comment #0)
I got my static bp summaries wrong, corrected:
> void foo(int i) {
> switch(i) {
> case 1:
bar1(); // gcc: less likely (same as default) | icc: most likely
> break;
> case 2:
bar2(); // gcc: most likely | icc: less likely
> break;
> default:
bar3(); // gcc: less likely (same as case 1) | icc: least likely
> }
> }