[llvm-commits] [llvm] r100875 - in /llvm/trunk: lib/Target/CellSPU/SPUMCAsmInfo.cpp test/CodeGen/CellSPU/bss.ll
    Chris Lattner 
    sabre at nondot.org
       
    Fri Apr  9 11:27:03 PDT 2010
    
    
  
Author: lattner
Date: Fri Apr  9 13:27:03 2010
New Revision: 100875
URL: http://llvm.org/viewvc/llvm-project?rev=100875&view=rev
Log:
"On SPU, variables in the .bss section that are allocated with the .lcomm directive are not aligned on 16 byte boundaries. This causes misaligned loads, as the generated assembly assumes this "default" alignment.
this patch disables .lcomm in favour of '.local .comm'
Patch by Kalle Raisklia!
Modified:
    llvm/trunk/lib/Target/CellSPU/SPUMCAsmInfo.cpp
    llvm/trunk/test/CodeGen/CellSPU/bss.ll
Modified: llvm/trunk/lib/Target/CellSPU/SPUMCAsmInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/CellSPU/SPUMCAsmInfo.cpp?rev=100875&r1=100874&r2=100875&view=diff
==============================================================================
--- llvm/trunk/lib/Target/CellSPU/SPUMCAsmInfo.cpp (original)
+++ llvm/trunk/lib/Target/CellSPU/SPUMCAsmInfo.cpp Fri Apr  9 13:27:03 2010
@@ -18,7 +18,6 @@
   ZeroDirective = "\t.space\t";
   Data64bitsDirective = "\t.quad\t";
   AlignmentIsInBytes = false;
-  HasLCOMMDirective = true;
       
   PCSymbol = ".";
   CommentString = "#";
Modified: llvm/trunk/test/CodeGen/CellSPU/bss.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/CellSPU/bss.ll?rev=100875&r1=100874&r2=100875&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/CellSPU/bss.ll (original)
+++ llvm/trunk/test/CodeGen/CellSPU/bss.ll Fri Apr  9 13:27:03 2010
@@ -1,5 +1,7 @@
 ; RUN: llc < %s -march=cellspu > %t1.s
 ; RUN: grep "\.section" %t1.s | grep "\.bss" | count 1
+; CHECK-NOT: .lcomm
 
 @bssVar = global i32 zeroinitializer
+ at localVar= internal global i32 zeroinitializer
 
    
    
More information about the llvm-commits
mailing list