1 ; NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py UTC_ARGS: --version 2
2 ; RUN: llc -mtriple=riscv64 -stop-after=finalize-isel -verify-machineinstrs -o - %s | FileCheck %s
3 define void @f1(ptr noundef %x) !kcfi_type !1 {
4 ; CHECK-LABEL: name: f1
5 ; CHECK: bb.0 (%ir-block.0):
6 ; CHECK-NEXT: liveins: $x10
8 ; CHECK-NEXT: [[COPY:%[0-9]+]]:gprjalr = COPY $x10
9 ; CHECK-NEXT: ADJCALLSTACKDOWN 0, 0, implicit-def dead $x2, implicit $x2
10 ; CHECK-NEXT: PseudoCALLIndirect [[COPY]], csr_ilp32_lp64, implicit-def dead $x1, implicit-def $x2, cfi-type 12345678
11 ; CHECK-NEXT: ADJCALLSTACKUP 0, 0, implicit-def dead $x2, implicit $x2
12 ; CHECK-NEXT: PseudoRET
13 call void %x() [ "kcfi"(i32 12345678) ]
17 define void @f2(ptr noundef %x) #0 {
18 ; CHECK-LABEL: name: f2
19 ; CHECK: bb.0 (%ir-block.0):
20 ; CHECK-NEXT: liveins: $x10
22 ; CHECK-NEXT: [[COPY:%[0-9]+]]:gprtc = COPY $x10
23 ; CHECK-NEXT: PseudoTAILIndirect [[COPY]], implicit $x2, cfi-type 12345678
24 tail call void %x() [ "kcfi"(i32 12345678) ]
28 attributes #0 = { "patchable-function-entry"="2" }
30 !llvm.module.flags = !{!0}
32 !0 = !{i32 4, !"kcfi", i32 1}