[llvm-bugs] [Bug 30426] New: x86_64 with SSE2 disabled: Assertion failed: (Reg >= X86::FP0 && Reg <= X86::FP6 && "Expected FP register!"), function getFPReg

via llvm-bugs llvm-bugs at lists.llvm.org
Sat Sep 17 04:44:05 PDT 2016


https://llvm.org/bugs/show_bug.cgi?id=30426

            Bug ID: 30426
           Summary: x86_64 with SSE2 disabled: Assertion failed: (Reg >=
                    X86::FP0 && Reg <= X86::FP6 && "Expected FP
                    register!"), function getFPReg
           Product: new-bugs
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: new bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: dimitry at andric.com
                CC: llvm-bugs at lists.llvm.org
    Classification: Unclassified

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] https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=212703
[2] https://github.com/openMVG/openMVG

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20160917/1ed83993/attachment.html>


More information about the llvm-bugs mailing list