1 ; RUN: opt < %s -passes=gvn
4 target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64"
5 target triple = "x86_64-unknown-linux-gnu"
7 define i32 @main(i32 %argc, ptr nocapture %argv) personality ptr @__gxx_personality_v0 {
9 %0 = getelementptr inbounds i8, ptr undef, i64 5 ; <ptr> [#uses=1]
10 store i32 undef, ptr %0, align 1
11 br i1 undef, label %k121.i.i, label %l117.i.i
13 l117.i.i: ; preds = %entry
14 invoke fastcc void @foo()
15 to label %.noexc5 unwind label %landing_pad
17 .noexc5: ; preds = %l117.i.i
20 k121.i.i: ; preds = %entry
21 br i1 undef, label %l129.i.i, label %k133.i.i
23 l129.i.i: ; preds = %k121.i.i
24 invoke fastcc void @foo()
25 to label %.noexc7 unwind label %landing_pad
27 .noexc7: ; preds = %l129.i.i
30 k133.i.i: ; preds = %k121.i.i
31 %1 = getelementptr i8, ptr undef, i64 5 ; <ptr> [#uses=1]
32 %2 = load i1, ptr %1 ; <i1> [#uses=1]
33 br i1 %2, label %k151.i.i, label %l147.i.i
35 l147.i.i: ; preds = %k133.i.i
36 invoke fastcc void @foo()
37 to label %.noexc10 unwind label %landing_pad
39 .noexc10: ; preds = %l147.i.i
42 k151.i.i: ; preds = %k133.i.i
45 landing_pad: ; preds = %l147.i.i, %l129.i.i, %l117.i.i
46 %exn = landingpad {ptr, i32}
48 switch i32 undef, label %fin [
53 fin: ; preds = %landing_pad
56 catch: ; preds = %landing_pad
59 catch1: ; preds = %landing_pad
63 declare fastcc void @foo()
65 declare i32 @__gxx_personality_v0(...)