<html>
<head>
<base href="https://bugs.llvm.org/">
</head>
<body><span class="vcard"><a class="email" href="mailto:arnaud.degrandmaison@arm.com" title="Arnaud de Grandmaison <arnaud.degrandmaison@arm.com>"> <span class="fn">Arnaud de Grandmaison</span></a>
</span> changed
<a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED FIXED - Missed optimization in 16-bit __builtin_add_overflow on aarch64"
href="https://bugs.llvm.org/show_bug.cgi?id=38751">bug 38751</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>FIXED
</td>
</tr>
<tr>
<td style="text-align:right;">Fixed By Commit(s)</td>
<td>
</td>
<td>344439
</td>
</tr></table>
<p>
<div>
<b><a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED FIXED - Missed optimization in 16-bit __builtin_add_overflow on aarch64"
href="https://bugs.llvm.org/show_bug.cgi?id=38751#c4">Comment # 4</a>
on <a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED FIXED - Missed optimization in 16-bit __builtin_add_overflow on aarch64"
href="https://bugs.llvm.org/show_bug.cgi?id=38751">bug 38751</a>
from <span class="vcard"><a class="email" href="mailto:arnaud.degrandmaison@arm.com" title="Arnaud de Grandmaison <arnaud.degrandmaison@arm.com>"> <span class="fn">Arnaud de Grandmaison</span></a>
</span></b>
<pre>Closing this bug as commit r344439 fixed this issue :
$ cat pr38751.c
#include <stdint.h>
void g(int a, int b, int *c, int *o, int *v) {
*o = __builtin_add_overflow((int16_t)a, (int16_t)b, (int16_t *)c);
}
$ bin/clang -target arm64 -c -O3 -o - -S pr38751.c
...
g:
sxth w8, w0
add w8, w8, w1, sxth
cmp w8, w8, sxth
cset w9, ne
strh w8, [x2]
str w9, [x3]
ret
...</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>