1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -mtriple=m68k < %s | FileCheck %s
4 ; (Copied from test/CodeGen/X86/gcc_except_table.ll)
5 ; Testing whether exception pointer register (d0) and exception selector
6 ; register (d1) are correctly used by landing and EH pad, respectively.
7 @_ZTIi = external constant ptr
9 define i32 @foo() uwtable ssp personality ptr @__gxx_personality_v0 {
11 ; CHECK: .Lfunc_begin0:
12 ; CHECK-NEXT: .cfi_startproc
13 ; CHECK-NEXT: .cfi_personality 0, __gxx_personality_v0
14 ; CHECK-NEXT: .cfi_lsda 0, .Lexception0
15 ; CHECK-NEXT: ; %bb.0: ; %entry
16 ; CHECK-NEXT: suba.l #4, %sp
17 ; CHECK-NEXT: .cfi_def_cfa_offset -8
19 ; CHECK-NEXT: jsr _Z1fv@PLT
21 ; CHECK-NEXT: ; %bb.1: ; %try.cont
22 ; CHECK-NEXT: move.l #0, %d0
23 ; CHECK-NEXT: adda.l #4, %sp
25 ; CHECK-NEXT: .LBB0_2: ; %lpad
27 ; CHECK-NEXT: move.l %d0, (%sp)
28 ; CHECK-NEXT: jsr _Unwind_Resume@PLT
30 invoke void @_Z1fv() optsize
31 to label %try.cont unwind label %lpad
34 %0 = landingpad { ptr, i32 }
43 resume { ptr, i32 } %0
46 declare void @_Z1fv() optsize
48 declare i32 @__gxx_personality_v0(...)