1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -mtriple=riscv32 -mattr=+d -target-abi ilp32d -verify-machineinstrs \
3 ; RUN: < %s | FileCheck %s
4 ; RUN: llc -mtriple=riscv64 -mattr=+d -target-abi lp64d -verify-machineinstrs \
5 ; RUN: < %s | FileCheck %s
6 ; RUN: llc -mtriple=riscv32 -mattr=+zdinx -target-abi ilp32 -verify-machineinstrs \
7 ; RUN: < %s | FileCheck --check-prefix=CHECKRV32ZDINX %s
8 ; RUN: llc -mtriple=riscv64 -mattr=+zdinx -target-abi lp64 -verify-machineinstrs \
9 ; RUN: < %s | FileCheck --check-prefix=CHECKRV64ZDINX %s
11 define zeroext i1 @double_is_nan(double %a) nounwind {
12 ; CHECK-LABEL: double_is_nan:
14 ; CHECK-NEXT: feq.d a0, fa0, fa0
15 ; CHECK-NEXT: xori a0, a0, 1
18 ; CHECKRV32ZDINX-LABEL: double_is_nan:
19 ; CHECKRV32ZDINX: # %bb.0:
20 ; CHECKRV32ZDINX-NEXT: feq.d a0, a0, a0
21 ; CHECKRV32ZDINX-NEXT: xori a0, a0, 1
22 ; CHECKRV32ZDINX-NEXT: ret
24 ; CHECKRV64ZDINX-LABEL: double_is_nan:
25 ; CHECKRV64ZDINX: # %bb.0:
26 ; CHECKRV64ZDINX-NEXT: feq.d a0, a0, a0
27 ; CHECKRV64ZDINX-NEXT: xori a0, a0, 1
28 ; CHECKRV64ZDINX-NEXT: ret
29 %1 = fcmp uno double %a, 0.000000e+00
33 define zeroext i1 @double_not_nan(double %a) nounwind {
34 ; CHECK-LABEL: double_not_nan:
36 ; CHECK-NEXT: feq.d a0, fa0, fa0
39 ; CHECKRV32ZDINX-LABEL: double_not_nan:
40 ; CHECKRV32ZDINX: # %bb.0:
41 ; CHECKRV32ZDINX-NEXT: feq.d a0, a0, a0
42 ; CHECKRV32ZDINX-NEXT: ret
44 ; CHECKRV64ZDINX-LABEL: double_not_nan:
45 ; CHECKRV64ZDINX: # %bb.0:
46 ; CHECKRV64ZDINX-NEXT: feq.d a0, a0, a0
47 ; CHECKRV64ZDINX-NEXT: ret
48 %1 = fcmp ord double %a, 0.000000e+00