2016-11-08 21:03:45 +08:00
|
|
|
; RUN: llc < %s -march=mips -mcpu=mips32 -mips-ssection-threshold=8 -relocation-model=static -mattr=+noabicalls -mgpopt | FileCheck %s
|
2011-09-14 04:00:35 +08:00
|
|
|
|
2016-11-08 21:03:45 +08:00
|
|
|
%struct.anon = type { i32, i32 }
|
2009-08-13 14:28:06 +08:00
|
|
|
|
2016-11-08 21:03:45 +08:00
|
|
|
@s0 = constant [8 x i8] c"AAAAAAA\00", align 4
|
2009-08-13 14:28:06 +08:00
|
|
|
|
2016-11-08 21:03:45 +08:00
|
|
|
; CHECK: .type foo,@object
|
|
|
|
; CHECK-NEXT: .section .sdata,"aw",@progbits
|
2009-08-13 14:28:06 +08:00
|
|
|
@foo = global %struct.anon { i32 2, i32 3 }
|
2016-11-08 21:03:45 +08:00
|
|
|
|
|
|
|
; CHECK: .type bar,@object
|
|
|
|
; CHECK-NEXT: .section .sbss,"aw",@nobits
|
2009-08-13 14:28:06 +08:00
|
|
|
@bar = global %struct.anon zeroinitializer
|
|
|
|
|
|
|
|
define i8* @A0() nounwind {
|
|
|
|
entry:
|
2015-03-14 02:20:45 +08:00
|
|
|
ret i8* getelementptr ([8 x i8], [8 x i8]* @s0, i32 0, i32 0)
|
2009-08-13 14:28:06 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
define i32 @A1() nounwind {
|
|
|
|
entry:
|
2015-03-14 02:20:45 +08:00
|
|
|
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
|
2009-08-13 14:28:06 +08:00
|
|
|
add i32 %1, %0
|
|
|
|
ret i32 %2
|
|
|
|
}
|
|
|
|
|