<html>
<head>
<base href="https://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 --- - x86_64 with SSE2 disabled: Assertion failed: (Reg >= X86::FP0 && Reg <= X86::FP6 && "Expected FP register!"), function getFPReg"
href="https://llvm.org/bugs/show_bug.cgi?id=30426">30426</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>x86_64 with SSE2 disabled: Assertion failed: (Reg >= X86::FP0 && Reg <= X86::FP6 && "Expected FP register!"), function getFPReg
</td>
</tr>
<tr>
<th>Product</th>
<td>new-bugs
</td>
</tr>
<tr>
<th>Version</th>
<td>trunk
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</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>dimitry@andric.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>This is a rather strange one. I got a test case via FreeBSD bug 212703 [1],
where somebody encountered a clang 3.4.1 segfault, compiling some sample from
openMVG [2].
This segfault is actually the assertion "(Reg >= X86::FP0 && Reg <= X86::FP6 &&
"Expected FP register!"), function getFPReg", and it even reproduces with trunk
r281149.
For some reason, the build process targets x86_64, but then turns off SSE2, and
this is the key to getting the assertion. The test case is extremely minimal,
and optimization isn't even required:
// compile with: clang -cc1 -triple x86_64 -S -target-feature -sse2
testcase.cpp
void fn1(double);
int main() { fn1(4.); }
As far as I know, disabling SSE2 also disables all the higher forms of SSE, so
I think it just can't find any x87 FP register at all, in this case?
[1] <a href="https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=212703">https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=212703</a>
[2] <a href="https://github.com/openMVG/openMVG">https://github.com/openMVG/openMVG</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>