# NOTE: Assertions have been autogenerated by utils/update_mca_test_checks.py # RUN: llvm-mca -mtriple=riscv64 -mcpu=spacemit-x60 -iterations=1 -instruction-tables=full < %s | FileCheck %s # Floating-Point Load and Store Instructions ## Half-Precision flh ft0, 0(a0) fsh ft0, 0(a0) ## Single-Precision flw ft0, 0(a0) fsw ft0, 0(a0) ## Double-Precision fld ft0, 0(a0) fsd ft0, 0(a0) # Floating-Point Computational Instructions ## Half-Precision fadd.h f26, f27, f28 fsub.h f29, f30, f31 fmul.h ft0, ft1, ft2 fdiv.h ft3, ft4, ft5 fsqrt.h ft6, ft7 fmin.h fa5, fa6, fa7 fmax.h fs2, fs3, fs4 fmadd.h f10, f11, f12, f31 fmsub.h f14, f15, f16, f17 fnmsub.h f18, f19, f20, f21 fnmadd.h f22, f23, f24, f25 ## Single-Precision fadd.s f26, f27, f28 fsub.s f29, f30, f31 fmul.s ft0, ft1, ft2 fdiv.s ft3, ft4, ft5 fsqrt.s ft6, ft7 fmin.s fa5, fa6, fa7 fmax.s fs2, fs3, fs4 fmadd.s f10, f11, f12, f31 fmsub.s f14, f15, f16, f17 fnmsub.s f18, f19, f20, f21 fnmadd.s f22, f23, f24, f25 ## Double-Precision fadd.d f26, f27, f28 fsub.d f29, f30, f31 fmul.d ft0, ft1, ft2 fdiv.d ft3, ft4, ft5 fsqrt.d ft6, ft7 fmin.d fa5, fa6, fa7 fmax.d fs2, fs3, fs4 fmadd.d f10, f11, f12, f31 fmsub.d f14, f15, f16, f17 fnmsub.d f18, f19, f20, f21 fnmadd.d f22, f23, f24, f25 # Floating-Point Conversion and Move Instructions ## Half-Precision fmv.x.h a2, fs7 fmv.h.x ft1, a6 fcvt.s.h fa0, ft0 fcvt.s.h fa0, ft0, rup fcvt.h.s ft2, fa2 fcvt.d.h fa0, ft0 fcvt.d.h fa0, ft0, rup fcvt.h.d ft2, fa2 ## Single-Precision fcvt.w.s a0, fs5 fcvt.wu.s a1, fs6 fcvt.s.w ft11, a4 fcvt.s.wu ft0, a5 fcvt.l.s a0, ft0 fcvt.lu.s a1, ft1 fcvt.s.l ft2, a2 fcvt.s.lu ft3, a3 fmv.x.w a2, fs7 fmv.w.x ft1, a6 fsgnj.s fs1, fa0, fa1 fsgnjn.s fa1, fa3, fa4 ## Double-Precision fcvt.wu.d a4, ft11 fcvt.w.d a4, ft11 fcvt.d.w ft0, a5 fcvt.d.wu ft1, a6 fcvt.s.d fs5, fs6 fcvt.d.s fs7, fs8 fcvt.l.d a0, ft0 fcvt.lu.d a1, ft1 fcvt.d.l ft3, a3 fcvt.d.lu ft4, a4 fmv.x.d a2, ft2 fmv.d.x ft5, a5 fsgnj.d fs1, fa0, fa1 fsgnjn.d fa1, fa3, fa4 # Floating-Point Compare Instructions ## Half-Precision feq.h a1, fs8, fs9 flt.h a2, fs10, fs11 fle.h a3, ft8, ft9 ## Single-Precision feq.s a1, fs8, fs9 flt.s a2, fs10, fs11 fle.s a3, ft8, ft9 ## Double-Precision feq.d a1, fs8, fs9 flt.d a2, fs10, fs11 fle.d a3, ft8, ft9 # Floating-Point Classify Instruction ## Half-Precision fclass.s a3, ft10 ## Single-Precision fclass.s a3, ft10 ## Double-Precision fclass.d a3, ft10 # CHECK: Resources: # CHECK-NEXT: [0] - SMX60_FP:1 # CHECK-NEXT: [1] - SMX60_IEU:2 SMX60_IEUA, SMX60_IEUB # CHECK-NEXT: [2] - SMX60_IEUA:1 # CHECK-NEXT: [3] - SMX60_IEUB:1 # CHECK-NEXT: [4] - SMX60_LS:2 # CHECK-NEXT: [5] - SMX60_VFP:1 # CHECK-NEXT: [6] - SMX60_VIEU:1 # CHECK-NEXT: [7] - SMX60_VLS:1 # CHECK: Instruction Info: # CHECK-NEXT: [1]: #uOps # CHECK-NEXT: [2]: Latency # CHECK-NEXT: [3]: RThroughput # CHECK-NEXT: [4]: MayLoad # CHECK-NEXT: [5]: MayStore # CHECK-NEXT: [6]: HasSideEffects (U) # CHECK-NEXT: [7]: Bypass Latency # CHECK-NEXT: [8]: Resources ( | [] | [,