<html>
<head>
<base href="https://bugs.llvm.org/">
</head>
<body><span class="vcard"><a class="email" href="mailto:nok.raven@gmail.com" title="Nikita Kniazev <nok.raven@gmail.com>"> <span class="fn">Nikita Kniazev</span></a>
</span> changed
<a class="bz_bug_link
bz_status_REOPENED "
title="REOPENED - [x86] Tail call with conditional jumps"
href="https://bugs.llvm.org/show_bug.cgi?id=26302">bug 26302</a>
<br>
<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>What</th>
<th>Removed</th>
<th>Added</th>
</tr>
<tr>
<td style="text-align:right;">Status</td>
<td>RESOLVED
</td>
<td>REOPENED
</td>
</tr>
<tr>
<td style="text-align:right;">Resolution</td>
<td>FIXED
</td>
<td>---
</td>
</tr>
<tr>
<td style="text-align:right;">CC</td>
<td>
</td>
<td>nok.raven@gmail.com
</td>
</tr></table>
<p>
<div>
<b><a class="bz_bug_link
bz_status_REOPENED "
title="REOPENED - [x86] Tail call with conditional jumps"
href="https://bugs.llvm.org/show_bug.cgi?id=26302#c4">Comment # 4</a>
on <a class="bz_bug_link
bz_status_REOPENED "
title="REOPENED - [x86] Tail call with conditional jumps"
href="https://bugs.llvm.org/show_bug.cgi?id=26302">bug 26302</a>
from <span class="vcard"><a class="email" href="mailto:nok.raven@gmail.com" title="Nikita Kniazev <nok.raven@gmail.com>"> <span class="fn">Nikita Kniazev</span></a>
</span></b>
<pre>This seems to be exactly the issue I was going to open. The following code
contains a tail call while it could just conditionally jump to the function
address:
void bar();
void foo(bool b)
{
if (b) bar();
}
and MSVC does exactly this <a href="https://godbolt.org/z/zFv3eb">https://godbolt.org/z/zFv3eb</a>
Moreover, the IR from the first post still does not embed the tail call address
into the conditional jump <a href="https://godbolt.org/z/Ehc02G">https://godbolt.org/z/Ehc02G</a>. The expected output in
the test committed with <a href="https://reviews.llvm.org/rL295357">https://reviews.llvm.org/rL295357</a> is not right, as for
me. Instead of
; WIN64: jne
; WIN64: jmp foo
; WIN64: jmp bar
It has to be:
; WIN64: jne bar
; WIN64: jmp foo
Probably, <a class="bz_bug_link
bz_status_NEW "
title="NEW - inline jump addresses into a jump table"
href="show_bug.cgi?id=41261">bug 41261</a> depends on this.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>