[llvm-bugs] [Bug 26680] New: bad alignment for xmm constants due to conflicting COMDATs
via llvm-bugs
llvm-bugs at lists.llvm.org
Sat Feb 20 09:15:22 PST 2016
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: unassignedbugs at nondot.org
Reporter: r.sagitario at gmx.de
CC: llvm-bugs at 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 at 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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20160220/383eea36/attachment.html>
More information about the llvm-bugs
mailing list