brintos

brintos / llvm-project-archived public Read only

0
0
Text · 691 B · 4c10d19 Raw
22 lines · plain
1; RUN: opt < %s -passes=globaldce -S | FileCheck %s2 3; test_global should not be emitted to the .s file.4; CHECK-NOT: @test_global =5@test_global = available_externally global i32 46 7; test_global2 is a normal global using an available externally function.8; CHECK: @test_global2 =9@test_global2 = global ptr @test_function210 11; test_function should not be emitted to the .s file.12; CHECK-NOT: define {{.*}} @test_function()13define available_externally i32 @test_function() {14  ret i32 415}16 17; test_function2 isn't actually dead even though it's available externally.18; CHECK: define available_externally i32 @test_function2()19define available_externally i32 @test_function2() {20  ret i32 421}22