[llvm] [X86][KCFI] Do not emit a type prefix for nocf_check functions (PR #158133)

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 11 23:00:58 PDT 2025


================
@@ -0,0 +1,39 @@
+; RUN: llc -mtriple=x86_64-unknown-unknown -x86-indirect-branch-tracking < %s | FileCheck %s
+
+; CHECK-LABEL: __cfi_cf_check_func:
+; CHECK:       movl	$12345678, %eax
+define void @cf_check_func() !kcfi_type !2 {
+; CHECK-LABEL: cf_check_func:
+; CHECK:       endbr64
+; CHECK:       retq
+entry:
+  ret void
+}
+
+; CHECK-NOT:   __cfi_notype_cf_check_func:
----------------
MaskRay wrote:

We just need one `CHECK-NOT: __cfi_` and the next `; CHECK-NOT: __cfi_nocf_check_func:` can be removed.

https://github.com/llvm/llvm-project/pull/158133


More information about the llvm-commits mailing list