2 ; RUN: llc < %s -mtriple=i686-pc-windows-msvc | FileCheck %s -check-prefix=X32
3 ; RUN: llc < %s -mtriple=x86_64-pc-windows-msvc | FileCheck %s -check-prefix=X64
4 ; RUN: llc < %s -mtriple=i686-w64-windows-gnu | FileCheck %s -check-prefix=X32
5 ; RUN: llc < %s -mtriple=x86_64-w64-windows-gnu | FileCheck %s -check-prefix=X64
6 ; Control Flow Guard is currently only available on Windows
8 ; Test that Control Flow Guard checks are not added in modules with the
9 ; cfguard=1 flag (emit tables but no checks).
12 declare void @target_func()
14 define void @func_in_module_without_cfguard() #0 {
16 %func_ptr = alloca ptr, align 8
17 store ptr @target_func, ptr %func_ptr, align 8
18 %0 = load ptr, ptr %func_ptr, align 8
23 ; X32-NOT: __guard_check_icall_fptr
24 ; X64-NOT: __guard_dispatch_icall_fptr
27 !llvm.module.flags = !{!0}
28 !0 = !{i32 2, !"cfguard", i32 1}