Skip to content

[RISCV] Update the latency of floating point load in SiFive P500 scheduling model #133165

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 27, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion llvm/lib/Target/RISCV/RISCVSchedSiFiveP500.td
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ def : WriteRes<WriteLDW, [SiFiveP500Load]>;
def : WriteRes<WriteLDD, [SiFiveP500Load]>;
}

let Latency = 6 in {
let Latency = 5 in {
def : WriteRes<WriteFLD16, [SiFiveP500Load]>;
def : WriteRes<WriteFLD32, [SiFiveP500Load]>;
def : WriteRes<WriteFLD64, [SiFiveP500Load]>;
Expand Down
10 changes: 5 additions & 5 deletions llvm/test/tools/llvm-mca/RISCV/SiFiveP500/load.s
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ fld ft0, 0(a0)

# CHECK: Iterations: 1
# CHECK-NEXT: Instructions: 4
# CHECK-NEXT: Total Cycles: 12
# CHECK-NEXT: Total Cycles: 11
# CHECK-NEXT: Total uOps: 4

# CHECK: Dispatch Width: 3
# CHECK-NEXT: uOps Per Cycle: 0.33
# CHECK-NEXT: IPC: 0.33
# CHECK-NEXT: uOps Per Cycle: 0.36
# CHECK-NEXT: IPC: 0.36
# CHECK-NEXT: Block RThroughput: 4.0

# CHECK: Instruction Info:
Expand All @@ -28,8 +28,8 @@ fld ft0, 0(a0)
# CHECK: [1] [2] [3] [4] [5] [6] Instructions:
# CHECK-NEXT: 1 4 1.00 * lw t0, 0(a0)
# CHECK-NEXT: 1 4 1.00 * ld t0, 0(a0)
# CHECK-NEXT: 1 6 1.00 * flw ft0, 0(a0)
# CHECK-NEXT: 1 6 1.00 * fld ft0, 0(a0)
# CHECK-NEXT: 1 5 1.00 * flw ft0, 0(a0)
# CHECK-NEXT: 1 5 1.00 * fld ft0, 0(a0)

# CHECK: Resources:
# CHECK-NEXT: [0] - SiFiveP500Div
Expand Down