1 ; RUN: llc < %s -mtriple=i686-pc-linux-gnu -enable-eh -o - | grep zPLR
3 @error = external global i8 ; <i8*> [#uses=2]
5 define void @_ada_x() {
8 to label %eh_then unwind label %unwind
10 unwind: ; preds = %entry
11 %eh_ptr = tail call i8* @llvm.eh.exception( ) ; <i8*> [#uses=2]
12 %eh_select = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector.i32( i8* %eh_ptr, i8* bitcast (i32 (...)* @__gnat_eh_personality to i8*), i8* @error ) ; <i32> [#uses=1]
13 %eh_typeid = tail call i32 @llvm.eh.typeid.for.i32( i8* @error ) ; <i32> [#uses=1]
14 %tmp2 = icmp eq i32 %eh_select, %eh_typeid ; <i1> [#uses=1]
15 br i1 %tmp2, label %eh_then, label %Unwind
17 eh_then: ; preds = %unwind, %entry
20 Unwind: ; preds = %unwind
21 tail call i32 (...)* @_Unwind_Resume( i8* %eh_ptr ) ; <i32>:0 [#uses=0]
27 declare i8* @llvm.eh.exception()
29 declare i32 @llvm.eh.selector.i32(i8*, i8*, ...)
31 declare i32 @llvm.eh.typeid.for.i32(i8*)
33 declare i32 @__gnat_eh_personality(...)
35 declare i32 @_Unwind_Resume(...)