diff --git a/llvm/lib/Target/RISCV/RISCVSchedSiFive7.td b/llvm/lib/Target/RISCV/RISCVSchedSiFive7.td index ddb6427ff3366..d1d5a27da40f0 100644 --- a/llvm/lib/Target/RISCV/RISCVSchedSiFive7.td +++ b/llvm/lib/Target/RISCV/RISCVSchedSiFive7.td @@ -362,16 +362,14 @@ multiclass SiFive7WriteResBase; let Latency = 3 in { - def : WriteRes; - def : WriteRes; - def : WriteRes; - def : WriteRes; - } - - let Latency = 2 in { - def : WriteRes; - def : WriteRes; - def : WriteRes; + def : WriteRes; + def : WriteRes; + def : WriteRes; + def : WriteRes; + + def : WriteRes; + def : WriteRes; + def : WriteRes; } // Atomic memory diff --git a/llvm/test/tools/llvm-mca/RISCV/SiFive7/scalar-load-store.s b/llvm/test/tools/llvm-mca/RISCV/SiFive7/scalar-load-store.s new file mode 100644 index 0000000000000..01fe46244b558 --- /dev/null +++ b/llvm/test/tools/llvm-mca/RISCV/SiFive7/scalar-load-store.s @@ -0,0 +1,82 @@ +# NOTE: Assertions have been autogenerated by utils/update_mca_test_checks.py +# RUN: llvm-mca -mtriple=riscv64 -mcpu=sifive-x280 -instruction-tables=full -iterations=1 < %s \ +# RUN: | FileCheck %s + +lh t0, 0(sp) +flh fa0, 0(sp) +lw t2, 0(sp) +flw fa2, 0(sp) +ld t4, 0(sp) +fld fa4, 0(sp) + +sh t1, 0(sp) +fsh fa1, 0(sp) +sw t3, 0(sp) +fsw fa3, 0(sp) +sd t5, 0(sp) +fsd fa5, 0(sp) + +# CHECK: Resources: +# CHECK-NEXT: [0] - VLEN512SiFive7FDiv:1 +# CHECK-NEXT: [1] - VLEN512SiFive7IDiv:1 +# CHECK-NEXT: [2] - VLEN512SiFive7PipeA:1 +# CHECK-NEXT: [3] - VLEN512SiFive7PipeAB:2 VLEN512SiFive7PipeA, VLEN512SiFive7PipeB +# CHECK-NEXT: [4] - VLEN512SiFive7PipeB:1 +# CHECK-NEXT: [5] - VLEN512SiFive7VA:1 +# CHECK-NEXT: [6] - VLEN512SiFive7VCQ:1 +# CHECK-NEXT: [7] - VLEN512SiFive7VL:1 +# CHECK-NEXT: [8] - VLEN512SiFive7VS: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 ( | [] | [,