1; RUN: opt -S -globalopt < %s | FileCheck %s 2; rdar://11022897 3 4; Globalopt should be able to evaluate an invoke. 5; CHECK: @tmp = local_unnamed_addr global i32 1 6 7@llvm.global_ctors = appending global [1 x { i32, void ()* }] [{ i32, void ()* } { i32 65535, void ()* @_GLOBAL__I_a }] 8@tmp = global i32 0 9 10define i32 @one() { 11 ret i32 1 12} 13 14define void @_GLOBAL__I_a() personality i8* undef { 15bb: 16 %tmp1 = invoke i32 @one() 17 to label %bb2 unwind label %bb4 18 19bb2: ; preds = %bb 20 store i32 %tmp1, i32* @tmp 21 ret void 22 23bb4: ; preds = %bb 24 %tmp5 = landingpad { i8*, i32 } 25 filter [0 x i8*] zeroinitializer 26 unreachable 27} 28