2009-01-15 20:18:42 +00:00
|
|
|
; Test to make sure that the 'private' is used correctly.
|
|
|
|
;
|
2011-12-02 22:28:09 +00:00
|
|
|
; RUN: llc -march=mips < %s | FileCheck %s
|
2009-01-15 20:18:42 +00:00
|
|
|
|
|
|
|
define private void @foo() {
|
2013-07-14 06:24:09 +00:00
|
|
|
; CHECK-LABEL: foo:
|
2011-12-02 22:28:09 +00:00
|
|
|
ret void
|
2009-01-15 20:18:42 +00:00
|
|
|
}
|
|
|
|
|
2010-01-05 17:55:26 +00:00
|
|
|
@baz = private global i32 4
|
2009-01-15 20:18:42 +00:00
|
|
|
|
|
|
|
define i32 @bar() {
|
2013-07-14 06:24:09 +00:00
|
|
|
; CHECK-LABEL: bar:
|
2011-12-02 22:28:09 +00:00
|
|
|
; CHECK: call16($foo)
|
|
|
|
; CHECK: lw $[[R0:[0-9]+]], %got($baz)($
|
|
|
|
; CHECK: lw ${{[0-9]+}}, %lo($baz)($[[R0]])
|
|
|
|
call void @foo()
|
|
|
|
%1 = load i32* @baz, align 4
|
|
|
|
ret i32 %1
|
2009-01-15 20:18:42 +00:00
|
|
|
}
|