[llvm] [MCA] Retire all non-carried-over instructions in InOrderIssueStage (PR #176686)
Min-Yih Hsu via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 20 09:28:29 PST 2026
================
@@ -0,0 +1,77 @@
+# NOTE: Assertions have been autogenerated by utils/update_mca_test_checks.py
+# RUN: llvm-mca -mtriple=aarch64 -mcpu=cortex-a55 -timeline -iterations=1 < %s | FileCheck %s
+
+stp x29, x0, [sp, #-16]!
+ldp x29, x0, [sp], #16
+mov w0, wzr
+ret
+
+# CHECK: Iterations: 1
+# CHECK-NEXT: Instructions: 4
+# CHECK-NEXT: Total Cycles: 6
+# CHECK-NEXT: Total uOps: 7
+
+# CHECK: Dispatch Width: 2
+# CHECK-NEXT: uOps Per Cycle: 1.17
+# CHECK-NEXT: IPC: 0.67
+# CHECK-NEXT: Block RThroughput: 3.5
+
+# 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: [1] [2] [3] [4] [5] [6] Instructions:
+# CHECK-NEXT: 2 1 1.00 * stp x29, x0, [sp, #-16]!
+# CHECK-NEXT: 3 5 2.00 * ldp x29, x0, [sp], #16
+# CHECK-NEXT: 1 3 0.50 mov w0, wzr
+# CHECK-NEXT: 1 1 1.00 U ret
+
+# CHECK: Resources:
+# CHECK-NEXT: [0.0] - CortexA55UnitALU
+# CHECK-NEXT: [0.1] - CortexA55UnitALU
+# CHECK-NEXT: [1] - CortexA55UnitB
+# CHECK-NEXT: [2] - CortexA55UnitDiv
+# CHECK-NEXT: [3.0] - CortexA55UnitFPALU
+# CHECK-NEXT: [3.1] - CortexA55UnitFPALU
+# CHECK-NEXT: [4] - CortexA55UnitFPDIV
+# CHECK-NEXT: [5.0] - CortexA55UnitFPMAC
+# CHECK-NEXT: [5.1] - CortexA55UnitFPMAC
+# CHECK-NEXT: [6] - CortexA55UnitLd
+# CHECK-NEXT: [7] - CortexA55UnitMAC
+# CHECK-NEXT: [8] - CortexA55UnitSt
+
+# CHECK: Resource pressure per iteration:
+# CHECK-NEXT: [0.0] [0.1] [1] [2] [3.0] [3.1] [4] [5.0] [5.1] [6] [7] [8]
+# CHECK-NEXT: - 1.00 1.00 - - - - - - 2.00 - 1.00
+
+# CHECK: Resource pressure by instruction:
+# CHECK-NEXT: [0.0] [0.1] [1] [2] [3.0] [3.1] [4] [5.0] [5.1] [6] [7] [8] Instructions:
+# CHECK-NEXT: - - - - - - - - - - - 1.00 stp x29, x0, [sp, #-16]!
+# CHECK-NEXT: - - - - - - - - - 2.00 - - ldp x29, x0, [sp], #16
+# CHECK-NEXT: - 1.00 - - - - - - - - - - mov w0, wzr
+# CHECK-NEXT: - - 1.00 - - - - - - - - - ret
+
+# CHECK: Timeline view:
+# CHECK-NEXT: Index 012345
+
+# CHECK: [0,0] DE . stp x29, x0, [sp, #-16]!
----------------
mshockwave wrote:
I thought in the original issue, the problem started to show up in the second `stp`. Should we run at least two iterations?
https://github.com/llvm/llvm-project/pull/176686
More information about the llvm-commits
mailing list