[Bug tree-optimization/79489] Strange static branch prediction for n != 0
marxin at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Feb 15 14:53:00 GMT 2017
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79489
--- Comment #4 from Martin Liška <marxin at gcc dot gnu.org> ---
Created attachment 40746
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=40746&action=edit
Patch for nonzero on non-boolean types
With the patch, I get following numbers for CPU2006 SPEC:
HEURISTICS BRANCHES (REL) BR. HITRATE
HITRATE COVERAGE COVERAGE (REL)
nonzero (on trees) 9230 20.3% 49.43% 54.40%
/ 83.05% 51413332496 51.41G 4.7%
As mentioned by Honza, it's quite poor (54.4%). We can measure speed
improvement in next stage1.
More information about the Gcc-bugs
mailing list