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