33 changes: 33 additions & 0 deletions llvm/test/tools/llvm-mca/X86/sqrt-rsqrt-rcp-memop.s
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
# RUN: llvm-mca -mtriple=x86_64-unknown-unknown -mcpu=bdver2 -iterations=1 -all-views=false -timeline < %s | FileCheck %s -check-prefix=ALL -check-prefix=BDVER2
# RUN: llvm-mca -mtriple=x86_64-unknown-unknown -mcpu=btver2 -iterations=1 -all-views=false -timeline < %s | FileCheck %s -check-prefix=ALL -check-prefix=BTVER2
# RUN: llvm-mca -mtriple=x86_64-unknown-unknown -mcpu=znver1 -iterations=1 -all-views=false -timeline < %s | FileCheck %s -check-prefix=ALL -check-prefix=ZNVER1
# RUN: llvm-mca -mtriple=x86_64-unknown-unknown -mcpu=znver2 -iterations=1 -all-views=false -timeline < %s | FileCheck %s -check-prefix=ALL -check-prefix=ZNVER2
# RUN: llvm-mca -mtriple=x86_64-unknown-unknown -mcpu=haswell -iterations=1 -all-views=false -timeline < %s | FileCheck %s -check-prefix=ALL -check-prefix=HASWELL
# RUN: llvm-mca -mtriple=x86_64-unknown-unknown -mcpu=broadwell -iterations=1 -all-views=false -timeline < %s | FileCheck %s -check-prefix=ALL -check-prefix=BROADWELL
# RUN: llvm-mca -mtriple=x86_64-unknown-unknown -mcpu=skylake -iterations=1 -all-views=false -timeline < %s | FileCheck %s -check-prefix=ALL -check-prefix=SKYLAKE
Expand Down Expand Up @@ -52,6 +53,9 @@ rcpss (%rax), %xmm1
# ZNVER1-NEXT: 0123456789 0
# ZNVER1-NEXT: Index 0123456789 0123456789

# ZNVER2-NEXT: 0123456789 0
# ZNVER2-NEXT: Index 0123456789 0123456789

# BARCELONA: [0,0] DeER . . . . . leaq 8(%rsp,%rdi,2), %rax
# BARCELONA-NEXT: [0,1] D=eeeeeeeeeeeeeeeeeeeeER sqrtss (%rax), %xmm1

Expand All @@ -73,6 +77,9 @@ rcpss (%rax), %xmm1
# ZNVER1: [0,0] DeER . . . . . . leaq 8(%rsp,%rdi,2), %rax
# ZNVER1-NEXT: [0,1] D=eeeeeeeeeeeeeeeeeeeeeeeeeeeER sqrtss (%rax), %xmm1

# ZNVER2: [0,0] DeER . . . . . . leaq 8(%rsp,%rdi,2), %rax
# ZNVER2-NEXT: [0,1] D=eeeeeeeeeeeeeeeeeeeeeeeeeeeER sqrtss (%rax), %xmm1

# 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
Expand Down Expand Up @@ -103,6 +110,9 @@ rcpss (%rax), %xmm1
# ZNVER1-NEXT: 1. 1 2.0 0.0 0.0 sqrtss (%rax), %xmm1
# ZNVER1-NEXT: 1 1.5 0.5 0.0 <total>

# ZNVER2-NEXT: 1. 1 2.0 0.0 0.0 sqrtss (%rax), %xmm1
# ZNVER2-NEXT: 1 1.5 0.5 0.0 <total>

# ALL: [1] Code Region - test_sqrtsd

# ALL: Timeline view:
Expand All @@ -128,6 +138,9 @@ rcpss (%rax), %xmm1
# ZNVER1-NEXT: 0123456789 0
# ZNVER1-NEXT: Index 0123456789 0123456789

# ZNVER2-NEXT: 0123456789 0
# ZNVER2-NEXT: Index 0123456789 0123456789

# BARCELONA: [0,0] DeER . . . . . . leaq 8(%rsp,%rdi,2), %rax
# BARCELONA-NEXT: [0,1] D=eeeeeeeeeeeeeeeeeeeeeeeeeeeER sqrtsd (%rax), %xmm1

Expand All @@ -149,6 +162,9 @@ rcpss (%rax), %xmm1
# ZNVER1: [0,0] DeER . . . . . . leaq 8(%rsp,%rdi,2), %rax
# ZNVER1-NEXT: [0,1] D=eeeeeeeeeeeeeeeeeeeeeeeeeeeER sqrtsd (%rax), %xmm1

# ZNVER2: [0,0] DeER . . . . . . leaq 8(%rsp,%rdi,2), %rax
# ZNVER2-NEXT: [0,1] D=eeeeeeeeeeeeeeeeeeeeeeeeeeeER sqrtsd (%rax), %xmm1

# 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
Expand Down Expand Up @@ -179,6 +195,9 @@ rcpss (%rax), %xmm1
# ZNVER1-NEXT: 1. 1 2.0 0.0 0.0 sqrtsd (%rax), %xmm1
# ZNVER1-NEXT: 1 1.5 0.5 0.0 <total>

# ZNVER2-NEXT: 1. 1 2.0 0.0 0.0 sqrtsd (%rax), %xmm1
# ZNVER2-NEXT: 1 1.5 0.5 0.0 <total>

# ALL: [2] Code Region - test_rsqrtss

# ALL: Timeline view:
Expand All @@ -190,6 +209,7 @@ rcpss (%rax), %xmm1
# HASWELL-NEXT: 0123
# SKYLAKE-NEXT: 012
# ZNVER1-NEXT: 012345
# ZNVER2-NEXT: 012345

# ALL-NEXT: Index 0123456789

Expand All @@ -214,6 +234,9 @@ rcpss (%rax), %xmm1
# ZNVER1: [0,0] DeER . . . leaq 8(%rsp,%rdi,2), %rax
# ZNVER1-NEXT: [0,1] D=eeeeeeeeeeeeER rsqrtss (%rax), %xmm1

# ZNVER2: [0,0] DeER . . . leaq 8(%rsp,%rdi,2), %rax
# ZNVER2-NEXT: [0,1] D=eeeeeeeeeeeeER rsqrtss (%rax), %xmm1

# 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
Expand Down Expand Up @@ -244,6 +267,9 @@ rcpss (%rax), %xmm1
# ZNVER1-NEXT: 1. 1 2.0 0.0 0.0 rsqrtss (%rax), %xmm1
# ZNVER1-NEXT: 1 1.5 0.5 0.0 <total>

# ZNVER2-NEXT: 1. 1 2.0 0.0 0.0 rsqrtss (%rax), %xmm1
# ZNVER2-NEXT: 1 1.5 0.5 0.0 <total>

# ALL: [3] Code Region - test_rcp

# ALL: Timeline view:
Expand All @@ -255,6 +281,7 @@ rcpss (%rax), %xmm1
# HASWELL-NEXT: 0123
# SKYLAKE-NEXT: 012
# ZNVER1-NEXT: 012345
# ZNVER2-NEXT: 012345

# ALL-NEXT: Index 0123456789

Expand All @@ -279,6 +306,9 @@ rcpss (%rax), %xmm1
# ZNVER1: [0,0] DeER . . . leaq 8(%rsp,%rdi,2), %rax
# ZNVER1-NEXT: [0,1] D=eeeeeeeeeeeeER rcpss (%rax), %xmm1

# ZNVER2: [0,0] DeER . . . leaq 8(%rsp,%rdi,2), %rax
# ZNVER2-NEXT: [0,1] D=eeeeeeeeeeeeER rcpss (%rax), %xmm1

# 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
Expand Down Expand Up @@ -308,3 +338,6 @@ rcpss (%rax), %xmm1

# ZNVER1-NEXT: 1. 1 2.0 0.0 0.0 rcpss (%rax), %xmm1
# ZNVER1-NEXT: 1 1.5 0.5 0.0 <total>

# ZNVER2-NEXT: 1. 1 2.0 0.0 0.0 rcpss (%rax), %xmm1
# ZNVER2-NEXT: 1 1.5 0.5 0.0 <total>
20 changes: 20 additions & 0 deletions llvm/test/tools/llvm-mca/X86/variable-blend-read-after-ld-1.s
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@

# RUN: llvm-mca -mtriple=x86_64-unknown-unknown -mcpu=znver1 -iterations=1 -timeline -instruction-info=false -resource-pressure=false < %s | FileCheck %s -check-prefix=ALL -check-prefix=ZNVER1

# RUN: llvm-mca -mtriple=x86_64-unknown-unknown -mcpu=znver2 -iterations=1 -timeline -instruction-info=false -resource-pressure=false < %s | FileCheck %s -check-prefix=ALL -check-prefix=ZNVER2

vaddps %xmm0, %xmm0, %xmm1
vblendvps %xmm1, (%rdi), %xmm2, %xmm3

Expand Down Expand Up @@ -45,6 +47,9 @@ vblendvps %xmm1, (%rdi), %xmm2, %xmm3
# ZNVER1-NEXT: Total Cycles: 11
# ZNVER1-NEXT: Total uOps: 2

# ZNVER2-NEXT: Total Cycles: 11
# ZNVER2-NEXT: Total uOps: 2

# BDVER2: Dispatch Width: 4
# BDVER2-NEXT: uOps Per Cycle: 0.20
# BDVER2-NEXT: IPC: 0.20
Expand Down Expand Up @@ -85,6 +90,11 @@ vblendvps %xmm1, (%rdi), %xmm2, %xmm3
# ZNVER1-NEXT: IPC: 0.18
# ZNVER1-NEXT: Block RThroughput: 1.0

# ZNVER2: Dispatch Width: 4
# ZNVER2-NEXT: uOps Per Cycle: 0.18
# ZNVER2-NEXT: IPC: 0.18
# ZNVER2-NEXT: Block RThroughput: 1.0

# BDVER2: Timeline view:
# BDVER2-NEXT: Index 0123456789

Expand Down Expand Up @@ -115,6 +125,10 @@ vblendvps %xmm1, (%rdi), %xmm2, %xmm3
# ZNVER1-NEXT: 0
# ZNVER1-NEXT: Index 0123456789

# ZNVER2: Timeline view:
# ZNVER2-NEXT: 0
# ZNVER2-NEXT: Index 0123456789

# BDVER2: [0,0] DeeeeeER . vaddps %xmm0, %xmm0, %xmm1
# BDVER2-NEXT: [0,1] DeeeeeeeER vblendvps %xmm1, (%rdi), %xmm2, %xmm3

Expand All @@ -139,6 +153,9 @@ vblendvps %xmm1, (%rdi), %xmm2, %xmm3
# ZNVER1: [0,0] DeeeER . vaddps %xmm0, %xmm0, %xmm1
# ZNVER1-NEXT: [0,1] DeeeeeeeeER vblendvps %xmm1, (%rdi), %xmm2, %xmm3

# ZNVER2: [0,0] DeeeER . vaddps %xmm0, %xmm0, %xmm1
# ZNVER2-NEXT: [0,1] DeeeeeeeeER vblendvps %xmm1, (%rdi), %xmm2, %xmm3

# 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
Expand Down Expand Up @@ -171,3 +188,6 @@ vblendvps %xmm1, (%rdi), %xmm2, %xmm3

# ZNVER1-NEXT: 1. 1 1.0 0.0 0.0 vblendvps %xmm1, (%rdi), %xmm2, %xmm3
# ZNVER1-NEXT: 1 1.0 0.5 0.0 <total>

# ZNVER2-NEXT: 1. 1 1.0 0.0 0.0 vblendvps %xmm1, (%rdi), %xmm2, %xmm3
# ZNVER2-NEXT: 1 1.0 0.5 0.0 <total>
21 changes: 21 additions & 0 deletions llvm/test/tools/llvm-mca/X86/variable-blend-read-after-ld-2.s
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@

# RUN: llvm-mca -mtriple=x86_64-unknown-unknown -mcpu=znver1 -iterations=1 -timeline -instruction-info=false -resource-pressure=false < %s | FileCheck %s -check-prefix=ALL -check-prefix=ZNVER1

# RUN: llvm-mca -mtriple=x86_64-unknown-unknown -mcpu=znver2 -iterations=1 -timeline -instruction-info=false -resource-pressure=false < %s | FileCheck %s -check-prefix=ALL -check-prefix=ZNVER2

vaddps %xmm0, %xmm0, %xmm2
vblendvps %xmm1, (%rdi), %xmm2, %xmm3

Expand Down Expand Up @@ -45,6 +47,9 @@ vblendvps %xmm1, (%rdi), %xmm2, %xmm3
# ZNVER1-NEXT: Total Cycles: 11
# ZNVER1-NEXT: Total uOps: 2

# ZNVER2-NEXT: Total Cycles: 11
# ZNVER2-NEXT: Total uOps: 2

# BDVER2: Dispatch Width: 4
# BDVER2-NEXT: uOps Per Cycle: 0.20
# BDVER2-NEXT: IPC: 0.20
Expand Down Expand Up @@ -85,6 +90,11 @@ vblendvps %xmm1, (%rdi), %xmm2, %xmm3
# ZNVER1-NEXT: IPC: 0.18
# ZNVER1-NEXT: Block RThroughput: 1.0

# ZNVER2: Dispatch Width: 4
# ZNVER2-NEXT: uOps Per Cycle: 0.18
# ZNVER2-NEXT: IPC: 0.18
# ZNVER2-NEXT: Block RThroughput: 1.0

# BDVER2: Timeline view:
# BDVER2-NEXT: Index 0123456789

Expand Down Expand Up @@ -115,6 +125,10 @@ vblendvps %xmm1, (%rdi), %xmm2, %xmm3
# ZNVER1-NEXT: 0
# ZNVER1-NEXT: Index 0123456789

# ZNVER2: Timeline view:
# ZNVER2-NEXT: 0
# ZNVER2-NEXT: Index 0123456789

# BDVER2: [0,0] DeeeeeER . vaddps %xmm0, %xmm0, %xmm2
# BDVER2-NEXT: [0,1] DeeeeeeeER vblendvps %xmm1, (%rdi), %xmm2, %xmm3

Expand All @@ -139,6 +153,9 @@ vblendvps %xmm1, (%rdi), %xmm2, %xmm3
# ZNVER1: [0,0] DeeeER . vaddps %xmm0, %xmm0, %xmm2
# ZNVER1-NEXT: [0,1] DeeeeeeeeER vblendvps %xmm1, (%rdi), %xmm2, %xmm3

# ZNVER2: [0,0] DeeeER . vaddps %xmm0, %xmm0, %xmm2
# ZNVER2-NEXT: [0,1] DeeeeeeeeER vblendvps %xmm1, (%rdi), %xmm2, %xmm3

# 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
Expand Down Expand Up @@ -171,3 +188,7 @@ vblendvps %xmm1, (%rdi), %xmm2, %xmm3

# ZNVER1-NEXT: 1. 1 1.0 0.0 0.0 vblendvps %xmm1, (%rdi), %xmm2, %xmm3
# ZNVER1-NEXT: 1 1.0 0.5 0.0 <total>

# ZNVER2-NEXT: 1. 1 1.0 0.0 0.0 vblendvps %xmm1, (%rdi), %xmm2, %xmm3
# ZNVER2-NEXT: 1 1.0 0.5 0.0 <total>