xref: /llvm-project/llvm/test/Transforms/SimplifyCFG/2003-08-05-InvokeCrash.ll (revision 8979ae42769e529b0f6fce3268492ffb49bd54b9)
1; Do not remove the invoke!
2;
3; RUN: opt < %s -passes=simplifycfg -simplifycfg-require-and-preserve-domtree=1 -disable-output
4
5define i32 @test() personality ptr @__gxx_personality_v0 {
6	%A = invoke i32 @test( )
7			to label %Ret unwind label %Ret2		; <i32> [#uses=1]
8Ret:		; preds = %0
9	ret i32 %A
10Ret2:		; preds = %0
11        %val = landingpad { ptr, i32 }
12                 catch ptr null
13	ret i32 undef
14}
15
16declare i32 @__gxx_personality_v0(...)
17