Skip to content

Commit a3daac1

Browse files
Restore micromips-gp-rc.ll and update checks
1 parent 885e8bd commit a3daac1

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
; RUN: llc -march=mipsel -mcpu=mips32r2 -mattr=+micromips \
2+
; RUN: -relocation-model=pic -O3 < %s | FileCheck %s
3+
4+
@g = external global i32
5+
6+
; Function Attrs: noreturn nounwind
7+
define void @foo() #0 {
8+
entry:
9+
%0 = load i32, ptr @g, align 4
10+
tail call void @exit(i32 signext %0)
11+
unreachable
12+
}
13+
14+
; Function Attrs: noreturn
15+
declare void @exit(i32 signext)
16+
17+
; CHECK: addu $gp, ${{[0-9]+}}, ${{[0-9]+}}
18+
; CHECK: lw ${{[0-9]+}}, %got(g)($gp)
19+
; CHECK: lw ${{[0-9]+}}, %call16(exit)($gp)

0 commit comments

Comments
 (0)