1 ; RUN: opt < %s -globaldce -S | FileCheck %s
3 ; test_global should not be emitted to the .s file.
4 ; CHECK-NOT: @test_global =
5 @test_global = available_externally global i32 4
7 ; test_global2 is a normal global using an available externally function.
8 ; CHECK: @test_global2 =
9 @test_global2 = global i32 ()* @test_function2
11 ; test_function should not be emitted to the .s file.
12 ; CHECK-NOT: define {{.*}} @test_function()
13 define available_externally i32 @test_function() {
17 ; test_function2 isn't actually dead even though it's available externally.
18 ; CHECK: define available_externally i32 @test_function2()
19 define available_externally i32 @test_function2() {