brintos

brintos / llvm-project-archived public Read only

0
0
Text · 883 B · f69eccf Raw
28 lines · plain
1; RUN: llc < %s -mtriple=i686-pc-windows-msvc | FileCheck %s -check-prefix=X862; RUN: llc < %s -mtriple=x86_64-pc-windows-msvc | FileCheck %s -check-prefix=X643; RUN: llc < %s -mtriple=i686-w64-windows-gnu | FileCheck %s -check-prefix=X864; RUN: llc < %s -mtriple=x86_64-w64-windows-gnu | FileCheck %s -check-prefix=X645; Control Flow Guard is currently only available on Windows6 7; Test that Control Flow Guard checks are not added in modules with the8; cfguard=1 flag (emit tables but no checks).9 10 11declare void @target_func()12 13define void @func_in_module_without_cfguard() #0 {14entry:15  %func_ptr = alloca ptr, align 816  store ptr @target_func, ptr %func_ptr, align 817  %0 = load ptr, ptr %func_ptr, align 818 19  call void %0()20  ret void21 22  ; X86-NOT: __guard_check_icall_fptr23  ; X64-NOT: __guard_dispatch_icall_fptr24}25 26!llvm.module.flags = !{!0}27!0 = !{i32 2, !"cfguard", i32 1}28