summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Pilgrim <llvm-dev@redking.me.uk>2018-10-04 16:26:56 +0000
committerSimon Pilgrim <llvm-dev@redking.me.uk>2018-10-04 16:26:56 +0000
commit8a53bcc1e66412bfb0074ed4daca5d740da78bb4 (patch)
tree71be31ba57061e76057e3831bc7dcf6bb3b56bd0
parent86b5672bebe5bb6e4f52f541e02a19a0a3deaf2d (diff)
[llvm-mca][x86] Add PR36951 ReadAfterLd test case
-rw-r--r--llvm/test/tools/llvm-mca/X86/read-after-ld-3.s50
1 files changed, 50 insertions, 0 deletions
diff --git a/llvm/test/tools/llvm-mca/X86/read-after-ld-3.s b/llvm/test/tools/llvm-mca/X86/read-after-ld-3.s
new file mode 100644
index 00000000000..315156df62c
--- /dev/null
+++ b/llvm/test/tools/llvm-mca/X86/read-after-ld-3.s
@@ -0,0 +1,50 @@
+# NOTE: Assertions have been autogenerated by utils/update_mca_test_checks.py
+# RUN: llvm-mca -mtriple=x86_64-unknown-unknown -mcpu=sandybridge -iterations=1 -resource-pressure=false -instruction-info=false -timeline < %s | FileCheck %s -check-prefix=ALL -check-prefix=SANDY
+# RUN: llvm-mca -mtriple=x86_64-unknown-unknown -mcpu=haswell -iterations=1 -resource-pressure=false -instruction-info=false -timeline < %s | FileCheck %s -check-prefix=ALL -check-prefix=HASWELL
+# RUN: llvm-mca -mtriple=x86_64-unknown-unknown -mcpu=broadwell -iterations=1 -resource-pressure=false -instruction-info=false -timeline < %s | FileCheck %s -check-prefix=ALL -check-prefix=BDWELL
+# RUN: llvm-mca -mtriple=x86_64-unknown-unknown -mcpu=skylake -iterations=1 -resource-pressure=false -instruction-info=false -timeline < %s | FileCheck %s -check-prefix=ALL -check-prefix=SKYLAKE
+
+# PR36951
+addl %edi, %esi
+addl (%rdi), %esi
+
+# ALL: Iterations: 1
+# ALL-NEXT: Instructions: 2
+# ALL-NEXT: Total Cycles: 9
+# ALL-NEXT: Total uOps: 3
+
+# BDWELL: Dispatch Width: 4
+# BDWELL-NEXT: uOps Per Cycle: 0.33
+# BDWELL-NEXT: IPC: 0.22
+# BDWELL-NEXT: Block RThroughput: 0.8
+
+# HASWELL: Dispatch Width: 4
+# HASWELL-NEXT: uOps Per Cycle: 0.33
+# HASWELL-NEXT: IPC: 0.22
+# HASWELL-NEXT: Block RThroughput: 0.8
+
+# SANDY: Dispatch Width: 4
+# SANDY-NEXT: uOps Per Cycle: 0.33
+# SANDY-NEXT: IPC: 0.22
+# SANDY-NEXT: Block RThroughput: 0.8
+
+# SKYLAKE: Dispatch Width: 6
+# SKYLAKE-NEXT: uOps Per Cycle: 0.33
+# SKYLAKE-NEXT: IPC: 0.22
+# SKYLAKE-NEXT: Block RThroughput: 0.5
+
+# ALL: Timeline view:
+# ALL-NEXT: Index 012345678
+
+# ALL: [0,0] DeER . . addl %edi, %esi
+# ALL-NEXT: [0,1] DeeeeeeER addl (%rdi), %esi
+
+# ALL: Average Wait times (based on the timeline view):
+# ALL-NEXT: [0]: Executions
+# ALL-NEXT: [1]: Average time spent waiting in a scheduler's queue
+# ALL-NEXT: [2]: Average time spent waiting in a scheduler's queue while ready
+# ALL-NEXT: [3]: Average time elapsed from WB until retire stage
+
+# ALL: [0] [1] [2] [3]
+# ALL-NEXT: 0. 1 1.0 1.0 0.0 addl %edi, %esi
+# ALL-NEXT: 1. 1 1.0 0.0 0.0 addl (%rdi), %esi