28 lines · plain
1 2; RUN: llc < %s -mtriple=arm-pc-windows-msvc | FileCheck %s3; RUN: llc < %s -mtriple=arm-w64-windows-gnu | FileCheck %s4; Control Flow Guard is currently only available on Windows5 6; Test that Control Flow Guard checks are not added in modules with the7; cfguard=1 flag (emit tables but no checks).8 9 10declare void @target_func()11 12define void @func_in_module_without_cfguard() #0 {13entry:14 %func_ptr = alloca ptr, align 815 store ptr @target_func, ptr %func_ptr, align 816 %0 = load ptr, ptr %func_ptr, align 817 18 call void %0()19 ret void20 21 ; CHECK-NOT: __guard_check_icall_fptr22 ; CHECK-NOT: __guard_dispatch_icall_fptr23}24attributes #0 = { "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "less-precise-fpmad"="false" "frame-pointer"="all" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="cortex-a9" "target-features"="+armv7-a,+dsp,+fp16,+neon,+strict-align,+thumb-mode,+vfp3" "use-soft-float"="false"}25 26!llvm.module.flags = !{!0}27!0 = !{i32 2, !"cfguard", i32 1}28