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
    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

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
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?


You are receiving this mail because:
You are on the CC list for the bug.
llvm-bugs mailing list

Reply via email to