1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 5
3 ; RUN: llc -mtriple=riscv32 -mattr=+zfa,+zfh -global-isel < %s \
5 ; RUN: llc -mtriple=riscv64 -mattr=+zfa,+zfh -global-isel < %s \
9 define half @fceil(half %a) {
12 ; CHECK-NEXT: fround.h fa0, fa0, rup
14 %b = call half @llvm.ceil.f16(half %a)
18 define half @ffloor(half %a) {
19 ; CHECK-LABEL: ffloor:
21 ; CHECK-NEXT: fround.h fa0, fa0, rdn
23 %b = call half @llvm.floor.f16(half %a)
27 define half @frint(half %a) {
30 ; CHECK-NEXT: froundnx.h fa0, fa0
32 %b = call half @llvm.rint.f16(half %a)
36 define half @fnearbyint(half %a) {
37 ; CHECK-LABEL: fnearbyint:
39 ; CHECK-NEXT: fround.h fa0, fa0
41 %b = call half @llvm.nearbyint.f16(half %a)
45 define half @fround(half %a) {
46 ; CHECK-LABEL: fround:
48 ; CHECK-NEXT: fround.h fa0, fa0, rmm
50 %b = call half @llvm.round.f16(half %a)
54 define half @froundeven(half %a) {
55 ; CHECK-LABEL: froundeven:
57 ; CHECK-NEXT: fround.h fa0, fa0, rne
59 %b = call half @llvm.roundeven.f16(half %a)
63 define half @ftrunc(half %a) {
64 ; CHECK-LABEL: ftrunc:
66 ; CHECK-NEXT: fround.h fa0, fa0, rtz
68 %b = call half @llvm.trunc.f16(half %a)
72 define half @fmaximum(half %a, half %b) {
73 ; CHECK-LABEL: fmaximum:
75 ; CHECK-NEXT: fmaxm.h fa0, fa0, fa1
77 %c = call half @llvm.maximum.f16(half %a, half %b)
81 define half @fminimum(half %a, half %b) {
82 ; CHECK-LABEL: fminimum:
84 ; CHECK-NEXT: fminm.h fa0, fa0, fa1
86 %c = call half @llvm.minimum.f16(half %a, half %b)