<html>
<head>
<base href="http://llvm.org/bugs/" />
</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 --- - __builtin_copysignf fails to produce result -0.0f"
href="http://llvm.org/bugs/show_bug.cgi?id=17496">17496</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>__builtin_copysignf fails to produce result -0.0f
</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>normal
</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>nrink@broadcom.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvmbugs@cs.uiuc.edu
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>I am using the X86 backend, but have "Expand" set as the lowering operation for
the following ISD node types:
FNEG,
FABS,
FCOPYSIGN
(in X86ISelLowering.cpp). With these node expansions, the following program
outputs "0x00000000":
#include <stdio.h>
float x = 0.0f;
float y = -2.0f;
int main()
{
float r = __builtin_copysignf(x, y);
printf("0x%08x\n", *(unsigned int*)&r);
return 0;
}
When compiled with gcc, it gives "0x80000000", as I would expect.</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>