1; RUN: llc < %s 2>&1 | FileCheck %s 2 3target triple = "x86_64-pc-linux-gnu" 4 5declare i64 addrspace(1)* @"some_other_call"(i64 addrspace(1)*) 6 7declare i32 @"personality_function"() 8 9define i64 addrspace(1)* @test_result(i64 addrspace(1)* %obj, 10 i64 addrspace(1)* %obj1) 11 gc "statepoint-example" { 12entry: 13 ; CHECK: .Ltmp{{[0-9]+}}: 14 ; CHECK: callq some_other_call 15 ; CHECK: .Ltmp{{[0-9]+}}: 16 %0 = invoke i32 (i64 addrspace(1)* (i64 addrspace(1)*)*, i32, i32, ...)* @llvm.experimental.gc.statepoint.p0f_p1i64p1i64f(i64 addrspace(1)* (i64 addrspace(1)*)* @some_other_call, i32 1, i32 0, i64 addrspace(1)* %obj, i32 5, i32 0, i32 -1, i32 0, i32 0, i32 0, i64 addrspace(1)* %obj, i64 addrspace(1)* %obj1) 17 to label %normal_return unwind label %exceptional_return 18 19normal_return: 20 ; CHECK: popq 21 ; CHECK: retq 22 %ret_val = call i64 addrspace(1)* @llvm.experimental.gc.result.p1i64(i32 %0) 23 ret i64 addrspace(1)* %ret_val 24 25exceptional_return: 26 ; CHECK: .Ltmp{{[0-9]+}}: 27 ; CHECK: popq 28 ; CHECK: retq 29 %landing_pad = landingpad { i8*, i32 } personality i32 ()* @personality_function 30 cleanup 31 ret i64 addrspace(1)* %obj 32} 33; CHECK-LABEL: GCC_except_table{{[0-9]+}}: 34; CHECK: .long .Ltmp{{[0-9]+}}-.Ltmp{{[0-9]+}} 35; CHECK: .long .Ltmp{{[0-9]+}}-.Lfunc_begin{{[0-9]+}} 36; CHECK: .byte 0 37; CHECK: .align 4 38 39declare i32 @llvm.experimental.gc.statepoint.p0f_p1i64p1i64f(i64 addrspace(1)* (i64 addrspace(1)*)*, i32, i32, ...) 40declare i64 addrspace(1)* @llvm.experimental.gc.result.p1i64(i32) 41