• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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=500 -timeline -timeline-max-iterations=3 < %s | FileCheck %s
3
4# Throughput for the code snippet below should tend to 1.00 IPC.
5
6add %eax, %eax
7vpinsrb $0, %eax, %xmm0, %xmm0
8vpinsrb $1, %eax, %xmm0, %xmm0
9
10# CHECK:      Iterations:        500
11# CHECK-NEXT: Instructions:      1500
12# CHECK-NEXT: Total Cycles:      1509
13# CHECK-NEXT: Total uOps:        2500
14
15# CHECK:      Dispatch Width:    2
16# CHECK-NEXT: uOps Per Cycle:    1.66
17# CHECK-NEXT: IPC:               0.99
18# CHECK-NEXT: Block RThroughput: 2.5
19
20# CHECK:      Instruction Info:
21# CHECK-NEXT: [1]: #uOps
22# CHECK-NEXT: [2]: Latency
23# CHECK-NEXT: [3]: RThroughput
24# CHECK-NEXT: [4]: MayLoad
25# CHECK-NEXT: [5]: MayStore
26# CHECK-NEXT: [6]: HasSideEffects (U)
27
28# CHECK:      [1]    [2]    [3]    [4]    [5]    [6]    Instructions:
29# CHECK-NEXT:  1      1     0.50                        addl	%eax, %eax
30# CHECK-NEXT:  2      7     0.50                        vpinsrb	$0, %eax, %xmm0, %xmm0
31# CHECK-NEXT:  2      7     0.50                        vpinsrb	$1, %eax, %xmm0, %xmm0
32
33# CHECK:      Resources:
34# CHECK-NEXT: [0]   - JALU0
35# CHECK-NEXT: [1]   - JALU1
36# CHECK-NEXT: [2]   - JDiv
37# CHECK-NEXT: [3]   - JFPA
38# CHECK-NEXT: [4]   - JFPM
39# CHECK-NEXT: [5]   - JFPU0
40# CHECK-NEXT: [6]   - JFPU1
41# CHECK-NEXT: [7]   - JLAGU
42# CHECK-NEXT: [8]   - JMul
43# CHECK-NEXT: [9]   - JSAGU
44# CHECK-NEXT: [10]  - JSTC
45# CHECK-NEXT: [11]  - JVALU0
46# CHECK-NEXT: [12]  - JVALU1
47# CHECK-NEXT: [13]  - JVIMUL
48
49# CHECK:      Resource pressure per iteration:
50# CHECK-NEXT: [0]    [1]    [2]    [3]    [4]    [5]    [6]    [7]    [8]    [9]    [10]   [11]   [12]   [13]
51# CHECK-NEXT: 0.50   0.50    -      -      -     1.00   1.00    -      -      -      -     1.00   1.00    -
52
53# CHECK:      Resource pressure by instruction:
54# CHECK-NEXT: [0]    [1]    [2]    [3]    [4]    [5]    [6]    [7]    [8]    [9]    [10]   [11]   [12]   [13]   Instructions:
55# CHECK-NEXT: 0.50   0.50    -      -      -      -      -      -      -      -      -      -      -      -     addl	%eax, %eax
56# CHECK-NEXT:  -      -      -      -      -      -     1.00    -      -      -      -      -     1.00    -     vpinsrb	$0, %eax, %xmm0, %xmm0
57# CHECK-NEXT:  -      -      -      -      -     1.00    -      -      -      -      -     1.00    -      -     vpinsrb	$1, %eax, %xmm0, %xmm0
58
59# CHECK:      Timeline view:
60# CHECK-NEXT:                     01234567
61# CHECK-NEXT: Index     0123456789
62
63# CHECK:      [0,0]     DeER .    .    . .   addl	%eax, %eax
64# CHECK-NEXT: [0,1]     .D======eER    . .   vpinsrb	$0, %eax, %xmm0, %xmm0
65# CHECK-NEXT: [0,2]     . D======eER   . .   vpinsrb	$1, %eax, %xmm0, %xmm0
66# CHECK-NEXT: [1,0]     .  DeE-----R   . .   addl	%eax, %eax
67# CHECK-NEXT: [1,1]     .   D======eER . .   vpinsrb	$0, %eax, %xmm0, %xmm0
68# CHECK-NEXT: [1,2]     .    D======eER. .   vpinsrb	$1, %eax, %xmm0, %xmm0
69# CHECK-NEXT: [2,0]     .    .DeE-----R. .   addl	%eax, %eax
70# CHECK-NEXT: [2,1]     .    . D======eER.   vpinsrb	$0, %eax, %xmm0, %xmm0
71# CHECK-NEXT: [2,2]     .    .  D======eER   vpinsrb	$1, %eax, %xmm0, %xmm0
72
73# CHECK:      Average Wait times (based on the timeline view):
74# CHECK-NEXT: [0]: Executions
75# CHECK-NEXT: [1]: Average time spent waiting in a scheduler's queue
76# CHECK-NEXT: [2]: Average time spent waiting in a scheduler's queue while ready
77# CHECK-NEXT: [3]: Average time elapsed from WB until retire stage
78
79# CHECK:            [0]    [1]    [2]    [3]
80# CHECK-NEXT: 0.     3     1.0    1.0    3.3       addl	%eax, %eax
81# CHECK-NEXT: 1.     3     7.0    0.0    0.0       vpinsrb	$0, %eax, %xmm0, %xmm0
82# CHECK-NEXT: 2.     3     7.0    0.0    0.0       vpinsrb	$1, %eax, %xmm0, %xmm0
83# CHECK-NEXT:        3     5.0    0.3    1.1       <total>
84