2014-07-01 23:26:47 +08:00
|
|
|
; RUN: opt < %s -globalopt -S | FileCheck %s
|
2009-03-06 18:21:56 +08:00
|
|
|
|
2016-05-11 02:22:45 +08:00
|
|
|
@0 = global i32 0
|
2014-07-01 23:26:50 +08:00
|
|
|
; CHECK-DAG: @0 = internal global i32 0
|
|
|
|
|
2016-05-11 02:22:45 +08:00
|
|
|
@1 = private global i32 0
|
2014-07-01 23:26:50 +08:00
|
|
|
; CHECK-DAG: @1 = private global i32 0
|
|
|
|
|
|
|
|
define i32* @2() {
|
2009-03-06 18:21:56 +08:00
|
|
|
ret i32* @0
|
|
|
|
}
|
2014-07-01 23:26:50 +08:00
|
|
|
; CHECK-DAG: define internal fastcc i32* @2()
|
|
|
|
|
2009-03-06 18:21:56 +08:00
|
|
|
define i32* @f() {
|
|
|
|
entry:
|
2014-07-01 23:26:50 +08:00
|
|
|
call i32* @2()
|
2009-03-06 18:21:56 +08:00
|
|
|
ret i32* %0
|
|
|
|
}
|
2014-07-01 23:26:50 +08:00
|
|
|
|
|
|
|
define i32* @g() {
|
|
|
|
entry:
|
|
|
|
ret i32* @1
|
|
|
|
}
|