1 ; RUN: opt -globalopt -S -o - < %s | FileCheck %s
3 @glbl = internal global i8* null
5 define void @test1a() {
6 ; CHECK-LABEL: @test1a(
9 store i8* null, i8** @glbl
13 define void @test1b(i8* %p) {
14 ; CHECK-LABEL: @test1b(
16 ; CHECK-NEXT: ret void
17 store i8* %p, i8** @glbl
21 define void @test2() {
22 ; CHECK-LABEL: @test2(
25 call void @foo2(i8* %txt)
26 %call2 = call i8* @strdup(i8* %txt)
27 store i8* %call2, i8** @glbl
30 declare i8* @strdup(i8*)
31 declare void @foo2(i8*)
33 define void @test3() uwtable personality i32 (i32, i64, i8*, i8*)* @__gxx_personality_v0 {
34 ; CHECK-LABEL: @test3(
38 %ptr = invoke i8* @_Znwm(i64 1)
39 to label %bb1 unwind label %bb2
41 store i8* %ptr, i8** @glbl
44 %tmp1 = landingpad { i8*, i32 }
46 resume { i8*, i32 } %tmp1
48 declare i32 @__gxx_personality_v0(i32, i64, i8*, i8*)
49 declare i8* @_Znwm(i64)