<html>
<head>
<base href="https://bugs.llvm.org/">
</head>
<body><span class="vcard"><a class="email" href="mailto:hahnjo@hahnjo.de" title="Jonas Hahnfeld <hahnjo@hahnjo.de>"> <span class="fn">Jonas Hahnfeld</span></a>
</span> changed
<a class="bz_bug_link
bz_status_REOPENED "
title="REOPENED - [AArch64] Incorrect RETURN_ADDRESS in tests"
href="https://bugs.llvm.org/show_bug.cgi?id=36313">bug 36313</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;">Resolution</td>
<td>WONTFIX
</td>
<td>---
</td>
</tr>
<tr>
<td style="text-align:right;">Status</td>
<td>RESOLVED
</td>
<td>REOPENED
</td>
</tr></table>
<p>
<div>
<b><a class="bz_bug_link
bz_status_REOPENED "
title="REOPENED - [AArch64] Incorrect RETURN_ADDRESS in tests"
href="https://bugs.llvm.org/show_bug.cgi?id=36313#c17">Comment # 17</a>
on <a class="bz_bug_link
bz_status_REOPENED "
title="REOPENED - [AArch64] Incorrect RETURN_ADDRESS in tests"
href="https://bugs.llvm.org/show_bug.cgi?id=36313">bug 36313</a>
from <span class="vcard"><a class="email" href="mailto:hahnjo@hahnjo.de" title="Jonas Hahnfeld <hahnjo@hahnjo.de>"> <span class="fn">Jonas Hahnfeld</span></a>
</span></b>
<pre>(In reply to Amara Emerson from <a href="show_bug.cgi?id=36313#c16">comment #16</a>)
<span class="quote">> Ok this isn't really a bug, this is a code generation difference between
> using SelectionDAG and FastISel. GlobalISel is only involved indirectly,
> since at -O0 GISel replaces FastISel and falls back to SelectionDAG, whereas
> before FastISel would handle the block with the inline ASM and not fall back
> to SDAG.
>
> FastISel has some specialized code in FastISel.cpp:fastEmitBranch() that
> will check if the successor block is the target of the unconditional branch,
> in which case it will not emit anything. SelectionDAG doesn't do that, so
> when GlobalISel gives up on the block, instead of trying FastISel, we fall
> back to SDAG and end up with the extra branch.</span >
Ok, this is the answer to "why do we have branches". But it doesn't explain why
GlobalISel falls back at all.
<span class="quote">> This is expected behavior in terms of falling back to SDAG, so I think the test > needs to be updated to handle this new codegen.</span >
As said yesterday I don't think it's possible to do this reliably. And I'd
argue that the generated code, while correct, doesn't make any sense.</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>