[llvm-mca] Extend cortex-a57 memory instructions test

Patch adds few/load store instructions which have custom sched
classes in cortex-a57 model.
This commit is contained in:
Evgeny Leviant 2020-10-23 17:02:20 +03:00
parent 68f4715716
commit b651ecfb72
1 changed files with 22 additions and 1 deletions

View File

@ -2,6 +2,8 @@
# RUN: llvm-mca -mtriple=armv8 -mcpu=cortex-a57 -instruction-tables < %s | FileCheck %s
.text
pld [pc, #8]
pldw [pc, #-128]
ldr r5, [r7]
ldr r6, [r3, #63]
ldr r2, [r4, #4095]!
@ -34,6 +36,8 @@
ldrbt r8, [r7], r6
ldrbt r1, [r2], -r6, lsl #12
ldrd r0, r1, [r5]
ldrd r0, r1, [r5, r2]
ldrd r0, r1, [r5, -r2]
ldrd r8, r9, [r2, #15]
ldrd r2, r3, [r9, #32]!
ldrd r6, r7, [r1], #8
@ -49,6 +53,7 @@
ldrh r1, [r8, #64]!
ldrh r12, [sp], #4
ldrh r6, [r5, r4]
ldrh r6, [r5, -r4]
ldrh r3, [r8, r11]!
ldrh r1, [r2, -r1]!
ldrh r9, [r7], r2
@ -128,6 +133,8 @@
strbt r3, [r8], -r2, lsl #3
strd r0, r1, [r4]
strd r2, r3, [r6, #1]
strd r2, r3, [r6, r2]
strd r2, r3, [r6, -r2]
strd r2, r3, [r7, #22]!
strd r4, r5, [r8], #7
strd r4, r5, [sp], #0
@ -160,6 +167,8 @@
# CHECK-NEXT: [6]: HasSideEffects (U)
# CHECK: [1] [2] [3] [4] [5] [6] Instructions:
# CHECK-NEXT: 1 4 1.00 * * pld [pc, #8]
# CHECK-NEXT: 1 4 1.00 * * pldw [pc, #-128]
# CHECK-NEXT: 1 4 1.00 * ldr r5, [r7]
# CHECK-NEXT: 1 4 1.00 * ldr r6, [r3, #63]
# CHECK-NEXT: 2 4 1.00 * ldr r2, [r4, #4095]!
@ -192,6 +201,8 @@
# CHECK-NEXT: 2 4 1.00 * ldrbt r8, [r7], r6
# CHECK-NEXT: 2 4 1.00 * ldrbt r1, [r2], -r6, lsl #12
# CHECK-NEXT: 2 4 2.00 * ldrd r0, r1, [r5]
# CHECK-NEXT: 2 4 2.00 * ldrd r0, r1, [r5, r2]
# CHECK-NEXT: 2 4 2.00 * ldrd r0, r1, [r5, -r2]
# CHECK-NEXT: 2 4 2.00 * ldrd r8, r9, [r2, #15]
# CHECK-NEXT: 4 5 2.00 * ldrd r2, r3, [r9, #32]!
# CHECK-NEXT: 4 4 2.00 * ldrd r6, r7, [r1], #8
@ -207,6 +218,7 @@
# CHECK-NEXT: 1 4 1.00 * ldrh r1, [r8, #64]!
# CHECK-NEXT: 2 4 1.00 * ldrh r12, [sp], #4
# CHECK-NEXT: 1 4 1.00 * ldrh r6, [r5, r4]
# CHECK-NEXT: 1 4 1.00 * ldrh r6, [r5, -r4]
# CHECK-NEXT: 1 4 1.00 * ldrh r3, [r8, r11]!
# CHECK-NEXT: 1 4 1.00 * ldrh r1, [r2, -r1]!
# CHECK-NEXT: 2 4 1.00 * ldrh r9, [r7], r2
@ -286,6 +298,8 @@
# CHECK-NEXT: 2 2 1.00 U strbt r3, [r8], -r2, lsl #3
# CHECK-NEXT: 1 1 1.00 * strd r0, r1, [r4]
# CHECK-NEXT: 1 1 1.00 * strd r2, r3, [r6, #1]
# CHECK-NEXT: 1 1 1.00 * strd r2, r3, [r6, r2]
# CHECK-NEXT: 1 1 1.00 * strd r2, r3, [r6, -r2]
# CHECK-NEXT: 2 1 1.00 * strd r2, r3, [r7, #22]!
# CHECK-NEXT: 2 1 1.00 * strd r4, r5, [r8], #7
# CHECK-NEXT: 2 1 1.00 * strd r4, r5, [sp], #0
@ -321,10 +335,12 @@
# CHECK: Resource pressure per iteration:
# CHECK-NEXT: [0] [1.0] [1.1] [2] [3] [4] [5] [6]
# CHECK-NEXT: - 63.00 63.00 160.00 9.00 55.00 - -
# CHECK-NEXT: - 63.00 63.00 167.00 9.00 57.00 - -
# CHECK: Resource pressure by instruction:
# CHECK-NEXT: [0] [1.0] [1.1] [2] [3] [4] [5] [6] Instructions:
# CHECK-NEXT: - - - 1.00 - - - - pld [pc, #8]
# CHECK-NEXT: - - - 1.00 - - - - pldw [pc, #-128]
# CHECK-NEXT: - - - 1.00 - - - - ldr r5, [r7]
# CHECK-NEXT: - - - 1.00 - - - - ldr r6, [r3, #63]
# CHECK-NEXT: - 0.50 0.50 1.00 - - - - ldr r2, [r4, #4095]!
@ -357,6 +373,8 @@
# CHECK-NEXT: - 0.50 0.50 1.00 - - - - ldrbt r8, [r7], r6
# CHECK-NEXT: - 0.50 0.50 1.00 - - - - ldrbt r1, [r2], -r6, lsl #12
# CHECK-NEXT: - - - 2.00 - - - - ldrd r0, r1, [r5]
# CHECK-NEXT: - - - 2.00 - - - - ldrd r0, r1, [r5, r2]
# CHECK-NEXT: - - - 2.00 - - - - ldrd r0, r1, [r5, -r2]
# CHECK-NEXT: - - - 2.00 - - - - ldrd r8, r9, [r2, #15]
# CHECK-NEXT: - 1.00 1.00 2.00 - - - - ldrd r2, r3, [r9, #32]!
# CHECK-NEXT: - 1.00 1.00 2.00 - - - - ldrd r6, r7, [r1], #8
@ -372,6 +390,7 @@
# CHECK-NEXT: - - - 1.00 - - - - ldrh r1, [r8, #64]!
# CHECK-NEXT: - 0.50 0.50 1.00 - - - - ldrh r12, [sp], #4
# CHECK-NEXT: - - - 1.00 - - - - ldrh r6, [r5, r4]
# CHECK-NEXT: - - - 1.00 - - - - ldrh r6, [r5, -r4]
# CHECK-NEXT: - - - 1.00 - - - - ldrh r3, [r8, r11]!
# CHECK-NEXT: - - - 1.00 - - - - ldrh r1, [r2, -r1]!
# CHECK-NEXT: - 0.50 0.50 1.00 - - - - ldrh r9, [r7], r2
@ -451,6 +470,8 @@
# CHECK-NEXT: - - - - 1.00 1.00 - - strbt r3, [r8], -r2, lsl #3
# CHECK-NEXT: - - - - - 1.00 - - strd r0, r1, [r4]
# CHECK-NEXT: - - - - - 1.00 - - strd r2, r3, [r6, #1]
# CHECK-NEXT: - - - - - 1.00 - - strd r2, r3, [r6, r2]
# CHECK-NEXT: - - - - - 1.00 - - strd r2, r3, [r6, -r2]
# CHECK-NEXT: - 0.50 0.50 - - 1.00 - - strd r2, r3, [r7, #22]!
# CHECK-NEXT: - 0.50 0.50 - - 1.00 - - strd r4, r5, [r8], #7
# CHECK-NEXT: - 0.50 0.50 - - 1.00 - - strd r4, r5, [sp], #0