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 -check-prefix=RV32IFD %s 4; RUN: llc -mtriple=riscv64 -mattr=+d -target-abi lp64d -verify-machineinstrs \ 5; RUN: < %s | FileCheck -check-prefix=RV64IFD %s 6 7define zeroext i1 @double_is_nan(double %a) nounwind { 8; RV32IFD-LABEL: double_is_nan: 9; RV32IFD: # %bb.0: 10; RV32IFD-NEXT: feq.d a0, fa0, fa0 11; RV32IFD-NEXT: seqz a0, a0 12; RV32IFD-NEXT: ret 13; 14; RV64IFD-LABEL: double_is_nan: 15; RV64IFD: # %bb.0: 16; RV64IFD-NEXT: feq.d a0, fa0, fa0 17; RV64IFD-NEXT: seqz a0, a0 18; RV64IFD-NEXT: ret 19 %1 = fcmp uno double %a, 0.000000e+00 20 ret i1 %1 21} 22 23define zeroext i1 @double_not_nan(double %a) nounwind { 24; RV32IFD-LABEL: double_not_nan: 25; RV32IFD: # %bb.0: 26; RV32IFD-NEXT: feq.d a0, fa0, fa0 27; RV32IFD-NEXT: ret 28; 29; RV64IFD-LABEL: double_not_nan: 30; RV64IFD: # %bb.0: 31; RV64IFD-NEXT: feq.d a0, fa0, fa0 32; RV64IFD-NEXT: ret 33 %1 = fcmp ord double %a, 0.000000e+00 34 ret i1 %1 35} 36