summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/test/CodeGen')
-rw-r--r--llvm/test/CodeGen/Mips/2008-07-15-SmallSection.ll28
1 files changed, 22 insertions, 6 deletions
diff --git a/llvm/test/CodeGen/Mips/2008-07-15-SmallSection.ll b/llvm/test/CodeGen/Mips/2008-07-15-SmallSection.ll
index 79f4d7970e6..21495423200 100644
--- a/llvm/test/CodeGen/Mips/2008-07-15-SmallSection.ll
+++ b/llvm/test/CodeGen/Mips/2008-07-15-SmallSection.ll
@@ -1,16 +1,32 @@
-; RUN: llc < %s -march=mips -mcpu=mips32 -mips-ssection-threshold=8 -relocation-model=static -mattr=+noabicalls -mgpopt | FileCheck %s
+; RUN: llc < %s -march=mips -mcpu=mips32 -mips-ssection-threshold=8 \
+; RUN: -relocation-model=static -mattr=+noabicalls -mgpopt \
+; RUN: | FileCheck %s --check-prefixes=BASIC,COMMON
+; RUN: llc < %s -march=mips -mcpu=mips32 -mips-ssection-threshold=8 \
+; RUN: -relocation-model=static -mattr=+noabicalls -mgpopt -membedded-data \
+; RUN: | FileCheck %s --check-prefixes=EMBDATA,COMMON
+
+; Test the layout of objects when compiling for static, noabicalls environment.
%struct.anon = type { i32, i32 }
+; BASIC: .type s0,@object
+; BASIC-NEXT: .section .sdata,"aw",@progbits
+
+; EMDATA: .type s0,@object
+; EMDATA-NEXT: .section .rodata,"a",@progbits
+
@s0 = constant [8 x i8] c"AAAAAAA\00", align 4
-; CHECK: .type foo,@object
-; CHECK-NEXT: .section .sdata,"aw",@progbits
+; BASIC: .type foo,@object
+; BASIC-NOT: .section
+
+; EMBDATA: .type foo,@object
+; EMBDATA-NEXT: .section .sdata,"aw",@progbits
@foo = global %struct.anon { i32 2, i32 3 }
-; CHECK: .type bar,@object
-; CHECK-NEXT: .section .sbss,"aw",@nobits
-@bar = global %struct.anon zeroinitializer
+; COMMON: .type bar,@object
+; COMMON-NEXT: .section .sbss,"aw",@nobits
+@bar = global %struct.anon zeroinitializer
define i8* @A0() nounwind {
entry:
OpenPOWER on IntegriCloud