[llvm-bugs] [Bug 35215] New: Consider lowering the i686-windows DataLayout alignment of i64 to 32 bits
via llvm-bugs
llvm-bugs at lists.llvm.org
Mon Nov 6 09:35:28 PST 2017
https://bugs.llvm.org/show_bug.cgi?id=35215
Bug ID: 35215
Summary: Consider lowering the i686-windows DataLayout
alignment of i64 to 32 bits
Product: libraries
Version: trunk
Hardware: PC
OS: Windows NT
Status: NEW
Severity: enhancement
Priority: P
Component: Backend: X86
Assignee: unassignedbugs at nondot.org
Reporter: rnk at google.com
CC: llvm-bugs at lists.llvm.org
This is my current triple and datalayout for x86 Windows:
target datalayout = "e-m:x-p:32:32-i64:64-f80:32-n8:16:32-a:0:32-S32"
target triple = "i386-pc-windows-msvc19.11.25508"
We should reconsider the i64:64 part and consider adding f64:32:64.
My argument for doing this is that "ABI" alignment in LLVM is a little too
overloaded. It is used for the alignment used in LLVM struct layout in addition
to some other things like va_arg lowering.
The reality is that i64 arguments and stack allocations are generally not
aligned, and you can't assume that any unadorned i64 load is really 8 byte
aligned. However, in structs, 64-bit integers and doubles are naturally
aligned. Since struct layout is mainly a frontend responsibility at this point,
we should be able to lower LLVM's alignment without affecting clang.
This is similar to how we implemented -malign-double in clang without changing
LLVM.
--
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/20171106/d71fd3ee/attachment-0001.html>
More information about the llvm-bugs
mailing list