[X86][MMX] Tag MMX Move/Load/Store as WriteVec schedule classes

Fixes an issue on SLM/Btver2 where we had instructions were being treated as scalar loads/stores

llvm-svn: 332104
This commit is contained in:
Simon Pilgrim 2018-05-11 16:38:59 +00:00
parent 60460268c0
commit 706403bab8
9 changed files with 14 additions and 26 deletions

View File

@ -204,7 +204,7 @@ def MMX_MOVD64to64rr : MMXRI<0x6E, MRMSrcReg, (outs VR64:$dst), (ins GR64:$src),
let isCodeGenOnly = 1, ForceDisassemble = 1, hasSideEffects = 0, mayLoad = 1 in
def MMX_MOVD64to64rm : MMXRI<0x6E, MRMSrcMem, (outs VR64:$dst),
(ins i64mem:$src), "movq\t{$src, $dst|$dst, $src}",
[]>, Sched<[WriteLoad]>;
[]>, Sched<[SchedWriteVecMoveLS.MMX.RM]>;
// These are 64 bit moves, but since the OS X assembler doesn't
// recognize a register-register movq, we write them as
@ -228,16 +228,16 @@ let isCodeGenOnly = 1, ForceDisassemble = 1, hasSideEffects = 0, mayStore = 1 in
def MMX_MOVD64from64rm : MMXRI<0x7E, MRMDestMem,
(outs), (ins i64mem:$dst, VR64:$src),
"movq\t{$src, $dst|$dst, $src}", []>,
Sched<[WriteStore]>;
Sched<[SchedWriteVecMoveLS.MMX.MR]>;
let SchedRW = [WriteLoad] in {
let SchedRW = [SchedWriteVecMoveLS.MMX.RM] in {
let canFoldAsLoad = 1 in
def MMX_MOVQ64rm : MMXI<0x6F, MRMSrcMem, (outs VR64:$dst), (ins i64mem:$src),
"movq\t{$src, $dst|$dst, $src}",
[(set VR64:$dst, (load_mmx addr:$src))]>;
} // SchedRW
let SchedRW = [WriteStore] in
let SchedRW = [SchedWriteVecMoveLS.MMX.MR] in
def MMX_MOVQ64mr : MMXI<0x7F, MRMDestMem, (outs), (ins i64mem:$dst, VR64:$src),
"movq\t{$src, $dst|$dst, $src}",
[(store (x86mmx VR64:$src), addr:$dst)]>;
@ -272,7 +272,7 @@ let Predicates = [HasSSE1] in
def MMX_MOVNTQmr : MMXI<0xE7, MRMDestMem, (outs), (ins i64mem:$dst, VR64:$src),
"movntq\t{$src, $dst|$dst, $src}",
[(int_x86_mmx_movnt_dq addr:$dst, VR64:$src)]>,
Sched<[WriteStore]>;
Sched<[SchedWriteVecMoveLS.MMX.MR]>;
let Predicates = [HasMMX] in {
let AddedComplexity = 15 in

View File

@ -575,10 +575,7 @@ def BWWriteResGroup10 : SchedWriteRes<[BWPort4,BWPort237]> {
let ResourceCycles = [1,1];
}
def: InstRW<[BWWriteResGroup10], (instregex "FBSTPm",
"MMX_MOVD64from64rm",
"MMX_MOVD64mr",
"MMX_MOVNTQmr",
"MMX_MOVQ64mr",
"MOVNTI_64mr",
"MOVNTImr",
"ST_FP(32|64|80)m",

View File

@ -752,10 +752,7 @@ def HWWriteResGroup1 : SchedWriteRes<[HWPort4,HWPort237]> {
let ResourceCycles = [1,1];
}
def: InstRW<[HWWriteResGroup1], (instregex "FBSTPm",
"MMX_MOVD64from64rm",
"MMX_MOVD64mr",
"MMX_MOVNTQmr",
"MMX_MOVQ64mr",
"MOVNTI_64mr",
"MOVNTImr",
"ST_FP(32|64|80)m",

View File

@ -578,10 +578,7 @@ def SKLWriteResGroup11 : SchedWriteRes<[SKLPort4,SKLPort237]> {
let ResourceCycles = [1,1];
}
def: InstRW<[SKLWriteResGroup11], (instregex "FBSTPm",
"MMX_MOVD64from64rm",
"MMX_MOVD64mr",
"MMX_MOVNTQmr",
"MMX_MOVQ64mr",
"MOVNTI_64mr",
"MOVNTImr",
"ST_FP(32|64|80)m",

View File

@ -603,10 +603,7 @@ def SKXWriteResGroup11 : SchedWriteRes<[SKXPort4,SKXPort237]> {
}
def: InstRW<[SKXWriteResGroup11], (instregex "FBSTPm",
"KMOV(B|D|Q|W)mk",
"MMX_MOVD64from64rm",
"MMX_MOVD64mr",
"MMX_MOVNTQmr",
"MMX_MOVQ64mr",
"MOVNTI_64mr",
"MOVNTImr",
"ST_FP(32|64|80)m",

View File

@ -288,7 +288,7 @@ pxor (%rax), %mm2
# CHECK: Resource pressure per iteration:
# CHECK-NEXT: [0] [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13]
# CHECK-NEXT: 2.00 2.00 - 0.50 0.50 51.50 45.50 46.00 - 2.00 - 45.00 45.00 6.00
# CHECK-NEXT: 2.00 2.00 - 0.50 0.50 52.00 47.00 46.00 - 2.00 1.00 45.50 45.50 6.00
# CHECK: Resource pressure by instruction:
# CHECK-NEXT: [0] [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] Instructions:
@ -298,9 +298,9 @@ pxor (%rax), %mm2
# CHECK-NEXT: 0.50 0.50 - - - - - - - - - - - - movd %mm0, %ecx
# CHECK-NEXT: - - - - - - - - - 1.00 - - - - movd %mm0, (%rax)
# CHECK-NEXT: 0.50 0.50 - - - - - - - - - - - - movq %rax, %mm2
# CHECK-NEXT: - - - - - - - 1.00 - - - - - - movq (%rax), %mm2
# CHECK-NEXT: - - - - - 0.50 0.50 1.00 - - - 0.50 0.50 - movq (%rax), %mm2
# CHECK-NEXT: 0.50 0.50 - - - - - - - - - - - - movq %mm0, %rcx
# CHECK-NEXT: - - - - - - - - - 1.00 - - - - movq %mm0, (%rax)
# CHECK-NEXT: - - - - - - 1.00 - - 1.00 1.00 - - - movq %mm0, (%rax)
# CHECK-NEXT: - - - - - 0.50 0.50 - - - - 0.50 0.50 - packsswb %mm0, %mm2
# CHECK-NEXT: - - - - - 0.50 0.50 1.00 - - - 0.50 0.50 - packsswb (%rax), %mm2
# CHECK-NEXT: - - - - - 0.50 0.50 - - - - 0.50 0.50 - packssdw %mm0, %mm2

View File

@ -337,7 +337,7 @@ xorps (%rax), %xmm2
# CHECK: Resource pressure per iteration:
# CHECK-NEXT: [0] [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13]
# CHECK-NEXT: 15.00 - - 46.50 183.50 50.00 62.00 58.00 - 9.00 21.00 9.50 9.50 2.00
# CHECK-NEXT: 15.00 - - 46.50 183.50 50.00 63.00 58.00 - 9.00 22.00 9.50 9.50 2.00
# CHECK: Resource pressure by instruction:
# CHECK-NEXT: [0] [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] Instructions:
@ -398,7 +398,7 @@ xorps (%rax), %xmm2
# CHECK-NEXT: - - - 0.50 0.50 0.50 0.50 1.00 - - - - - - movlps (%rax), %xmm2
# CHECK-NEXT: 1.00 - - 1.00 - 1.00 - - - - - - - - movmskps %xmm0, %ecx
# CHECK-NEXT: - - - - - - 1.00 - - 1.00 1.00 - - - movntps %xmm0, (%rax)
# CHECK-NEXT: - - - - - - - - - 1.00 - - - - movntq %mm0, (%rax)
# CHECK-NEXT: - - - - - - 1.00 - - 1.00 1.00 - - - movntq %mm0, (%rax)
# CHECK-NEXT: - - - 0.50 0.50 0.50 0.50 - - - - - - - movss %xmm0, %xmm2
# CHECK-NEXT: - - - - - - - - - 1.00 - - - - movss %xmm0, (%rax)
# CHECK-NEXT: - - - - - - - 1.00 - - - - - - movss (%rax), %xmm2

View File

@ -282,7 +282,7 @@ pxor (%rax), %mm2
# CHECK: Resource pressure per iteration:
# CHECK-NEXT: [0] [1] [2] [3] [4] [5] [6] [7]
# CHECK-NEXT: - - - 77.00 29.00 3.00 3.00 48.00
# CHECK-NEXT: - - - 77.00 29.00 2.50 2.50 48.00
# CHECK: Resource pressure by instruction:
# CHECK-NEXT: [0] [1] [2] [3] [4] [5] [6] [7] Instructions:
@ -294,7 +294,7 @@ pxor (%rax), %mm2
# CHECK-NEXT: - - - - - 0.50 0.50 - movq %rax, %mm2
# CHECK-NEXT: - - - - - - - 1.00 movq (%rax), %mm2
# CHECK-NEXT: - - - - - 0.50 0.50 - movq %mm0, %rcx
# CHECK-NEXT: - - - - - 0.50 0.50 1.00 movq %mm0, (%rax)
# CHECK-NEXT: - - - - - - - 1.00 movq %mm0, (%rax)
# CHECK-NEXT: - - - 1.00 - - - - packsswb %mm0, %mm2
# CHECK-NEXT: - - - 1.00 - - - 1.00 packsswb (%rax), %mm2
# CHECK-NEXT: - - - 1.00 - - - - packssdw %mm0, %mm2

View File

@ -331,7 +331,7 @@ xorps (%rax), %xmm2
# CHECK: Resource pressure per iteration:
# CHECK-NEXT: [0] [1] [2] [3] [4] [5] [6] [7]
# CHECK-NEXT: - 232.00 8.00 61.00 46.00 2.50 2.50 67.00
# CHECK-NEXT: - 232.00 8.00 61.00 46.00 2.00 2.00 67.00
# CHECK: Resource pressure by instruction:
# CHECK-NEXT: [0] [1] [2] [3] [4] [5] [6] [7] Instructions:
@ -392,7 +392,7 @@ xorps (%rax), %xmm2
# CHECK-NEXT: - - - 1.00 - - - 1.00 movlps (%rax), %xmm2
# CHECK-NEXT: - - - - 1.00 - - - movmskps %xmm0, %ecx
# CHECK-NEXT: - - - - - - - 1.00 movntps %xmm0, (%rax)
# CHECK-NEXT: - - - - - 0.50 0.50 1.00 movntq %mm0, (%rax)
# CHECK-NEXT: - - - - - - - 1.00 movntq %mm0, (%rax)
# CHECK-NEXT: - - - 1.00 - - - - movss %xmm0, %xmm2
# CHECK-NEXT: - - - - - 0.50 0.50 1.00 movss %xmm0, (%rax)
# CHECK-NEXT: - - - - - - - 1.00 movss (%rax), %xmm2