1# NOTE: Assertions have been autogenerated by utils/update_mca_test_checks.py 2# RUN: llvm-mca -mtriple=x86_64-unknown-unknown -mcpu=znver2 -iterations=1500 -timeline -timeline-max-iterations=4 < %s | FileCheck %s 3 4# Each lzcnt has a false dependency on %ecx; the first lzcnt has to wait on the 5# imul. However, the folded load can start immediately. 6# The last lzcnt has a false dependency on %cx. However, even in this case, the 7# folded load can start immediately. 8 9imul %edx, %ecx 10lzcnt (%rsp), %cx 11lzcnt 2(%rsp), %cx 12 13# CHECK: Iterations: 1500 14# CHECK-NEXT: Instructions: 4500 15# CHECK-NEXT: Total Cycles: 9003 16# CHECK-NEXT: Total uOps: 7500 17 18# CHECK: Dispatch Width: 4 19# CHECK-NEXT: uOps Per Cycle: 0.83 20# CHECK-NEXT: IPC: 0.50 21# CHECK-NEXT: Block RThroughput: 1.3 22 23# CHECK: Instruction Info: 24# CHECK-NEXT: [1]: #uOps 25# CHECK-NEXT: [2]: Latency 26# CHECK-NEXT: [3]: RThroughput 27# CHECK-NEXT: [4]: MayLoad 28# CHECK-NEXT: [5]: MayStore 29# CHECK-NEXT: [6]: HasSideEffects (U) 30 31# CHECK: [1] [2] [3] [4] [5] [6] Instructions: 32# CHECK-NEXT: 1 3 1.00 imull %edx, %ecx 33# CHECK-NEXT: 2 5 0.33 * lzcntw (%rsp), %cx 34# CHECK-NEXT: 2 5 0.33 * lzcntw 2(%rsp), %cx 35 36# CHECK: Resources: 37# CHECK-NEXT: [0] - Zn2AGU0 38# CHECK-NEXT: [1] - Zn2AGU1 39# CHECK-NEXT: [2] - Zn2AGU2 40# CHECK-NEXT: [3] - Zn2ALU0 41# CHECK-NEXT: [4] - Zn2ALU1 42# CHECK-NEXT: [5] - Zn2ALU2 43# CHECK-NEXT: [6] - Zn2ALU3 44# CHECK-NEXT: [7] - Zn2Divider 45# CHECK-NEXT: [8] - Zn2FPU0 46# CHECK-NEXT: [9] - Zn2FPU1 47# CHECK-NEXT: [10] - Zn2FPU2 48# CHECK-NEXT: [11] - Zn2FPU3 49# CHECK-NEXT: [12] - Zn2Multiplier 50 51# CHECK: Resource pressure per iteration: 52# CHECK-NEXT: [0] [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] 53# CHECK-NEXT: 0.67 0.67 0.67 0.67 1.00 0.67 0.67 - - - - - 1.00 54 55# CHECK: Resource pressure by instruction: 56# CHECK-NEXT: [0] [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] Instructions: 57# CHECK-NEXT: - - - - 1.00 - - - - - - - 1.00 imull %edx, %ecx 58# CHECK-NEXT: 0.33 0.33 0.33 0.33 - 0.33 0.33 - - - - - - lzcntw (%rsp), %cx 59# CHECK-NEXT: 0.33 0.33 0.33 0.33 - 0.33 0.33 - - - - - - lzcntw 2(%rsp), %cx 60 61# CHECK: Timeline view: 62# CHECK-NEXT: 0123456789 63# CHECK-NEXT: Index 0123456789 0123456 64 65# CHECK: [0,0] DeeeER . . . .. imull %edx, %ecx 66# CHECK-NEXT: [0,1] DeeeeeER . . . .. lzcntw (%rsp), %cx 67# CHECK-NEXT: [0,2] .DeeeeeER . . . .. lzcntw 2(%rsp), %cx 68# CHECK-NEXT: [1,0] .D=====eeeER . . .. imull %edx, %ecx 69# CHECK-NEXT: [1,1] . D====eeeeeER . . .. lzcntw (%rsp), %cx 70# CHECK-NEXT: [1,2] . D=====eeeeeER. . .. lzcntw 2(%rsp), %cx 71# CHECK-NEXT: [2,0] . D=========eeeER . .. imull %edx, %ecx 72# CHECK-NEXT: [2,1] . D=========eeeeeER. .. lzcntw (%rsp), %cx 73# CHECK-NEXT: [2,2] . D=========eeeeeER .. lzcntw 2(%rsp), %cx 74# CHECK-NEXT: [3,0] . D==============eeeER .. imull %edx, %ecx 75# CHECK-NEXT: [3,1] . D=============eeeeeER. lzcntw (%rsp), %cx 76# CHECK-NEXT: [3,2] . D==============eeeeeER lzcntw 2(%rsp), %cx 77 78# CHECK: Average Wait times (based on the timeline view): 79# CHECK-NEXT: [0]: Executions 80# CHECK-NEXT: [1]: Average time spent waiting in a scheduler's queue 81# CHECK-NEXT: [2]: Average time spent waiting in a scheduler's queue while ready 82# CHECK-NEXT: [3]: Average time elapsed from WB until retire stage 83 84# CHECK: [0] [1] [2] [3] 85# CHECK-NEXT: 0. 4 8.0 0.3 0.0 imull %edx, %ecx 86# CHECK-NEXT: 1. 4 7.5 0.0 0.0 lzcntw (%rsp), %cx 87# CHECK-NEXT: 2. 4 8.0 0.0 0.0 lzcntw 2(%rsp), %cx 88# CHECK-NEXT: 4 7.8 0.1 0.0 <total> 89