[LLVMbugs] [Bug 7567] New: clang generates movaps instruction for insufficiently aligned local on stack
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Mon Jul 5 08:18:38 PDT 2010
http://llvm.org/bugs/show_bug.cgi?id=7567
Summary: clang generates movaps instruction for insufficiently
aligned local on stack
Product: clang
Version: trunk
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P
Component: LLVM Codegen
AssignedTo: unassignedclangbugs at nondot.org
ReportedBy: jay.foad at gmail.com
CC: llvmbugs at cs.uiuc.edu
If I compile this source:
typedef __attribute__ ((aligned(16))) struct { unsigned long long x[2]; } L;
int one(L x);
int two(L x, L y) { return one(x) || one(y); }
with "clang -cc1 -S", I get:
two:
subq $88, %rsp
movq %rdi, 72(%rsp)
movq %rsi, 80(%rsp)
movq %rdx, 56(%rsp)
movq %rcx, 64(%rsp)
movaps 72(%rsp), %xmm0
movaps %xmm0, 32(%rsp)
...
Memory arguments to movaps are required to be 16-byte aligned, but the argument
"72(%rsp)" is only 8-byte aligned. This causes a segmentation fault at run
time.
I'm using LLVM and Clang built from trunk this morning, on Ubuntu 10.4 64-bit.
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
More information about the llvm-bugs
mailing list