1 ; RUN: opt < %s -passes=mem2reg -S
6 define i32 @test1() personality ptr @__gxx_personality_v0 {
8 %whichFlag = alloca i32
9 %A = invoke i32 @test1f()
10 to label %invcont2 unwind label %lpad86
13 store i32 %A, ptr %whichFlag
17 %B = load i32, ptr %whichFlag
21 %exn = landingpad {ptr, i32}
27 declare i32 @__gxx_personality_v0(...)
32 %whichFlag = alloca i32
36 %B = load i32, ptr %whichFlag
40 %C = load i32, ptr %whichFlag
41 store i32 %C, ptr %whichFlag