1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -mtriple=riscv32 -mattr=+f -target-abi ilp32f -verify-machineinstrs \
3 ; RUN: < %s | FileCheck %s
4 ; RUN: llc -mtriple=riscv64 -mattr=+f -target-abi lp64f -verify-machineinstrs \
5 ; RUN: < %s | FileCheck %s
6 ; RUN: llc -mtriple=riscv32 -mattr=+zfinx -target-abi ilp32 -verify-machineinstrs \
7 ; RUN: < %s | FileCheck --check-prefix=CHECKZFINX %s
8 ; RUN: llc -mtriple=riscv64 -mattr=+zfinx -target-abi lp64 -verify-machineinstrs \
9 ; RUN: < %s | FileCheck --check-prefix=CHECKZFINX %s
11 define zeroext i1 @float_is_nan(float %a) nounwind {
12 ; CHECK-LABEL: float_is_nan:
14 ; CHECK-NEXT: feq.s a0, fa0, fa0
15 ; CHECK-NEXT: xori a0, a0, 1
18 ; CHECKZFINX-LABEL: float_is_nan:
19 ; CHECKZFINX: # %bb.0:
20 ; CHECKZFINX-NEXT: feq.s a0, a0, a0
21 ; CHECKZFINX-NEXT: xori a0, a0, 1
22 ; CHECKZFINX-NEXT: ret
23 %1 = fcmp uno float %a, 0.000000e+00
27 define zeroext i1 @float_not_nan(float %a) nounwind {
28 ; CHECK-LABEL: float_not_nan:
30 ; CHECK-NEXT: feq.s a0, fa0, fa0
33 ; CHECKZFINX-LABEL: float_not_nan:
34 ; CHECKZFINX: # %bb.0:
35 ; CHECKZFINX-NEXT: feq.s a0, a0, a0
36 ; CHECKZFINX-NEXT: ret
37 %1 = fcmp ord float %a, 0.000000e+00