49 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py UTC_ARGS: --version 32; RUN: llc -mtriple=riscv64 -stop-after=finalize-isel < %s | FileCheck %s3; RUN: llc -mtriple=riscv64 -mattr=+experimental-zicfilp -stop-after=finalize-isel < %s | FileCheck -check-prefixes=ZICFILP %s4 5@brind.arr = internal unnamed_addr constant [2 x ptr] [ptr blockaddress(@brind, %5), ptr blockaddress(@brind, %8)], align 86@x = dso_local global i32 0, align 47 8define void @brind(i32 noundef signext %0) {9 ; CHECK-LABEL: name: brind10 ; CHECK: PseudoBRIND killed [[VAR:%.*]], 011 ; ZICFILP-LABEL: name: brind12 ; ZICFILP: PseudoBRINDNonX7 killed [[VAR:%.*]], 013 %2 = sext i32 %0 to i6414 %3 = getelementptr inbounds [2 x ptr], ptr @brind.arr, i64 0, i64 %215 %4 = load ptr, ptr %3, align 816 indirectbr ptr %4, [label %5, label %8]17 185: ; preds = %119 %6 = load i32, ptr @x, align 420 %7 = add nsw i32 %6, 221 store i32 %7, ptr @x, align 422 br label %823 248: ; preds = %5, %125 %9 = load i32, ptr @x, align 426 %10 = add nsw i32 %9, 127 store i32 %10, ptr @x, align 428 ret void29}30 31define i32 @indirect_call(ptr %0) {32 ; CHECK-LABEL: name: indirect_call33 ; CHECK: PseudoCALLIndirect34 ; ZICFILP-LABEL: name: indirect_call35 ; ZICFILP: PseudoCALLIndirectNonX736 call void %0()37 ret i32 038}39 40 41define void @indirect_tail(ptr %0) {42 ; CHECK-LABEL: name: indirect_tail43 ; CHECK: PseudoTAILIndirect44 ; ZICFILP-LABEL: name: indirect_tail45 ; ZICFILP: PseudoTAILIndirectNonX746 tail call void %0()47 ret void48}49