2009-01-15 21:18:42 +01:00
|
|
|
; Test to make sure that the 'private' is used correctly.
|
|
|
|
;
|
2011-12-02 23:28:09 +01:00
|
|
|
; RUN: llc -march=mips < %s | FileCheck %s
|
2009-01-15 21:18:42 +01:00
|
|
|
|
|
|
|
define private void @foo() {
|
2013-07-14 08:24:09 +02:00
|
|
|
; CHECK-LABEL: foo:
|
2011-12-02 23:28:09 +01:00
|
|
|
ret void
|
2009-01-15 21:18:42 +01:00
|
|
|
}
|
|
|
|
|
2010-01-05 18:55:26 +01:00
|
|
|
@baz = private global i32 4
|
2009-01-15 21:18:42 +01:00
|
|
|
|
|
|
|
define i32 @bar() {
|
2013-07-14 08:24:09 +02:00
|
|
|
; CHECK-LABEL: bar:
|
2011-12-02 23:28:09 +01: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 21:18:42 +01:00
|
|
|
}
|