a481f7b7525c2710ef0ae590f7eab76abffe966f
[oota-llvm.git] / test / Transforms / LoopSimplify / 2007-10-28-InvokeCrash.ll
1 ; RUN: llvm-as < %s | opt -loop-simplify -disable-output
2 ; PR1752
3 target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-s0:0:64-f80:32:32"
4 target triple = "i686-pc-mingw32"
5
6 define void @func() {
7 bb_init:
8         br label %bb_main
9
10 bb_main:
11         br label %invcont17.normaldest
12
13 invcont17.normaldest917:                ; No predecessors!
14         %tmp23 = invoke i32 @foo()
15                         to label %invcont17.normaldest unwind label %invcont17.normaldest.normaldest
16
17 invcont17.normaldest:           ; preds = %invcont17.normaldest917, %bb_main
18         br label %bb_main
19
20 invcont17.normaldest.normaldest:                ; No predecessors!
21         %eh_ptr = call i8* @llvm.eh.exception()
22         %eh_select = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (void ()* @__gxx_personality_v0 to i8*), i8* null)
23         store i32 %tmp23, i32* undef
24         br label %bb_main
25 }
26
27 declare i32 @foo()
28
29 declare i8* @llvm.eh.exception()
30
31 declare i32 @llvm.eh.selector(i8*, i8*, ...)
32
33 declare void @__gxx_personality_v0()