1 ; NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py UTC_ARGS: --version 3
2 ; RUN: llc -mtriple=riscv64 -stop-after=finalize-isel < %s | FileCheck %s
3 ; RUN: llc -mtriple=riscv64 -mattr=+experimental-zicfilp -stop-after=finalize-isel < %s | FileCheck -check-prefixes=ZICFILP %s
5 @brind.arr = internal unnamed_addr constant [2 x ptr] [ptr blockaddress(@brind, %5), ptr blockaddress(@brind, %8)], align 8
6 @x = dso_local global i32 0, align 4
8 define void @brind(i32 noundef signext %0) {
9 ; CHECK-LABEL: name: brind
10 ; CHECK: PseudoBRIND killed [[VAR:%.*]], 0
11 ; ZICFILP-LABEL: name: brind
12 ; ZICFILP: PseudoBRINDNonX7 killed [[VAR:%.*]], 0
13 %2 = sext i32 %0 to i64
14 %3 = getelementptr inbounds [2 x ptr], ptr @brind.arr, i64 0, i64 %2
15 %4 = load ptr, ptr %3, align 8
16 indirectbr ptr %4, [label %5, label %8]
19 %6 = load i32, ptr @x, align 4
20 %7 = add nsw i32 %6, 2
21 store i32 %7, ptr @x, align 4
25 %9 = load i32, ptr @x, align 4
26 %10 = add nsw i32 %9, 1
27 store i32 %10, ptr @x, align 4
31 define i32 @indirect_call(ptr %0) {
32 ; CHECK-LABEL: name: indirect_call
33 ; CHECK: PseudoCALLIndirect
34 ; ZICFILP-LABEL: name: indirect_call
35 ; ZICFILP: PseudoCALLIndirectNonX7
41 define void @indirect_tail(ptr %0) {
42 ; CHECK-LABEL: name: indirect_tail
43 ; CHECK: PseudoTAILIndirect
44 ; ZICFILP-LABEL: name: indirect_tail
45 ; ZICFILP: PseudoTAILIndirectNonX7