1 # NOTE: Assertions have been autogenerated by utils/update_mca_test_checks.py
2 # RUN: llvm-mca -mtriple=x86_64-unknown-unknown -mcpu=btver2 -iterations=100 -resource-pressure=false -timeline -timeline-max-iterations=2 < %s | FileCheck %s
7 ## Kills the previous definition of RAX.
8 ## The upper portion of RAX is cleared.
11 ## The AND can start immediately after the LZCNT.
12 ## It doesn't need to wait for the IMUL.
16 # CHECK: Iterations: 100
17 # CHECK-NEXT: Instructions: 400
18 # CHECK-NEXT: Total Cycles: 655
19 # CHECK-NEXT: Total uOps: 1000
21 # CHECK: Dispatch Width: 2
22 # CHECK-NEXT: uOps Per Cycle: 1.53
23 # CHECK-NEXT: IPC: 0.61
24 # CHECK-NEXT: Block RThroughput: 5.0
26 # CHECK: Instruction Info:
27 # CHECK-NEXT: [1]: #uOps
28 # CHECK-NEXT: [2]: Latency
29 # CHECK-NEXT: [3]: RThroughput
30 # CHECK-NEXT: [4]: MayLoad
31 # CHECK-NEXT: [5]: MayStore
32 # CHECK-NEXT: [6]: HasSideEffects (U)
34 # CHECK: [1] [2] [3] [4] [5] [6] Instructions:
35 # CHECK-NEXT: 1 6 4.00 imulq $5, %rcx, %rax
36 # CHECK-NEXT: 1 1 0.50 lzcntl %ecx, %eax
37 # CHECK-NEXT: 1 1 0.50 andq %rcx, %rax
38 # CHECK-NEXT: 7 4 4.00 bsfq %rax, %rcx
40 # CHECK: Timeline view:
42 # CHECK-NEXT: Index 0123456789
44 # CHECK: [0,0] DeeeeeeER . . imulq $5, %rcx, %rax
45 # CHECK-NEXT: [0,1] DeE-----R . . lzcntl %ecx, %eax
46 # CHECK-NEXT: [0,2] .DeE-----R. . andq %rcx, %rax
47 # CHECK-NEXT: [0,3] . DeeeeE-R. . bsfq %rax, %rcx
48 # CHECK-NEXT: [1,0] . D=eeeeeeER. imulq $5, %rcx, %rax
49 # CHECK-NEXT: [1,1] . .D=eE----R. lzcntl %ecx, %eax
50 # CHECK-NEXT: [1,2] . .D==eE----R andq %rcx, %rax
51 # CHECK-NEXT: [1,3] . . D==eeeeER bsfq %rax, %rcx
53 # CHECK: Average Wait times (based on the timeline view):
54 # CHECK-NEXT: [0]: Executions
55 # CHECK-NEXT: [1]: Average time spent waiting in a scheduler's queue
56 # CHECK-NEXT: [2]: Average time spent waiting in a scheduler's queue while ready
57 # CHECK-NEXT: [3]: Average time elapsed from WB until retire stage
59 # CHECK: [0] [1] [2] [3]
60 # CHECK-NEXT: 0. 2 1.5 0.5 0.0 imulq $5, %rcx, %rax
61 # CHECK-NEXT: 1. 2 1.5 1.0 4.5 lzcntl %ecx, %eax
62 # CHECK-NEXT: 2. 2 2.0 0.0 4.5 andq %rcx, %rax
63 # CHECK-NEXT: 3. 2 2.0 0.0 0.5 bsfq %rax, %rcx
64 # CHECK-NEXT: 2 1.8 0.4 2.4 <total>