Index: test/tools/llvm-mca/X86/register-file-statistics.s =================================================================== --- /dev/null +++ test/tools/llvm-mca/X86/register-file-statistics.s @@ -0,0 +1,140 @@ +# NOTE: Assertions have been autogenerated by utils/update_mca_test_checks.py +# RUN: llvm-mca %s -mtriple=x86_64-unknown-unknown -mcpu=btver2 -iterations=1 -register-file-stats -instruction-info=false -resource-pressure=false < %s | FileCheck --check-prefix=ALL --check-prefix=BTVER2 %s +# RUN: llvm-mca %s -mtriple=x86_64-unknown-unknown -mcpu=znver1 -iterations=1 -register-file-stats -instruction-info=false -resource-pressure=false < %s | FileCheck --check-prefix=ALL --check-prefix=ZNVER1 %s +# RUN: llvm-mca %s -mtriple=x86_64-unknown-unknown -mcpu=sandybridge -iterations=1 -register-file-stats -instruction-info=false -resource-pressure=false < %s | FileCheck --check-prefix=ALL --check-prefix=SANDYBRIDGE %s +# RUN: llvm-mca %s -mtriple=x86_64-unknown-unknown -mcpu=ivybridge -iterations=1 -register-file-stats -instruction-info=false -resource-pressure=false < %s | FileCheck --check-prefix=ALL --check-prefix=IVYBRIDGE %s +# RUN: llvm-mca %s -mtriple=x86_64-unknown-unknown -mcpu=haswell -iterations=1 -register-file-stats -instruction-info=false -resource-pressure=false < %s | FileCheck --check-prefix=ALL --check-prefix=HASWELL %s +# RUN: llvm-mca %s -mtriple=x86_64-unknown-unknown -mcpu=broadwell -iterations=1 -register-file-stats -instruction-info=false -resource-pressure=false < %s | FileCheck --check-prefix=ALL --check-prefix=BROADWELL %s +# RUN: llvm-mca %s -mtriple=x86_64-unknown-unknown -mcpu=knl -iterations=1 -register-file-stats -instruction-info=false -resource-pressure=false < %s | FileCheck --check-prefix=ALL --check-prefix=KNL %s +# RUN: llvm-mca %s -mtriple=x86_64-unknown-unknown -mcpu=skylake -iterations=1 -register-file-stats -instruction-info=false -resource-pressure=false < %s | FileCheck --check-prefix=ALL --check-prefix=SKX %s +# RUN: llvm-mca %s -mtriple=x86_64-unknown-unknown -mcpu=skylake-avx512 -iterations=1 -register-file-stats -instruction-info=false -resource-pressure=false < %s | FileCheck --check-prefix=ALL --check-prefix=SKX-AVX512 %s +# RUN: llvm-mca %s -mtriple=x86_64-unknown-unknown -mcpu=slm -iterations=1 -register-file-stats -instruction-info=false -resource-pressure=false < %s | FileCheck --check-prefix=ALL --check-prefix=SLM %s + +xor %eax, %eax + +# BDWELL-NEXT: Total Cycles: 4 +# BDWELL-NEXT: Dispatch Width: 4 +# BDWELL-NEXT: IPC: 0.25 +# BDWELL-NEXT: Block RThroughput: 0.3 + +# SANDYBRID-NEXT: Total Cycles: 4 +# SANDYBRID-NEXT: Dispatch Width: 4 +# SANDYBRID-NEXT: IPC: 0.25 +# SANDYBRID-NEXT: Block RThroughput: 0.3 + +# SKLCLI-NEXT: Total Cycles: 4 +# SKLCLI-NEXT: Dispatch Width: 6 +# SKLCLI-NEXT: IPC: 0.25 +# SKLCLI-NEXT: Block RThroughput: 0.3 + +# SKLSER-NEXT: Total Cycles: 4 +# SKLSER-NEXT: Dispatch Width: 6 +# SKLSER-NEXT: IPC: 0.25 +# SKLSER-NEXT: Block RThroughput: 0.3 + +# BDWELL-NEXT: Total number of mappings created: 2 +# BDWELL-NEXT: Max number of mappings used: 2 + +# SANDYBRID-NEXT: Total number of mappings created: 2 +# SANDYBRID-NEXT: Max number of mappings used: 2 + +# SKLCLI-NEXT: Total number of mappings created: 2 +# SKLCLI-NEXT: Max number of mappings used: 2 + +# SKLSER-NEXT: Total number of mappings created: 2 +# SKLSER-NEXT: Max number of mappings used: 2 + +# ALL: Iterations: 1 +# ALL-NEXT: Instructions: 1 + +# BROADWELL-NEXT: Total Cycles: 4 +# BROADWELL-NEXT: Dispatch Width: 4 +# BROADWELL-NEXT: IPC: 0.25 +# BROADWELL-NEXT: Block RThroughput: 0.3 + +# BTVER2-NEXT: Total Cycles: 2 +# BTVER2-NEXT: Dispatch Width: 2 +# BTVER2-NEXT: IPC: 0.50 +# BTVER2-NEXT: Block RThroughput: 0.5 + +# HASWELL-NEXT: Total Cycles: 4 +# HASWELL-NEXT: Dispatch Width: 4 +# HASWELL-NEXT: IPC: 0.25 +# HASWELL-NEXT: Block RThroughput: 0.3 + +# IVYBRIDGE-NEXT: Total Cycles: 4 +# IVYBRIDGE-NEXT: Dispatch Width: 4 +# IVYBRIDGE-NEXT: IPC: 0.25 +# IVYBRIDGE-NEXT: Block RThroughput: 0.3 + +# KNL-NEXT: Total Cycles: 4 +# KNL-NEXT: Dispatch Width: 4 +# KNL-NEXT: IPC: 0.25 +# KNL-NEXT: Block RThroughput: 0.3 + +# SANDYBRIDGE-NEXT: Total Cycles: 4 +# SANDYBRIDGE-NEXT: Dispatch Width: 4 +# SANDYBRIDGE-NEXT: IPC: 0.25 +# SANDYBRIDGE-NEXT: Block RThroughput: 0.3 + +# SKX-NEXT: Total Cycles: 4 +# SKX-NEXT: Dispatch Width: 6 +# SKX-NEXT: IPC: 0.25 +# SKX-NEXT: Block RThroughput: 0.3 + +# SKX-AVX512-NEXT: Total Cycles: 4 +# SKX-AVX512-NEXT: Dispatch Width: 6 +# SKX-AVX512-NEXT: IPC: 0.25 +# SKX-AVX512-NEXT: Block RThroughput: 0.3 + +# SLM-NEXT: Total Cycles: 4 +# SLM-NEXT: Dispatch Width: 2 +# SLM-NEXT: IPC: 0.25 +# SLM-NEXT: Block RThroughput: 0.5 + +# ZNVER1-NEXT: Total Cycles: 4 +# ZNVER1-NEXT: Dispatch Width: 4 +# ZNVER1-NEXT: IPC: 0.25 +# ZNVER1-NEXT: Block RThroughput: 0.3 + +# ALL: Register File statistics: + +# BROADWELL-NEXT: Total number of mappings created: 2 +# BROADWELL-NEXT: Max number of mappings used: 2 + +# BTVER2-NEXT: Total number of mappings created: 0 +# BTVER2-NEXT: Max number of mappings used: 0 + +# HASWELL-NEXT: Total number of mappings created: 2 +# HASWELL-NEXT: Max number of mappings used: 2 + +# IVYBRIDGE-NEXT: Total number of mappings created: 2 +# IVYBRIDGE-NEXT: Max number of mappings used: 2 + +# KNL-NEXT: Total number of mappings created: 2 +# KNL-NEXT: Max number of mappings used: 2 + +# SANDYBRIDGE-NEXT: Total number of mappings created: 2 +# SANDYBRIDGE-NEXT: Max number of mappings used: 2 + +# SKX-NEXT: Total number of mappings created: 2 +# SKX-NEXT: Max number of mappings used: 2 + +# SKX-AVX512-NEXT: Total number of mappings created: 2 +# SKX-AVX512-NEXT: Max number of mappings used: 2 + +# SLM-NEXT: Total number of mappings created: 2 +# SLM-NEXT: Max number of mappings used: 2 + +# ZNVER1-NEXT: Total number of mappings created: 2 +# ZNVER1-NEXT: Max number of mappings used: 2 + +# BTVER2: * Register File #1 -- JFpuPRF: +# BTVER2-NEXT: Number of physical registers: 72 +# BTVER2-NEXT: Total number of mappings created: 0 +# BTVER2-NEXT: Max number of mappings used: 0 + +# BTVER2: * Register File #2 -- JIntegerPRF: +# BTVER2-NEXT: Number of physical registers: 64 +# BTVER2-NEXT: Total number of mappings created: 0 +# BTVER2-NEXT: Max number of mappings used: 0 Index: test/tools/llvm-mca/X86/scheduler-queue-usage.s =================================================================== --- /dev/null +++ test/tools/llvm-mca/X86/scheduler-queue-usage.s @@ -0,0 +1,174 @@ +# NOTE: Assertions have been autogenerated by utils/update_mca_test_checks.py +# RUN: llvm-mca %s -mtriple=x86_64-unknown-unknown -mcpu=btver2 -iterations=1 -scheduler-stats -instruction-info=false -resource-pressure=false < %s | FileCheck --check-prefix=ALL --check-prefix=BTVER2 %s +# RUN: llvm-mca %s -mtriple=x86_64-unknown-unknown -mcpu=znver1 -iterations=1 -scheduler-stats -instruction-info=false -resource-pressure=false < %s | FileCheck --check-prefix=ALL --check-prefix=ZNVER1 %s +# RUN: llvm-mca %s -mtriple=x86_64-unknown-unknown -mcpu=sandybridge -iterations=1 -scheduler-stats -instruction-info=false -resource-pressure=false < %s | FileCheck --check-prefix=ALL --check-prefix=SANDYBRIDGE %s +# RUN: llvm-mca %s -mtriple=x86_64-unknown-unknown -mcpu=ivybridge -iterations=1 -scheduler-stats -instruction-info=false -resource-pressure=false < %s | FileCheck --check-prefix=ALL --check-prefix=IVYBRIDGE %s +# RUN: llvm-mca %s -mtriple=x86_64-unknown-unknown -mcpu=haswell -iterations=1 -scheduler-stats -instruction-info=false -resource-pressure=false < %s | FileCheck --check-prefix=ALL --check-prefix=HASWELL %s +# RUN: llvm-mca %s -mtriple=x86_64-unknown-unknown -mcpu=broadwell -iterations=1 -scheduler-stats -instruction-info=false -resource-pressure=false < %s | FileCheck --check-prefix=ALL --check-prefix=BROADWELL %s +# RUN: llvm-mca %s -mtriple=x86_64-unknown-unknown -mcpu=knl -iterations=1 -scheduler-stats -instruction-info=false -resource-pressure=false < %s | FileCheck --check-prefix=ALL --check-prefix=KNL %s +# RUN: llvm-mca %s -mtriple=x86_64-unknown-unknown -mcpu=skylake -iterations=1 -scheduler-stats -instruction-info=false -resource-pressure=false < %s | FileCheck --check-prefix=ALL --check-prefix=SKX %s +# RUN: llvm-mca %s -mtriple=x86_64-unknown-unknown -mcpu=skylake-avx512 -iterations=1 -scheduler-stats -instruction-info=false -resource-pressure=false < %s | FileCheck --check-prefix=ALL --check-prefix=SKX-AVX512 %s +# RUN: llvm-mca %s -mtriple=x86_64-unknown-unknown -mcpu=slm -iterations=1 -scheduler-stats -instruction-info=false -resource-pressure=false < %s | FileCheck --check-prefix=ALL --check-prefix=SLM %s + +xor %eax, %eax + +# BDWELL-NEXT: Total Cycles: 4 +# BDWELL-NEXT: Dispatch Width: 4 +# BDWELL-NEXT: IPC: 0.25 +# BDWELL-NEXT: Block RThroughput: 0.3 + +# SANDYBRID-NEXT: Total Cycles: 4 +# SANDYBRID-NEXT: Dispatch Width: 4 +# SANDYBRID-NEXT: IPC: 0.25 +# SANDYBRID-NEXT: Block RThroughput: 0.3 + +# SKLCLI-NEXT: Total Cycles: 4 +# SKLCLI-NEXT: Dispatch Width: 6 +# SKLCLI-NEXT: IPC: 0.25 +# SKLCLI-NEXT: Block RThroughput: 0.3 + +# SKLSER-NEXT: Total Cycles: 4 +# SKLSER-NEXT: Dispatch Width: 6 +# SKLSER-NEXT: IPC: 0.25 +# SKLSER-NEXT: Block RThroughput: 0.3 + +# BDWELL-NEXT: 0, 3 (75.0%) +# BDWELL-NEXT: 1, 1 (25.0%) + +# SANDYBRID-NEXT: 0, 3 (75.0%) +# SANDYBRID-NEXT: 1, 1 (25.0%) + +# SKLCLI-NEXT: 0, 3 (75.0%) +# SKLCLI-NEXT: 1, 1 (25.0%) + +# SKLSER-NEXT: 0, 3 (75.0%) +# SKLSER-NEXT: 1, 1 (25.0%) + +# BDWELL: Scheduler's queue usage: +# BDWELL-NEXT: BWPortAny, 1/60 + +# SANDYBRID: Scheduler's queue usage: +# SANDYBRID-NEXT: SBPortAny, 1/54 + +# SKLCLI: Scheduler's queue usage: +# SKLCLI-NEXT: SKLPortAny, 1/60 + +# SKLSER: Scheduler's queue usage: +# SKLSER-NEXT: SKXPortAny, 1/60 + +# ALL: Iterations: 1 +# ALL-NEXT: Instructions: 1 + +# BROADWELL-NEXT: Total Cycles: 4 +# BROADWELL-NEXT: Dispatch Width: 4 +# BROADWELL-NEXT: IPC: 0.25 +# BROADWELL-NEXT: Block RThroughput: 0.3 + +# BTVER2-NEXT: Total Cycles: 2 +# BTVER2-NEXT: Dispatch Width: 2 +# BTVER2-NEXT: IPC: 0.50 +# BTVER2-NEXT: Block RThroughput: 0.5 + +# HASWELL-NEXT: Total Cycles: 4 +# HASWELL-NEXT: Dispatch Width: 4 +# HASWELL-NEXT: IPC: 0.25 +# HASWELL-NEXT: Block RThroughput: 0.3 + +# IVYBRIDGE-NEXT: Total Cycles: 4 +# IVYBRIDGE-NEXT: Dispatch Width: 4 +# IVYBRIDGE-NEXT: IPC: 0.25 +# IVYBRIDGE-NEXT: Block RThroughput: 0.3 + +# KNL-NEXT: Total Cycles: 4 +# KNL-NEXT: Dispatch Width: 4 +# KNL-NEXT: IPC: 0.25 +# KNL-NEXT: Block RThroughput: 0.3 + +# SANDYBRIDGE-NEXT: Total Cycles: 4 +# SANDYBRIDGE-NEXT: Dispatch Width: 4 +# SANDYBRIDGE-NEXT: IPC: 0.25 +# SANDYBRIDGE-NEXT: Block RThroughput: 0.3 + +# SKX-NEXT: Total Cycles: 4 +# SKX-NEXT: Dispatch Width: 6 +# SKX-NEXT: IPC: 0.25 +# SKX-NEXT: Block RThroughput: 0.3 + +# SKX-AVX512-NEXT: Total Cycles: 4 +# SKX-AVX512-NEXT: Dispatch Width: 6 +# SKX-AVX512-NEXT: IPC: 0.25 +# SKX-AVX512-NEXT: Block RThroughput: 0.3 + +# SLM-NEXT: Total Cycles: 4 +# SLM-NEXT: Dispatch Width: 2 +# SLM-NEXT: IPC: 0.25 +# SLM-NEXT: Block RThroughput: 0.5 + +# ZNVER1-NEXT: Total Cycles: 4 +# ZNVER1-NEXT: Dispatch Width: 4 +# ZNVER1-NEXT: IPC: 0.25 +# ZNVER1-NEXT: Block RThroughput: 0.3 + +# ALL: Schedulers - number of cycles where we saw N instructions issued: +# ALL-NEXT: [# issued], [# cycles] + +# BROADWELL-NEXT: 0, 3 (75.0%) +# BROADWELL-NEXT: 1, 1 (25.0%) + +# BTVER2-NEXT: 0, 1 (50.0%) +# BTVER2-NEXT: 1, 1 (50.0%) + +# HASWELL-NEXT: 0, 3 (75.0%) +# HASWELL-NEXT: 1, 1 (25.0%) + +# IVYBRIDGE-NEXT: 0, 3 (75.0%) +# IVYBRIDGE-NEXT: 1, 1 (25.0%) + +# KNL-NEXT: 0, 3 (75.0%) +# KNL-NEXT: 1, 1 (25.0%) + +# SANDYBRIDGE-NEXT: 0, 3 (75.0%) +# SANDYBRIDGE-NEXT: 1, 1 (25.0%) + +# SKX-NEXT: 0, 3 (75.0%) +# SKX-NEXT: 1, 1 (25.0%) + +# SKX-AVX512-NEXT: 0, 3 (75.0%) +# SKX-AVX512-NEXT: 1, 1 (25.0%) + +# SLM-NEXT: 0, 3 (75.0%) +# SLM-NEXT: 1, 1 (25.0%) + +# ZNVER1-NEXT: 0, 3 (75.0%) +# ZNVER1-NEXT: 1, 1 (25.0%) + +# BROADWELL: Scheduler's queue usage: +# BROADWELL-NEXT: BWPortAny, 1/60 + +# HASWELL: Scheduler's queue usage: +# HASWELL-NEXT: HWPortAny, 1/60 + +# KNL: Scheduler's queue usage: +# KNL-NEXT: HWPortAny, 1/60 + +# BTVER2: Scheduler's queue usage: +# BTVER2-NEXT: No scheduler resources used. + +# SLM: Scheduler's queue usage: +# SLM-NEXT: No scheduler resources used. + +# IVYBRIDGE: Scheduler's queue usage: +# IVYBRIDGE-NEXT: SBPortAny, 1/54 + +# SANDYBRIDGE: Scheduler's queue usage: +# SANDYBRIDGE-NEXT: SBPortAny, 1/54 + +# SKX: Scheduler's queue usage: +# SKX-NEXT: SKLPortAny, 1/60 + +# SKX-AVX512: Scheduler's queue usage: +# SKX-AVX512-NEXT: SKXPortAny, 1/60 + +# ZNVER1: Scheduler's queue usage: +# ZNVER1-NEXT: ZnAGU, 0/28 +# ZNVER1-NEXT: ZnALU, 1/56