1 ; RUN: llc -mtriple=riscv64 -verify-machineinstrs < %s | FileCheck %s --check-prefixes=CHECK,NOC
2 ; RUN: llc -mtriple=riscv64 -mattr=+c -verify-machineinstrs < %s | FileCheck %s --check-prefixes=CHECK,C
4 ;; The alignment is at least 4 to avoid unaligned type hash loads when this
5 ;; instrumented function is indirectly called.
6 ; CHECK-LABEL: .globl f1
9 ; CHECK: .word 12345678
11 define void @f1(ptr noundef %x) !kcfi_type !1 {
12 ; CHECK: lw t1, -4(a0)
13 call void %x() [ "kcfi"(i32 12345678) ]
17 ; CHECK-LABEL: .globl f2
23 define void @f2(ptr noundef %x) {
24 ; CHECK: lw t1, -4(a0)
25 call void %x() [ "kcfi"(i32 12345678) ]
29 ; CHECK-LABEL: .globl f3
31 ; CHECK: .word 12345678
34 define void @f3(ptr noundef %x) #0 !kcfi_type !1 {
37 call void %x() [ "kcfi"(i32 12345678) ]
41 ; CHECK-LABEL: .globl f4
47 define void @f4(ptr noundef %x) #0 {
50 call void %x() [ "kcfi"(i32 12345678) ]
54 attributes #0 = { "patchable-function-prefix"="11" }
56 !llvm.module.flags = !{!0}
57 !0 = !{i32 4, !"kcfi", i32 1}