<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 --- - Negative zero misoptimized"
href="http://llvm.org/bugs/show_bug.cgi?id=22376">22376</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Negative zero misoptimized
</td>
</tr>
<tr>
<th>Product</th>
<td>libraries
</td>
</tr>
<tr>
<th>Version</th>
<td>trunk
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>Windows NT
</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>Scalar Optimizations
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>sunil_srivastava@playstation.sony.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>The following example fails with –O2 (passes at -O1)
extern "C" int printf(const char *, ...);
int signbit(double d) {return *((long long *)&d)<0;}
double m0 = -0.;
int main() {
if ( m0 == 0) {
if (signbit(m0) != 0)
printf("Passed\n");
else
printf("Failed\n");
}
}
It is a regression since r225660, which was for <a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED FIXED - optimization: propagate equalities for fcmp (floating point compares)"
href="show_bug.cgi?id=17713">Bug 17713</a>.</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>