[llvm-commits] CVS: llvm/lib/CodeGen/AsmPrinter.cpp
Jim Laskey
jlaskey at apple.com
Thu Jun 15 12:37:26 PDT 2006
Changes in directory llvm/lib/CodeGen:
AsmPrinter.cpp updated: 1.81 -> 1.82
---
Log message:
Was pointed out that structure alignment and type alignment are not the same
thing. Doubles still need to be special cased.
---
Diffs of the changes: (+3 -0)
AsmPrinter.cpp | 3 +++
1 files changed, 3 insertions(+)
Index: llvm/lib/CodeGen/AsmPrinter.cpp
diff -u llvm/lib/CodeGen/AsmPrinter.cpp:1.81 llvm/lib/CodeGen/AsmPrinter.cpp:1.82
--- llvm/lib/CodeGen/AsmPrinter.cpp:1.81 Thu Jun 15 08:10:58 2006
+++ llvm/lib/CodeGen/AsmPrinter.cpp Thu Jun 15 14:37:14 2006
@@ -250,6 +250,9 @@
Alignment = Log2_32(GV->getAlignment());
if (GV->hasInitializer()) {
+ // Always round up alignment of global doubles to 8 bytes.
+ if (GV->getType()->getElementType() == Type::DoubleTy && Alignment < 3)
+ Alignment = 3;
if (Alignment < 4) {
// If the global is not external, see if it is large. If so, give it a
// larger alignment.
More information about the llvm-commits
mailing list