<html>
<head>
<base href="https://bugs.llvm.org/">
</head>
<body><span class="vcard"><a class="email" href="mailto:david.bolvansky@gmail.com" title="David Bolvansky <david.bolvansky@gmail.com>"> <span class="fn">David Bolvansky</span></a>
</span> changed
<a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED INVALID - Missed Tail Call Optimization when specifying function return value with __builtin_unreachable or __builtin_assume"
href="https://bugs.llvm.org/show_bug.cgi?id=43007">bug 43007</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>NEW
</td>
<td>RESOLVED
</td>
</tr>
<tr>
<td style="text-align:right;">Resolution</td>
<td>---
</td>
<td>INVALID
</td>
</tr></table>
<p>
<div>
<b><a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED INVALID - Missed Tail Call Optimization when specifying function return value with __builtin_unreachable or __builtin_assume"
href="https://bugs.llvm.org/show_bug.cgi?id=43007#c2">Comment # 2</a>
on <a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED INVALID - Missed Tail Call Optimization when specifying function return value with __builtin_unreachable or __builtin_assume"
href="https://bugs.llvm.org/show_bug.cgi?id=43007">bug 43007</a>
from <span class="vcard"><a class="email" href="mailto:david.bolvansky@gmail.com" title="David Bolvansky <david.bolvansky@gmail.com>"> <span class="fn">David Bolvansky</span></a>
</span></b>
<pre>Code assumes(result == 1) but we dont know if
'function_returns_only_1_or_doesnt_return' has side effects or not.
With __attribute__((const)):
extern int function_returns_only_1_or_doesnt_return(int, int)
__attribute__((const));
We get what we want:
define dso_local i32 @foo1(i32 %0, i32 %1) local_unnamed_addr #0 {
ret i32 1
}
define dso_local i32 @foo2(i32 %0, i32 %1) local_unnamed_addr #0 {
ret i32 1
}
so I believe this works as expected.</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>