[LLVMbugs] [Bug 5599] New: clang doesn't follow x86-64 ABI array alignment rule
bugzilla-daemon at cs.uiuc.edu
bugzilla-daemon at cs.uiuc.edu
Mon Nov 23 10:49:16 PST 2009
http://llvm.org/bugs/show_bug.cgi?id=5599
Summary: clang doesn't follow x86-64 ABI array alignment rule
Product: clang
Version: trunk
Platform: PC
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: LLVM Codegen
AssignedTo: unassignedclangbugs at nondot.org
ReportedBy: gohman at apple.com
CC: llvmbugs at cs.uiuc.edu
The x86-64 ABI, in section 3.1.2 Data Representation, subsection "Aggregates
and Unions", second paragraph, says:
"An array uses the same alignment as its elements, except that a local or
global array variable of length at least 16 bytes or a C99 variable-length
array
variable always has alignment of at least 16 bytes."
For the following testcase:
void frob(void *);
void foo(void) {
float x[4];
frob(x);
}
clang -O2 -emit-llvm -m64 emits
%x = alloca [4 x float], align 4 ; <[4 x float]*> [#uses=1]
which shows that the array is not being aligned on a 16 byte boundary.
--
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