2 ; RUN: llc < %s -mtriple=aarch64-pc-windows-msvc | FileCheck %s
3 ; RUN: llc < %s -mtriple=aarch64-w64-windows-gnu | FileCheck %s
4 ; Control Flow Guard is currently only available on Windows
6 ; Test that Control Flow Guard checks are not added in modules with the
7 ; cfguard=1 flag (emit tables but no checks).
10 declare void @target_func()
12 define void @func_in_module_without_cfguard() #0 {
14 %func_ptr = alloca ptr, align 8
15 store ptr @target_func, ptr %func_ptr, align 8
16 %0 = load ptr, ptr %func_ptr, align 8
21 ; CHECK-NOT: __guard_check_icall_fptr
22 ; CHECK-NOT: __guard_dispatch_icall_fptr
25 !llvm.module.flags = !{!0}
26 !0 = !{i32 2, !"cfguard", i32 1}