https://llvm.org/bugs/show_bug.cgi?id=26680
Bug ID: 26680 Summary: bad alignment for xmm constants due to conflicting COMDATs Product: new-bugs Version: 3.8 Hardware: PC OS: Windows NT Status: NEW Severity: normal Priority: P Component: new bugs Assignee: unassignedb...@nondot.org Reporter: r.sagita...@gmx.de CC: llvm-bugs@lists.llvm.org Classification: Unclassified With LLVM 3.8 for Win64, compile these three files with optimizations: // a.cpp double fun(double x) { return x > 1.0 ? 2.0 : 3.0; } // b.cpp double goo(double* x) { x[0] += 3.0; x[1] += 2.0; return x[0] + x[1]; } // m.cpp double fun(double); double goo(double*); int main() { fun(1); double x[2] = { 0, 0 }; return goo(x) > 0; } with "clang -O -m64 m.cpp a.cpp b.cpp". The resulting executable crashes due to bad alignment for the __xmm@40000000000000004008000000000000 constant. Both a.obj and b.obj define the COMDAT. a.obj only requires alignment 8, but b.obj needs 16 byte alignment for the 'addpd' instruction. The linker picks the one from a.obj. -- You are receiving this mail because: You are on the CC list for the bug.
_______________________________________________ llvm-bugs mailing list llvm-bugs@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs