<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/154292>154292</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
LLVM doesn't discard obviously incorrect annotations
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
philnik777
</td>
</tr>
</table>
<pre>
LLVM currently doesn't discard likelihood information even when a condition is known to be true in certain cases. e.g.
```c++
if (condition) [[likely]]
do_something();
else
do_something_else();
```
will avoid inlining `do_something_else` even if `condition` is known to be false.
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJxkUk9r6z4Q_DTyZamR15b_HHxIKTn1d_1di2xt7H1RpCDJCfn2DzmlLa8wsLC7mp1Bo2PkxRGNQr0K9VboLa0-jNeVreNz13XF5M1jfH___z-YtxDIJfsA4yk6gV0Cw3HWwYDlM1levTfA7uTDRSf2DuhGDu4rOdAwe2d473KEs_N3B8nDRJDCRsAOZgpJ56ojxRKoXEohDxmtfGIW-JohD3wCgf0XpcABdgevu5CHUG8Z8gBg_Ef0F0oru0VgL3AQdWYgGykv_Jx_7M0fS1-Xn0LubC3om-fs0rJjt4Bo5W-KVj6tZ5mt_JbZyn_Nn7SNVBZmrM1QD7qgseqUUkM9qKZYR9330ySNqpreYKOrzqi2lS2Sbqppln3BI0pUsq8G2auhakrdzq2ZSFJdUYtYi0bSRbMtrb1dSh-WgmPcaKxUgwMWVk9k4_79iI7usE8FYk5DGPOjl2lbomik5ZjiN03iZOmZjN958NON_RbtA9jNPgSaE2jnfNpzEYst2HFN6RpFfRB4FHhcOK3bVM7-IvCYj3yWl2vwf2hOAo-7tCjw-Kn9NuLfAAAA__-OPuH1">