1 ; RUN: llc -fcfi -cfi-type=sub <%s | FileCheck --check-prefix=SUB %s
2 ; RUN: llc -fcfi -cfi-type=add <%s | FileCheck --check-prefix=ADD %s
3 ; RUN: llc -fcfi -cfi-type=ror <%s | FileCheck --check-prefix=ROR %s
5 target triple = "x86_64-unknown-linux-gnu"
7 define void @indirect_fun() unnamed_addr jumptable {
11 define i32 @m(void ()* %fun) {
15 ; SUB-LABEL: leaq __llvm_jump_instr_table_0_1
16 ; SUB-LABEL: callq __llvm_cfi_pointer_warning
21 ; ROR-LABEL: callq __llvm_cfi_pointer_warning
24 ; ADD-LABEL: leaq __llvm_jump_instr_table_0_1
26 ; ADD-LABEL: callq __llvm_cfi_pointer_warning
30 define void ()* @get_fun() {
31 ret void ()* @indirect_fun
34 define i32 @main(i32 %argc, i8** %argv) {
35 %f = call void ()* ()* @get_fun()
36 %a = call i32 @m(void ()* %f)
41 ; SUB-LABEL: .type __llvm_jump_instr_table_0_1,@function
42 ; SUB-LABEL:__llvm_jump_instr_table_0_1:
43 ; SUB-LABEL: jmp indirect_fun@PLT