[rtsan] Add fork/execve interceptors (#117198)
[llvm-project.git] / llvm / test / Transforms / GVN / 2010-05-08-OneBit.ll
blobe4b8785106e7fe50f0f5aa01921e4b1edca2d196
1 ; RUN: opt < %s -passes=gvn
2 ; PR7052
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 {
8 entry:
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
18   unreachable
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
28   unreachable
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
40   unreachable
42 k151.i.i:                                         ; preds = %k133.i.i
43   ret i32 0
45 landing_pad:                                      ; preds = %l147.i.i, %l129.i.i, %l117.i.i
46   %exn = landingpad {ptr, i32}
47             cleanup
48   switch i32 undef, label %fin [
49     i32 1, label %catch1
50     i32 2, label %catch
51   ]
53 fin:                                              ; preds = %landing_pad
54   unreachable
56 catch:                                            ; preds = %landing_pad
57   ret i32 1
59 catch1:                                           ; preds = %landing_pad
60   ret i32 2
63 declare fastcc void @foo()
65 declare i32 @__gxx_personality_v0(...)