diff --git a/llvm/lib/MC/MCAsmStreamer.cpp b/llvm/lib/MC/MCAsmStreamer.cpp --- a/llvm/lib/MC/MCAsmStreamer.cpp +++ b/llvm/lib/MC/MCAsmStreamer.cpp @@ -972,7 +972,7 @@ Symbol->print(OS, MAI); OS << ',' << Size; - if (ByteAlignment != 0) { + if (ByteAlignment > 1) { if (MAI->getCOMMDirectiveAlignmentIsInBytes()) OS << ',' << ByteAlignment; else @@ -1030,7 +1030,7 @@ OS << ','; Symbol->print(OS, MAI); OS << ',' << Size; - if (ByteAlignment != 0) + if (ByteAlignment > 1) OS << ',' << Log2_32(ByteAlignment); } EmitEOL(); diff --git a/llvm/test/CodeGen/ARM/2010-12-15-elf-lcomm.ll b/llvm/test/CodeGen/ARM/2010-12-15-elf-lcomm.ll --- a/llvm/test/CodeGen/ARM/2010-12-15-elf-lcomm.ll +++ b/llvm/test/CodeGen/ARM/2010-12-15-elf-lcomm.ll @@ -11,7 +11,7 @@ ; ASM: .type array00,%object @ @array00 ; ASM-NEXT: .local array00 -; ASM-NEXT: .comm array00,80,1 +; ASM-NEXT: .comm array00,80 ; ASM-NEXT: .type sum,%object @ @sum diff --git a/llvm/test/CodeGen/ARM/elf-lcomm-align.ll b/llvm/test/CodeGen/ARM/elf-lcomm-align.ll --- a/llvm/test/CodeGen/ARM/elf-lcomm-align.ll +++ b/llvm/test/CodeGen/ARM/elf-lcomm-align.ll @@ -6,7 +6,7 @@ ; .lcomm doesn't support alignment, so we always use .local/.comm. ; CHECK: .local c -; CHECK-NEXT: .comm c,1,1 +; CHECK-NEXT: .comm c,1 ; CHECK: .local x ; CHECK-NEXT: .comm x,4,4 diff --git a/llvm/test/CodeGen/PowerPC/aix-xcoff-data.ll b/llvm/test/CodeGen/PowerPC/aix-xcoff-data.ll --- a/llvm/test/CodeGen/PowerPC/aix-xcoff-data.ll +++ b/llvm/test/CodeGen/PowerPC/aix-xcoff-data.ll @@ -141,11 +141,11 @@ ; CHECK-NEXT: .comm a[RW],4,2 ; CHECK-NEXT: .comm b[RW],8,3 -; CHECK-NEXT: .comm c[RW],2,1 +; CHECK-NEXT: .comm c[RW],2 ; CHECK-NEXT: .comm d[RW],8,3 ; CHECK-NEXT: .comm f[RW],4,2 ; CHECK-NEXT: .comm over_aligned_comm[RW],8,5 -; CHECK-NEXT: .comm array[RW],33,0 +; CHECK-NEXT: .comm array[RW],33 ; OBJ: File: {{.*}}aix-xcoff-data.ll.tmp.o ; OBJ-NEXT: Format: aixcoff-rs6000 diff --git a/llvm/test/CodeGen/X86/global-sections.ll b/llvm/test/CodeGen/X86/global-sections.ll --- a/llvm/test/CodeGen/X86/global-sections.ll +++ b/llvm/test/CodeGen/X86/global-sections.ll @@ -317,9 +317,9 @@ @G17 = internal global i8 0 ; LINUX: .type G17,@object ; LINUX: .local G17 -; LINUX: .comm G17,1,1 +; LINUX: .comm G17,1 -; DARWIN: .zerofill __DATA,__bss,_G17,1,0 +; DARWIN: .zerofill __DATA,__bss,_G17,1 ; LINUX-SECTIONS: .type G17,@object ; LINUX-SECTIONS: .section .bss.G17,"aw",@nobits diff --git a/llvm/test/MC/COFF/comm.ll b/llvm/test/MC/COFF/comm.ll --- a/llvm/test/MC/COFF/comm.ll +++ b/llvm/test/MC/COFF/comm.ll @@ -9,5 +9,5 @@ ; CHECK: .lcomm _a,1 ; CHECK: .lcomm _b,8,8 ; .comm uses log2 alignment -; CHECK: .comm _c,1,0 +; CHECK: .comm _c,1 ; CHECK: .comm _d,8,3