1 ; RUN: llc < %s -mtriple=x86_64-apple-darwin9 | FileCheck %s -check-prefix=X64 2 ; RUN: llc < %s -mtriple=i386-apple-darwin9 | FileCheck %s -check-prefix=X32 3 ; PR1632 4 5 define void @_Z1fv() { 6 entry: 7 invoke void @_Z1gv() 8 to label %return unwind label %unwind 9 10 unwind: ; preds = %entry 11 %exn = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0 12 cleanup 13 br i1 false, label %eh_then, label %cleanup20 14 15 eh_then: ; preds = %unwind 16 invoke void @__cxa_end_catch() 17 to label %return unwind label %unwind10 18 19 unwind10: ; preds = %eh_then 20 %exn10 = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0 21 cleanup 22 %upgraded.eh_select13 = extractvalue { i8*, i32 } %exn10, 1 23 %upgraded.eh_select131 = sext i32 %upgraded.eh_select13 to i64 24 %tmp18 = icmp slt i64 %upgraded.eh_select131, 0 25 br i1 %tmp18, label %filter, label %cleanup20 26 27 filter: ; preds = %unwind10 28 unreachable 29 30 cleanup20: ; preds = %unwind10, %unwind 31 %eh_selector.0 = phi i64 [ 0, %unwind ], [ %upgraded.eh_select131, %unwind10 ] 32 ret void 33 34 return: ; preds = %eh_then, %entry 35 ret void 36 } 37 38 declare void @_Z1gv() 39 40 declare void @__cxa_end_catch() 41 42 declare i32 @__gxx_personality_v0(...) 43 44 ; X64: .cfi_personality 155, ___gxx_personality_v0 45 46 ; X32: .cfi_personality 155, L___gxx_personality_v0$non_lazy_ptr 47 48 ; X32: .section __IMPORT,__pointers,non_lazy_symbol_pointers 49 ; X32-NEXT: L___gxx_personality_v0$non_lazy_ptr: 50 ; X32-NEXT: .indirect_symbol ___gxx_personality_v0 51