<html>
<head>
<base href="https://bugs.llvm.org/">
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW - arm: silent == and != and __builtin_isnan compile to signaling compare"
href="https://bugs.llvm.org/show_bug.cgi?id=43374">43374</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>arm: silent == and != and __builtin_isnan compile to signaling compare
</td>
</tr>
<tr>
<th>Product</th>
<td>new-bugs
</td>
</tr>
<tr>
<th>Version</th>
<td>unspecified
</td>
</tr>
<tr>
<th>Hardware</th>
<td>All
</td>
</tr>
<tr>
<th>OS</th>
<td>All
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>enhancement
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>new bugs
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>szabolcs.nagy@arm.com
</td>
</tr>
<tr>
<th>CC</th>
<td>htmldeveloper@gmail.com, llvm-bugs@lists.llvm.org
</td>
</tr></table>
<p>
<div>
<pre>for
int foo(float x) {
return __builtin_isnan(x) ? 0 : 1;
}
int bar(float x) {
return x!=x ? 0 : 1;
}
i get
foo:
vcmpe.f32 s0, s0
vmrs APSR_nzcv, fpscr
mov r0, #0
movvc r0, #1
bx lr
bar:
vcmpe.f32 s0, s0
vmrs APSR_nzcv, fpscr
mov r0, #0
movvc r0, #1
bx lr
in standard conform compilation mode, i expected vcmp.f32 instead of vcmpe.f32.
in principle the difference is not observable if FENV_ACCESS is off, but since
clang does not support toggling that switch it must be assumed to be always on
for conforming behaviour and then != and is* operations must be non-signaling
(iso c annex f requirement).</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>