1 ; RUN: llc < %s -mtriple=mips -mcpu=mips32 -mips-ssection-threshold=8 \
2 ; RUN: -relocation-model=static -mattr=+noabicalls -mgpopt \
5 ; Test that object with an explicit section that is not .sdata or .sbss are not
6 ; considered in the small data section if they would otherwise qualify to be in
7 ; small data section. Also test that explicitly placing something in the small
8 ; data section uses %gp_rel addressing mode.
10 @a = constant [2 x i32] zeroinitializer, section ".rodata", align 4
11 @b = global [4 x i32] zeroinitializer, section ".sdata", align 4
12 @c = global [4 x i32] zeroinitializer, section ".sbss", align 4
15 ; CHECK: lui $[[R:[0-9]+]], %hi(a)
16 ; CHECK: lw ${{[0-9]+}}, %lo(a)($[[R]])
20 %0 = load i32, ptr @a, align 4
25 ; CHECK-LABEL: lw ${{[0-9]+}}, %gp_rel(b)($gp)
29 %0 = load i32, ptr @b, align 4
34 ; CHECK-LABEL: lw ${{[0-9]+}}, %gp_rel(c)($gp)
38 %0 = load i32, ptr @c, align 4
43 ; CHECK: .type a,@object
44 ; CHECK: .section .rodata,"a",@progbits
47 ; CHECK: .type b,@object
48 ; CHECK: .section .sdata,"aw",@progbits
51 ; CHECK: .type c,@object
52 ; CHECK: .section .sbss,"aw",@nobits