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