summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/Mips/2008-07-15-SmallSection.ll
blob: 79f4d7970e68d7d3263d0fa8d54eb3f570758989 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
; RUN: llc < %s -march=mips -mcpu=mips32 -mips-ssection-threshold=8 -relocation-model=static -mattr=+noabicalls -mgpopt | FileCheck %s

%struct.anon = type { i32, i32 }

@s0 = constant [8 x i8] c"AAAAAAA\00", align 4

; CHECK: .type  foo,@object
; CHECK-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 

define i8* @A0() nounwind {
entry:
	ret i8* getelementptr ([8 x i8], [8 x i8]* @s0, i32 0, i32 0)
}

define i32 @A1() nounwind {
entry:
  load i32, i32* getelementptr (%struct.anon, %struct.anon* @foo, i32 0, i32 0), align 8 
  load i32, i32* getelementptr (%struct.anon, %struct.anon* @foo, i32 0, i32 1), align 4 
  add i32 %1, %0
  ret i32 %2
}

OpenPOWER on IntegriCloud