<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_expect(n, 0) && 0 triggers fatal error: error in backend: Cannot select"
href="http://llvm.org/bugs/show_bug.cgi?id=15303">15303</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>__builtin_expect(n, 0) && 0 triggers fatal error: error in backend: Cannot select
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>3.2
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>Linux
</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>LLVM Codegen
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>andersk@mit.edu
</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>clang 3.2-1~exp5ubuntu2 on Ubuntu 13.04 amd64 gives a strange backend error
when compiling mosh (<a href="https://github.com/keithw/mosh">https://github.com/keithw/mosh</a>). Using creduce I found
this minimal test case:
int main()
{
int n;
__builtin_expect(n, 0) && 0;
return 0;
}
fatal error: error in backend: Cannot select: 0x1be4580: i64 = fexp2 0x1be4480
[ORD=1] [ID=4]
0x1be4480: i64,ch = CopyFromReg 0x1bd1e30, 0x1be4380 [ORD=1] [ID=3]
0x1be4380: i64 = Register %vreg3 [ORD=1] [ID=1]
In function: main</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>