From 47a31a29c58608cf1c2940240744fb6eac560dba Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Tue, 18 Aug 2009 00:20:06 +0000 Subject: Fix function alignment at -Os on x86 to be 1, not 2. getFunctionAlignment returns a log2 value. llvm-svn: 79293 --- llvm/lib/Target/X86/X86ISelLowering.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'llvm/lib/Target') diff --git a/llvm/lib/Target/X86/X86ISelLowering.cpp b/llvm/lib/Target/X86/X86ISelLowering.cpp index e3fce7961c1..cb5a74fa40f 100644 --- a/llvm/lib/Target/X86/X86ISelLowering.cpp +++ b/llvm/lib/Target/X86/X86ISelLowering.cpp @@ -1052,7 +1052,7 @@ SDValue X86TargetLowering::getPICJumpTableRelocBase(SDValue Table, /// getFunctionAlignment - Return the Log2 alignment of this function. unsigned X86TargetLowering::getFunctionAlignment(const Function *F) const { - return F->hasFnAttr(Attribute::OptimizeForSize) ? 1 : 4; + return F->hasFnAttr(Attribute::OptimizeForSize) ? 0 : 4; } //===----------------------------------------------------------------------===// -- cgit v1.2.3