llvm/llvm/test/tools/llvm-mca/X86/Generic/resources-3dnow.s

# NOTE: Assertions have been autogenerated by utils/update_mca_test_checks.py
# RUN: llvm-mca -mtriple=x86_64-unknown-unknown -mcpu=x86-64 -instruction-tables < %s | FileCheck %s

femms

pavgusb     %mm0, %mm2
pavgusb     (%rax), %mm2

pf2id       %mm0, %mm2
pf2id       (%rax), %mm2

pf2iw       %mm0, %mm2
pf2iw       (%rax), %mm2

pfacc       %mm0, %mm2
pfacc       (%rax), %mm2

pfadd       %mm0, %mm2
pfadd       (%rax), %mm2

pfcmpeq     %mm0, %mm2
pfcmpeq     (%rax), %mm2

pfcmpge     %mm0, %mm2
pfcmpge     (%rax), %mm2

pfcmpgt     %mm0, %mm2
pfcmpgt     (%rax), %mm2

pfmax       %mm0, %mm2
pfmax       (%rax), %mm2

pfmin       %mm0, %mm2
pfmin       (%rax), %mm2

pfmul       %mm0, %mm2
pfmul       (%rax), %mm2

pfnacc      %mm0, %mm2
pfnacc      (%rax), %mm2

pfpnacc     %mm0, %mm2
pfpnacc     (%rax), %mm2

pfrcp       %mm0, %mm2
pfrcp       (%rax), %mm2

pfrcpit1    %mm0, %mm2
pfrcpit1    (%rax), %mm2

pfrcpit2    %mm0, %mm2
pfrcpit2    (%rax), %mm2

pfrsqit1    %mm0, %mm2
pfrsqit1    (%rax), %mm2

pfrsqrt     %mm0, %mm2
pfrsqrt     (%rax), %mm2

pfsub       %mm0, %mm2
pfsub       (%rax), %mm2

pfsubr      %mm0, %mm2
pfsubr      (%rax), %mm2

pi2fd       %mm0, %mm2
pi2fd       (%rax), %mm2

pi2fw       %mm0, %mm2
pi2fw       (%rax), %mm2

pmulhrw     %mm0, %mm2
pmulhrw     (%rax), %mm2

prefetch    (%rax)
prefetchw   (%rax)

pswapd      %mm0, %mm2
pswapd      (%rax), %mm2

# CHECK:      Instruction Info:
# CHECK-NEXT: [1]: #uOps
# CHECK-NEXT: [2]: Latency
# CHECK-NEXT: [3]: RThroughput
# CHECK-NEXT: [4]: MayLoad
# CHECK-NEXT: [5]: MayStore
# CHECK-NEXT: [6]: HasSideEffects (U)

# CHECK:      [1]    [2]    [3]    [4]    [5]    [6]    Instructions:
# CHECK-NEXT:  31     31    10.33   *      *      U     femms
# CHECK-NEXT:  1      3     1.00                        pavgusb	%mm0, %mm2
# CHECK-NEXT:  2      8     1.00    *                   pavgusb	(%rax), %mm2
# CHECK-NEXT:  1      3     1.00                        pf2id	%mm0, %mm2
# CHECK-NEXT:  2      9     1.00    *                   pf2id	(%rax), %mm2
# CHECK-NEXT:  1      3     1.00                        pf2iw	%mm0, %mm2
# CHECK-NEXT:  2      9     1.00    *                   pf2iw	(%rax), %mm2
# CHECK-NEXT:  1      3     1.00                        pfacc	%mm0, %mm2
# CHECK-NEXT:  2      9     1.00    *                   pfacc	(%rax), %mm2
# CHECK-NEXT:  1      3     1.00                        pfadd	%mm0, %mm2
# CHECK-NEXT:  2      9     1.00    *                   pfadd	(%rax), %mm2
# CHECK-NEXT:  1      3     1.00                        pfcmpeq	%mm0, %mm2
# CHECK-NEXT:  2      9     1.00    *                   pfcmpeq	(%rax), %mm2
# CHECK-NEXT:  1      3     1.00                        pfcmpge	%mm0, %mm2
# CHECK-NEXT:  2      9     1.00    *                   pfcmpge	(%rax), %mm2
# CHECK-NEXT:  1      3     1.00                        pfcmpgt	%mm0, %mm2
# CHECK-NEXT:  2      9     1.00    *                   pfcmpgt	(%rax), %mm2
# CHECK-NEXT:  1      3     1.00                        pfmax	%mm0, %mm2
# CHECK-NEXT:  2      9     1.00    *                   pfmax	(%rax), %mm2
# CHECK-NEXT:  1      3     1.00                        pfmin	%mm0, %mm2
# CHECK-NEXT:  2      9     1.00    *                   pfmin	(%rax), %mm2
# CHECK-NEXT:  1      3     1.00                        pfmul	%mm0, %mm2
# CHECK-NEXT:  2      9     1.00    *                   pfmul	(%rax), %mm2
# CHECK-NEXT:  1      3     1.00                        pfnacc	%mm0, %mm2
# CHECK-NEXT:  2      9     1.00    *                   pfnacc	(%rax), %mm2
# CHECK-NEXT:  1      3     1.00                        pfpnacc	%mm0, %mm2
# CHECK-NEXT:  2      9     1.00    *                   pfpnacc	(%rax), %mm2
# CHECK-NEXT:  1      3     1.00                        pfrcp	%mm0, %mm2
# CHECK-NEXT:  2      9     1.00    *                   pfrcp	(%rax), %mm2
# CHECK-NEXT:  1      3     1.00                        pfrcpit1	%mm0, %mm2
# CHECK-NEXT:  2      9     1.00    *                   pfrcpit1	(%rax), %mm2
# CHECK-NEXT:  1      3     1.00                        pfrcpit2	%mm0, %mm2
# CHECK-NEXT:  2      9     1.00    *                   pfrcpit2	(%rax), %mm2
# CHECK-NEXT:  1      3     1.00                        pfrsqit1	%mm0, %mm2
# CHECK-NEXT:  2      9     1.00    *                   pfrsqit1	(%rax), %mm2
# CHECK-NEXT:  1      3     1.00                        pfrsqrt	%mm0, %mm2
# CHECK-NEXT:  2      9     1.00    *                   pfrsqrt	(%rax), %mm2
# CHECK-NEXT:  1      3     1.00                        pfsub	%mm0, %mm2
# CHECK-NEXT:  2      9     1.00    *                   pfsub	(%rax), %mm2
# CHECK-NEXT:  1      3     1.00                        pfsubr	%mm0, %mm2
# CHECK-NEXT:  2      9     1.00    *                   pfsubr	(%rax), %mm2
# CHECK-NEXT:  1      3     1.00                        pi2fd	%mm0, %mm2
# CHECK-NEXT:  2      9     1.00    *                   pi2fd	(%rax), %mm2
# CHECK-NEXT:  1      3     1.00                        pi2fw	%mm0, %mm2
# CHECK-NEXT:  2      9     1.00    *                   pi2fw	(%rax), %mm2
# CHECK-NEXT:  1      5     1.00                        pmulhrw	%mm0, %mm2
# CHECK-NEXT:  2      10    1.00    *                   pmulhrw	(%rax), %mm2
# CHECK-NEXT:  1      5     0.50    *      *            prefetch	(%rax)
# CHECK-NEXT:  1      5     0.50    *      *            prefetchw	(%rax)
# CHECK-NEXT:  1      1     1.00                        pswapd	%mm0, %mm2
# CHECK-NEXT:  2      6     1.00    *                   pswapd	(%rax), %mm2

# CHECK:      Resources:
# CHECK-NEXT: [0]   - SBDivider
# CHECK-NEXT: [1]   - SBFPDivider
# CHECK-NEXT: [2]   - SBPort0
# CHECK-NEXT: [3]   - SBPort1
# CHECK-NEXT: [4]   - SBPort4
# CHECK-NEXT: [5]   - SBPort5
# CHECK-NEXT: [6.0] - SBPort23
# CHECK-NEXT: [6.1] - SBPort23

# CHECK:      Resource pressure per iteration:
# CHECK-NEXT: [0]    [1]    [2]    [3]    [4]    [5]    [6.0]  [6.1]
# CHECK-NEXT:  -      -     12.33  54.33   -     12.33  13.00  13.00

# CHECK:      Resource pressure by instruction:
# CHECK-NEXT: [0]    [1]    [2]    [3]    [4]    [5]    [6.0]  [6.1]  Instructions:
# CHECK-NEXT:  -      -     10.33  10.33   -     10.33   -      -     femms
# CHECK-NEXT:  -      -      -     1.00    -      -      -      -     pavgusb	%mm0, %mm2
# CHECK-NEXT:  -      -      -     1.00    -      -     0.50   0.50   pavgusb	(%rax), %mm2
# CHECK-NEXT:  -      -      -     1.00    -      -      -      -     pf2id	%mm0, %mm2
# CHECK-NEXT:  -      -      -     1.00    -      -     0.50   0.50   pf2id	(%rax), %mm2
# CHECK-NEXT:  -      -      -     1.00    -      -      -      -     pf2iw	%mm0, %mm2
# CHECK-NEXT:  -      -      -     1.00    -      -     0.50   0.50   pf2iw	(%rax), %mm2
# CHECK-NEXT:  -      -      -     1.00    -      -      -      -     pfacc	%mm0, %mm2
# CHECK-NEXT:  -      -      -     1.00    -      -     0.50   0.50   pfacc	(%rax), %mm2
# CHECK-NEXT:  -      -      -     1.00    -      -      -      -     pfadd	%mm0, %mm2
# CHECK-NEXT:  -      -      -     1.00    -      -     0.50   0.50   pfadd	(%rax), %mm2
# CHECK-NEXT:  -      -      -     1.00    -      -      -      -     pfcmpeq	%mm0, %mm2
# CHECK-NEXT:  -      -      -     1.00    -      -     0.50   0.50   pfcmpeq	(%rax), %mm2
# CHECK-NEXT:  -      -      -     1.00    -      -      -      -     pfcmpge	%mm0, %mm2
# CHECK-NEXT:  -      -      -     1.00    -      -     0.50   0.50   pfcmpge	(%rax), %mm2
# CHECK-NEXT:  -      -      -     1.00    -      -      -      -     pfcmpgt	%mm0, %mm2
# CHECK-NEXT:  -      -      -     1.00    -      -     0.50   0.50   pfcmpgt	(%rax), %mm2
# CHECK-NEXT:  -      -      -     1.00    -      -      -      -     pfmax	%mm0, %mm2
# CHECK-NEXT:  -      -      -     1.00    -      -     0.50   0.50   pfmax	(%rax), %mm2
# CHECK-NEXT:  -      -      -     1.00    -      -      -      -     pfmin	%mm0, %mm2
# CHECK-NEXT:  -      -      -     1.00    -      -     0.50   0.50   pfmin	(%rax), %mm2
# CHECK-NEXT:  -      -      -     1.00    -      -      -      -     pfmul	%mm0, %mm2
# CHECK-NEXT:  -      -      -     1.00    -      -     0.50   0.50   pfmul	(%rax), %mm2
# CHECK-NEXT:  -      -      -     1.00    -      -      -      -     pfnacc	%mm0, %mm2
# CHECK-NEXT:  -      -      -     1.00    -      -     0.50   0.50   pfnacc	(%rax), %mm2
# CHECK-NEXT:  -      -      -     1.00    -      -      -      -     pfpnacc	%mm0, %mm2
# CHECK-NEXT:  -      -      -     1.00    -      -     0.50   0.50   pfpnacc	(%rax), %mm2
# CHECK-NEXT:  -      -      -     1.00    -      -      -      -     pfrcp	%mm0, %mm2
# CHECK-NEXT:  -      -      -     1.00    -      -     0.50   0.50   pfrcp	(%rax), %mm2
# CHECK-NEXT:  -      -      -     1.00    -      -      -      -     pfrcpit1	%mm0, %mm2
# CHECK-NEXT:  -      -      -     1.00    -      -     0.50   0.50   pfrcpit1	(%rax), %mm2
# CHECK-NEXT:  -      -      -     1.00    -      -      -      -     pfrcpit2	%mm0, %mm2
# CHECK-NEXT:  -      -      -     1.00    -      -     0.50   0.50   pfrcpit2	(%rax), %mm2
# CHECK-NEXT:  -      -      -     1.00    -      -      -      -     pfrsqit1	%mm0, %mm2
# CHECK-NEXT:  -      -      -     1.00    -      -     0.50   0.50   pfrsqit1	(%rax), %mm2
# CHECK-NEXT:  -      -      -     1.00    -      -      -      -     pfrsqrt	%mm0, %mm2
# CHECK-NEXT:  -      -      -     1.00    -      -     0.50   0.50   pfrsqrt	(%rax), %mm2
# CHECK-NEXT:  -      -      -     1.00    -      -      -      -     pfsub	%mm0, %mm2
# CHECK-NEXT:  -      -      -     1.00    -      -     0.50   0.50   pfsub	(%rax), %mm2
# CHECK-NEXT:  -      -      -     1.00    -      -      -      -     pfsubr	%mm0, %mm2
# CHECK-NEXT:  -      -      -     1.00    -      -     0.50   0.50   pfsubr	(%rax), %mm2
# CHECK-NEXT:  -      -      -     1.00    -      -      -      -     pi2fd	%mm0, %mm2
# CHECK-NEXT:  -      -      -     1.00    -      -     0.50   0.50   pi2fd	(%rax), %mm2
# CHECK-NEXT:  -      -      -     1.00    -      -      -      -     pi2fw	%mm0, %mm2
# CHECK-NEXT:  -      -      -     1.00    -      -     0.50   0.50   pi2fw	(%rax), %mm2
# CHECK-NEXT:  -      -     1.00    -      -      -      -      -     pmulhrw	%mm0, %mm2
# CHECK-NEXT:  -      -     1.00    -      -      -     0.50   0.50   pmulhrw	(%rax), %mm2
# CHECK-NEXT:  -      -      -      -      -      -     0.50   0.50   prefetch	(%rax)
# CHECK-NEXT:  -      -      -      -      -      -     0.50   0.50   prefetchw	(%rax)
# CHECK-NEXT:  -      -      -      -      -     1.00    -      -     pswapd	%mm0, %mm2
# CHECK-NEXT:  -      -      -      -      -     1.00   0.50   0.50   pswapd	(%rax), %mm2