<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<tt>I'm turning to you with regards to an unwanted
optimization/un-optimization that clang++ (</tt><tt>all versions
that I tested, in the following link) is generating, see the code
in the following link:
</tt>
<pre style="margin: 0em;"><a rel="nofollow" href="https://urldefense.proofpoint.com/v2/url?u=http-3A__goo.gl_3NVjyc&d=AwMCaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=CnzuN65ENJ1H9py9XLiRvC_UQz6u3oG6GUNn7_wosSM&m=yIGKLVr90vHZeRmUfPB1Vnqw6faSUcAAWnrcHp2_MXE&s=A1iOgsVG_kjAU3sjLCcvMnkzwxH-vEKt_aifM1W7kyw&e=">http://goo.gl/oiTPX5</a>
</pre>
<tt>The assembly code generated for both methods "amp", "ampamp" is
the </tt><tt>practically the same, when using the optimization
flag "-O3". However, </tt><tt>I'm interested to have a single
jump for the code in the method "amp", </tt><tt>as branch
misprediction penalty is very high otherwise. It should generate a
single jump, when using single ampersand (&), something that
icc13 is already doing (try it in the link above).<br>
<br>
Is there any </tt><tt>optimization flag that I should set, in
order to avoid this feature when </tt><tt>using "-O3"?</tt>
<pre style="margin: 0em;">
I made a similar question to the g++ community, however this seems to be a bug (performance bug) with g++.
Thank you in advance
F.
</pre>
</body>
</html>