[X86][Btver2] Cleanup TEST instructions to use JFPA (+JFPX on ymms) function unit

llvm-svn: 328343
This commit is contained in:
Simon Pilgrim 2018-03-23 17:59:22 +00:00
parent 83e7841419
commit 6c63e6c222
3 changed files with 41 additions and 41 deletions

View File

@ -765,26 +765,26 @@ def : InstRW<[JWriteVMOVMSK], (instrs MOVMSKPDrr, VMOVMSKPDrr, VMOVMSKPDYrr,
// operation which moves the floating point result to the integer unit. During this
// additional cycle the floating point unit execution resources are not occupied
// and ALU0 in the integer unit is occupied instead.
def JWriteVTESTY: SchedWriteRes<[JFPU01, JFPU0]> {
def JWriteVTESTY: SchedWriteRes<[JFPU01, JFPX, JFPA]> {
let Latency = 4;
let ResourceCycles = [2, 2];
let ResourceCycles = [1, 2, 2];
let NumMicroOps = 3;
}
def : InstRW<[JWriteVTESTY], (instrs VPTESTYrr, VTESTPDYrr, VTESTPSYrr)>;
def JWriteVTESTYLd: SchedWriteRes<[JLAGU, JFPU01, JFPU0]> {
def JWriteVTESTYLd: SchedWriteRes<[JLAGU, JFPU01, JFPX, JFPA]> {
let Latency = 9;
let ResourceCycles = [1, 2, 2];
let ResourceCycles = [1, 1, 2, 2];
let NumMicroOps = 3;
}
def : InstRW<[JWriteVTESTYLd], (instrs VPTESTYrm, VTESTPDYrm, VTESTPSYrm)>;
def JWriteVTEST: SchedWriteRes<[JFPU0]> {
def JWriteVTEST: SchedWriteRes<[JFPU0, JFPA]> {
let Latency = 3;
}
def : InstRW<[JWriteVTEST], (instrs PTESTrr, VPTESTrr, VTESTPDrr, VTESTPSrr)>;
def JWriteVTESTLd: SchedWriteRes<[JLAGU, JFPU0]> {
def JWriteVTESTLd: SchedWriteRes<[JLAGU, JFPU0, JFPA]> {
let Latency = 8;
}
def : InstRW<[JWriteVTESTLd], (instrs PTESTrm, VPTESTrm, VTESTPDrm, VTESTPSrm)>;

View File

@ -1583,27 +1583,27 @@ vzeroupper
# CHECK-NEXT: - - - - - - 1.00 1.00 - - - 1.00 - - vpsubusw (%rax), %xmm1, %xmm2
# CHECK-NEXT: - - - - - 1.00 - - - - - - 1.00 - vpsubw %xmm0, %xmm1, %xmm2
# CHECK-NEXT: - - - - - - 1.00 1.00 - - - 1.00 - - vpsubw (%rax), %xmm1, %xmm2
# CHECK-NEXT: - - - - - 1.00 - - - - - - - - vptest %xmm0, %xmm1
# CHECK-NEXT: - - - - - 1.00 - 1.00 - - - - - - vptest (%rax), %xmm1
# CHECK-NEXT: - - - - - 2.00 2.00 - - - - - - - vptest %ymm0, %ymm1
# CHECK-NEXT: - - - - - 2.00 2.00 1.00 - - - - - - vptest (%rax), %ymm1
# CHECK-NEXT: - - - 1.00 - 1.00 - - - - - - - - vptest %xmm0, %xmm1
# CHECK-NEXT: - - - 1.00 - 1.00 - 1.00 - - - - - - vptest (%rax), %xmm1
# CHECK-NEXT: - - - 2.00 2.00 - 1.00 - - - - - - - vptest %ymm0, %ymm1
# CHECK-NEXT: - - - 2.00 2.00 1.00 - 1.00 - - - - - - vptest (%rax), %ymm1
# CHECK-NEXT: - - - - - - 1.00 - - - - - 1.00 - vpunpckhbw %xmm0, %xmm1, %xmm2
# CHECK-NEXT: - - - - - 1.00 - 1.00 - - - 1.00 - - vpunpckhbw (%rax), %xmm1, %xmm2
# CHECK-NEXT: - - - - - - 1.00 - - - - - 1.00 - vpunpckhdq %xmm0, %xmm1, %xmm2
# CHECK-NEXT: - - - - - 1.00 - 1.00 - - - 1.00 - - vpunpckhdq (%rax), %xmm1, %xmm2
# CHECK-NEXT: - - - - - - 1.00 - - - - - 1.00 - vpunpckhqdq %xmm0, %xmm1, %xmm2
# CHECK-NEXT: - - - - - 1.00 - 1.00 - - - 1.00 - - vpunpckhqdq (%rax), %xmm1, %xmm2
# CHECK-NEXT: - - - - - - 1.00 - - - - - 1.00 - vpunpckhwd %xmm0, %xmm1, %xmm2
# CHECK-NEXT: - - - - - 1.00 - 1.00 - - - 1.00 - - vpunpckhwd (%rax), %xmm1, %xmm2
# CHECK-NEXT: - - - - - - 1.00 - - - - - 1.00 - vpunpcklbw %xmm0, %xmm1, %xmm2
# CHECK-NEXT: - - - - - 1.00 - 1.00 - - - 1.00 - - vpunpcklbw (%rax), %xmm1, %xmm2
# CHECK-NEXT: - - - - - - 1.00 - - - - - 1.00 - vpunpckldq %xmm0, %xmm1, %xmm2
# CHECK-NEXT: - - - - - 1.00 - 1.00 - - - 1.00 - - vpunpckldq (%rax), %xmm1, %xmm2
# CHECK-NEXT: - - - - - - 1.00 - - - - - 1.00 - vpunpcklqdq %xmm0, %xmm1, %xmm2
# CHECK-NEXT: - - - - - 1.00 - 1.00 - - - 1.00 - - vpunpcklqdq (%rax), %xmm1, %xmm2
# CHECK-NEXT: - - - - - - 1.00 - - - - - 1.00 - vpunpcklwd %xmm0, %xmm1, %xmm2
# CHECK-NEXT: - - - - - 1.00 - 1.00 - - - 1.00 - - vpunpcklwd (%rax), %xmm1, %xmm2
# CHECK-NEXT: - - - - - - 1.00 - - - - - 1.00 - vpxor %xmm0, %xmm1, %xmm2
# CHECK-NEXT: - - - - - 1.00 - 1.00 - - - - 1.00 - vpunpckhbw (%rax), %xmm1, %xmm2
# CHECK-NEXT: - - - - - - 1.00 - - - - 1.00 - - vpunpckhdq %xmm0, %xmm1, %xmm2
# CHECK-NEXT: - - - - - 1.00 - 1.00 - - - - 1.00 - vpunpckhdq (%rax), %xmm1, %xmm2
# CHECK-NEXT: - - - - - - 1.00 - - - - 1.00 - - vpunpckhqdq %xmm0, %xmm1, %xmm2
# CHECK-NEXT: - - - - - 1.00 - 1.00 - - - - 1.00 - vpunpckhqdq (%rax), %xmm1, %xmm2
# CHECK-NEXT: - - - - - - 1.00 - - - - 1.00 - - vpunpckhwd %xmm0, %xmm1, %xmm2
# CHECK-NEXT: - - - - - 1.00 - 1.00 - - - - 1.00 - vpunpckhwd (%rax), %xmm1, %xmm2
# CHECK-NEXT: - - - - - - 1.00 - - - - 1.00 - - vpunpcklbw %xmm0, %xmm1, %xmm2
# CHECK-NEXT: - - - - - 1.00 - 1.00 - - - - 1.00 - vpunpcklbw (%rax), %xmm1, %xmm2
# CHECK-NEXT: - - - - - - 1.00 - - - - 1.00 - - vpunpckldq %xmm0, %xmm1, %xmm2
# CHECK-NEXT: - - - - - 1.00 - 1.00 - - - - 1.00 - vpunpckldq (%rax), %xmm1, %xmm2
# CHECK-NEXT: - - - - - - 1.00 - - - - 1.00 - - vpunpcklqdq %xmm0, %xmm1, %xmm2
# CHECK-NEXT: - - - - - 1.00 - 1.00 - - - - 1.00 - vpunpcklqdq (%rax), %xmm1, %xmm2
# CHECK-NEXT: - - - - - - 1.00 - - - - 1.00 - - vpunpcklwd %xmm0, %xmm1, %xmm2
# CHECK-NEXT: - - - - - 1.00 - 1.00 - - - - 1.00 - vpunpcklwd (%rax), %xmm1, %xmm2
# CHECK-NEXT: - - - - - - 1.00 - - - - 1.00 - - vpxor %xmm0, %xmm1, %xmm2
# CHECK-NEXT: - - - - - 1.00 - 1.00 - - - 1.00 - - vpxor (%rax), %xmm1, %xmm2
# CHECK-NEXT: - - - - 1.00 - 1.00 - - - - - - - vrcpps %xmm0, %xmm2
# CHECK-NEXT: - - - - 1.00 - 1.00 1.00 - - - - - - vrcpps (%rax), %xmm2
@ -1629,14 +1629,14 @@ vzeroupper
# CHECK-NEXT: - - - - 2.00 - 1.00 1.00 - - - - - - vrsqrtps (%rax), %ymm2
# CHECK-NEXT: - - - - 1.00 - 1.00 - - - - - - - vrsqrtss %xmm0, %xmm1, %xmm2
# CHECK-NEXT: - - - - 1.00 - 1.00 1.00 - - - - - - vrsqrtss (%rax), %xmm1, %xmm2
# CHECK-NEXT: - - - - 1.00 1.00 - - - - - - - - vshufpd $1, %xmm0, %xmm1, %xmm2
# CHECK-NEXT: - - - 1.00 - 1.00 - - - - - - - - vshufpd $1, %xmm0, %xmm1, %xmm2
# CHECK-NEXT: - - - 1.00 - 1.00 - 1.00 - - - - - - vshufpd $1, (%rax), %xmm1, %xmm2
# CHECK-NEXT: - - - 2.00 - 1.00 - - - - - - - - vshufpd $1, %ymm0, %ymm1, %ymm2
# CHECK-NEXT: - - - 2.00 - 1.00 - 1.00 - - - - - - vshufpd $1, (%rax), %ymm1, %ymm2
# CHECK-NEXT: - - - 1.00 - 1.00 - - - - - - - - vshufps $1, %xmm0, %xmm1, %xmm2
# CHECK-NEXT: - - - - 1.00 1.00 - 1.00 - - - - - - vshufps $1, (%rax), %xmm1, %xmm2
# CHECK-NEXT: - - - 2.00 - 1.00 - - - - - - - - vshufps $1, %ymm0, %ymm1, %ymm2
# CHECK-NEXT: - - - 2.00 - - 1.00 1.00 - - - - - - vshufps $1, (%rax), %ymm1, %ymm2
# CHECK-NEXT: - - - 1.00 - 1.00 - 1.00 - - - - - - vshufps $1, (%rax), %xmm1, %xmm2
# CHECK-NEXT: - - - - 2.00 - 1.00 - - - - - - - vshufps $1, %ymm0, %ymm1, %ymm2
# CHECK-NEXT: - - - 2.00 - 1.00 - 1.00 - - - - - - vshufps $1, (%rax), %ymm1, %ymm2
# CHECK-NEXT: - - - - 21.00 - 1.00 - - - - - - - vsqrtpd %xmm0, %xmm2
# CHECK-NEXT: - - - - 21.00 - 1.00 1.00 - - - - - - vsqrtpd (%rax), %xmm2
# CHECK-NEXT: - - - - 54.00 - 1.00 - - - - - - - vsqrtpd %ymm0, %ymm2
@ -1662,14 +1662,14 @@ vzeroupper
# CHECK-NEXT: - - - 1.00 - 1.00 - 1.00 - - - - - - vsubsd (%rax), %xmm1, %xmm2
# CHECK-NEXT: - - - 1.00 - 1.00 - - - - - - - - vsubss %xmm0, %xmm1, %xmm2
# CHECK-NEXT: - - - 1.00 - 1.00 - 1.00 - - - - - - vsubss (%rax), %xmm1, %xmm2
# CHECK-NEXT: - - - - - 1.00 - - - - - - - - vtestpd %xmm0, %xmm1
# CHECK-NEXT: - - - - - 1.00 - 1.00 - - - - - - vtestpd (%rax), %xmm1
# CHECK-NEXT: - - - - - 2.00 2.00 - - - - - - - vtestpd %ymm0, %ymm1
# CHECK-NEXT: - - - - - 2.00 2.00 1.00 - - - - - - vtestpd (%rax), %ymm1
# CHECK-NEXT: - - - - - 1.00 - - - - - - - - vtestps %xmm0, %xmm1
# CHECK-NEXT: - - - - - 1.00 - 1.00 - - - - - - vtestps (%rax), %xmm1
# CHECK-NEXT: - - - - - 2.00 2.00 - - - - - - - vtestps %ymm0, %ymm1
# CHECK-NEXT: - - - - - 2.00 2.00 1.00 - - - - - - vtestps (%rax), %ymm1
# CHECK-NEXT: - - - 1.00 - 1.00 - - - - - - - - vtestpd %xmm0, %xmm1
# CHECK-NEXT: - - - 1.00 - 1.00 - 1.00 - - - - - - vtestpd (%rax), %xmm1
# CHECK-NEXT: - - - 2.00 2.00 1.00 - - - - - - - - vtestpd %ymm0, %ymm1
# CHECK-NEXT: - - - 2.00 2.00 1.00 - 1.00 - - - - - - vtestpd (%rax), %ymm1
# CHECK-NEXT: - - - 1.00 - 1.00 - - - - - - - - vtestps %xmm0, %xmm1
# CHECK-NEXT: - - - 1.00 - 1.00 - 1.00 - - - - - - vtestps (%rax), %xmm1
# CHECK-NEXT: - - - 2.00 2.00 - 1.00 - - - - - - - vtestps %ymm0, %ymm1
# CHECK-NEXT: - - - 2.00 2.00 - 1.00 1.00 - - - - - - vtestps (%rax), %ymm1
# CHECK-NEXT: - - - 1.00 - 1.00 - - - - - - - - vucomisd %xmm0, %xmm1
# CHECK-NEXT: - - - 1.00 - 1.00 - 1.00 - - - - - - vucomisd (%rax), %xmm1
# CHECK-NEXT: - - - 1.00 - 1.00 - - - - - - - - vucomiss %xmm0, %xmm1
@ -1686,7 +1686,7 @@ vzeroupper
# CHECK-NEXT: - - - - 1.00 - 1.00 1.00 - - - - - - vunpcklpd (%rax), %xmm1, %xmm2
# CHECK-NEXT: - - - - 1.00 - 1.00 - - - - - - - vunpcklpd %ymm0, %ymm1, %ymm2
# CHECK-NEXT: - - - - 1.00 - 1.00 1.00 - - - - - - vunpcklpd (%rax), %ymm1, %ymm2
# CHECK-NEXT: - - - 1.00 - - 1.00 - - - - - - - vunpcklps %xmm0, %xmm1, %xmm2
# CHECK-NEXT: - - - - 1.00 - 1.00 - - - - - - - vunpcklps %xmm0, %xmm1, %xmm2
# CHECK-NEXT: - - - 1.00 - 1.00 - 1.00 - - - - - - vunpcklps (%rax), %xmm1, %xmm2
# CHECK-NEXT: - - - - 1.00 - 1.00 - - - - - - - vunpcklps %ymm0, %ymm1, %ymm2
# CHECK-NEXT: - - - - 1.00 - 1.00 1.00 - - - - - - vunpcklps (%rax), %ymm1, %ymm2

View File

@ -249,8 +249,8 @@ roundss $1, (%rax), %xmm2
# CHECK-NEXT: - - - - - 1.00 - 1.00 - - - - - 1.00 pmuldq (%rax), %xmm2
# CHECK-NEXT: - - - - - 1.00 - - - - - - - 1.00 pmulld %xmm0, %xmm2
# CHECK-NEXT: - - - - - 1.00 - 1.00 - - - - - 1.00 pmulld (%rax), %xmm2
# CHECK-NEXT: - - - - - 1.00 - - - - - - - - ptest %xmm0, %xmm1
# CHECK-NEXT: - - - - - 1.00 - 1.00 - - - - - - ptest (%rax), %xmm1
# CHECK-NEXT: - - - 1.00 - 1.00 - - - - - - - - ptest %xmm0, %xmm1
# CHECK-NEXT: - - - 1.00 - 1.00 - 1.00 - - - - - - ptest (%rax), %xmm1
# CHECK-NEXT: - - - 1.00 - 1.00 - - - - - - - - roundpd $1, %xmm0, %xmm2
# CHECK-NEXT: - - - 1.00 - 1.00 - 1.00 - - - - - - roundpd $1, (%rax), %xmm2
# CHECK-NEXT: - - - 1.00 - 1.00 - - - - - - - - roundps $1, %xmm0, %xmm2