<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 - misoptimization with defaulting to POWER7 and newer"
href="https://bugs.llvm.org/show_bug.cgi?id=45709">45709</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>misoptimization with defaulting to POWER7 and newer
</td>
</tr>
<tr>
<th>Product</th>
<td>libraries
</td>
</tr>
<tr>
<th>Version</th>
<td>10.0
</td>
</tr>
<tr>
<th>Hardware</th>
<td>Other
</td>
</tr>
<tr>
<th>OS</th>
<td>FreeBSD
</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>Backend: PowerPC
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>pkubaj@anongoth.pl
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org, nemanja.i.ibm@gmail.com
</td>
</tr></table>
<p>
<div>
<pre>Reduced test case:
class a {
void b();
void m_fn2();
int c;
float d[];
};
void a ::b() {
float e;
for (int f; f <= c; f++)
if (e < d[f])
e = d[f];
if (e)
m_fn2();
}
Compile with:
c++ -ffast-math -O2 -c sms.cpp
It builds fine without -ffast-math, or when lowering optimizations to -O1, or
after adding -mcpu=power7 (power8 or power9 are also ok for clang).
Result:
Illegal instruction</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>