1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc < %s -mtriple=riscv64 -mattr=+zfh \
3 ; RUN: -verify-machineinstrs -target-abi lp64f -disable-strictnode-mutation \
4 ; RUN: | FileCheck -check-prefix=RV64IZFH %s
5 ; RUN: llc < %s -mtriple=riscv64 -mattr=+d \
6 ; RUN: -mattr=+zfh -verify-machineinstrs -target-abi lp64d \
7 ; RUN: -disable-strictnode-mutation | FileCheck -check-prefix=RV64IDZFH %s
9 ; These intrinsics require half and i64 to be legal types.
11 declare i64 @llvm.experimental.constrained.llrint.i64.f16(half, metadata, metadata)
13 define i64 @llrint_f16(half %a) nounwind strictfp {
14 ; RV64IZFH-LABEL: llrint_f16:
16 ; RV64IZFH-NEXT: fcvt.l.h a0, fa0
19 ; RV64IDZFH-LABEL: llrint_f16:
21 ; RV64IDZFH-NEXT: fcvt.l.h a0, fa0
23 %1 = call i64 @llvm.experimental.constrained.llrint.i64.f16(half %a, metadata !"round.dynamic", metadata !"fpexcept.strict") strictfp
27 declare i64 @llvm.experimental.constrained.llround.i64.f16(half, metadata)
29 define i64 @llround_f16(half %a) nounwind strictfp {
30 ; RV64IZFH-LABEL: llround_f16:
32 ; RV64IZFH-NEXT: fcvt.l.h a0, fa0, rmm
35 ; RV64IDZFH-LABEL: llround_f16:
37 ; RV64IDZFH-NEXT: fcvt.l.h a0, fa0, rmm
39 %1 = call i64 @llvm.experimental.constrained.llround.i64.f16(half %a, metadata !"fpexcept.strict") strictfp