[X86][Btver2] Add (U)COMISD/(U)COMISD scheduler costs

Account for the "+i" integer pipe transfer cost (1cy use of JALU0 for GPR PRF write)

llvm-svn: 328573
This commit is contained in:
Simon Pilgrim 2018-03-26 19:01:06 +00:00
parent b45f921678
commit fcf49df21c
4 changed files with 26 additions and 16 deletions

View File

@ -647,6 +647,16 @@ def JWriteVMOVNTPYSt: SchedWriteRes<[JFPU1, JSTC, JSAGU]> {
}
def : InstRW<[JWriteVMOVNTPYSt], (instrs VMOVNTDQYmr, VMOVNTPDYmr, VMOVNTPSYmr)>;
def JWriteFComi : SchedWriteRes<[JFPU0, JFPA, JALU0]> {
let Latency = 3;
}
def : InstRW<[JWriteFComi], (instregex "(V)?(U)?COMIS(D|S)rr")>;
def JWriteFComiLd : SchedWriteRes<[JLAGU, JFPU0, JFPA, JALU0]> {
let Latency = 8;
}
def : InstRW<[JWriteFComiLd], (instregex "(V)?(U)?COMIS(D|S)rm")>;
def JWriteFCmp: SchedWriteRes<[JFPU0, JFPA]> {
let Latency = 2;
}

View File

@ -1106,10 +1106,10 @@ vzeroupper
# CHECK-NEXT: - - - 1.00 - 1.00 - 1.00 - - - - - - vcmpsd $0, (%rax), %xmm1, %xmm2
# CHECK-NEXT: - - - 1.00 - 1.00 - - - - - - - - vcmpss $0, %xmm0, %xmm1, %xmm2
# CHECK-NEXT: - - - 1.00 - 1.00 - 1.00 - - - - - - vcmpss $0, (%rax), %xmm1, %xmm2
# CHECK-NEXT: - - - 1.00 - 1.00 - - - - - - - - vcomisd %xmm0, %xmm1
# CHECK-NEXT: - - - 1.00 - 1.00 - 1.00 - - - - - - vcomisd (%rax), %xmm1
# CHECK-NEXT: - - - 1.00 - 1.00 - - - - - - - - vcomiss %xmm0, %xmm1
# CHECK-NEXT: - - - 1.00 - 1.00 - 1.00 - - - - - - vcomiss (%rax), %xmm1
# CHECK-NEXT: 1.00 - - 1.00 - 1.00 - - - - - - - - vcomisd %xmm0, %xmm1
# CHECK-NEXT: 1.00 - - 1.00 - 1.00 - 1.00 - - - - - - vcomisd (%rax), %xmm1
# CHECK-NEXT: 1.00 - - 1.00 - 1.00 - - - - - - - - vcomiss %xmm0, %xmm1
# CHECK-NEXT: 1.00 - - 1.00 - 1.00 - 1.00 - - - - - - vcomiss (%rax), %xmm1
# CHECK-NEXT: - - - - - - 1.00 - - - 1.00 - - - vcvtdq2pd %xmm0, %xmm2
# CHECK-NEXT: - - - - - - 1.00 1.00 - - 1.00 - - - vcvtdq2pd (%rax), %xmm2
# CHECK-NEXT: - - - - - - 2.00 - - - 2.00 - - - vcvtdq2pd %xmm0, %ymm2
@ -1679,10 +1679,10 @@ vzeroupper
# CHECK-NEXT: 1.00 - - 1.00 - 1.00 - 1.00 - - - - - - vtestps (%rax), %xmm1
# CHECK-NEXT: 1.00 - - 3.00 1.00 1.00 1.00 - - - - - - - vtestps %ymm0, %ymm1
# CHECK-NEXT: 1.00 - - 3.00 1.00 1.00 1.00 2.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
# CHECK-NEXT: - - - 1.00 - 1.00 - 1.00 - - - - - - vucomiss (%rax), %xmm1
# CHECK-NEXT: 1.00 - - 1.00 - 1.00 - - - - - - - - vucomisd %xmm0, %xmm1
# CHECK-NEXT: 1.00 - - 1.00 - 1.00 - 1.00 - - - - - - vucomisd (%rax), %xmm1
# CHECK-NEXT: 1.00 - - 1.00 - 1.00 - - - - - - - - vucomiss %xmm0, %xmm1
# CHECK-NEXT: 1.00 - - 1.00 - 1.00 - 1.00 - - - - - - vucomiss (%rax), %xmm1
# CHECK-NEXT: - - - 0.50 0.50 0.50 0.50 - - - - - - - vunpckhpd %xmm0, %xmm1, %xmm2
# CHECK-NEXT: - - - 0.50 0.50 0.50 0.50 1.00 - - - - - - vunpckhpd (%rax), %xmm1, %xmm2
# CHECK-NEXT: - - - 1.00 1.00 1.00 1.00 - - - - - - - vunpckhpd %ymm0, %ymm1, %ymm2

View File

@ -268,8 +268,8 @@ xorps (%rax), %xmm2
# CHECK-NEXT: - - - 1.00 - 1.00 - 1.00 - - - - - - cmpps $0, (%rax), %xmm2
# CHECK-NEXT: - - - 1.00 - 1.00 - - - - - - - - cmpss $0, %xmm0, %xmm2
# CHECK-NEXT: - - - 1.00 - 1.00 - 1.00 - - - - - - cmpss $0, (%rax), %xmm2
# CHECK-NEXT: - - - 1.00 - 1.00 - - - - - - - - comiss %xmm0, %xmm1
# CHECK-NEXT: - - - 1.00 - 1.00 - 1.00 - - - - - - comiss (%rax), %xmm1
# CHECK-NEXT: 1.00 - - 1.00 - 1.00 - - - - - - - - comiss %xmm0, %xmm1
# CHECK-NEXT: 1.00 - - 1.00 - 1.00 - 1.00 - - - - - - comiss (%rax), %xmm1
# CHECK-NEXT: - - - - - - 1.00 - - - 1.00 - - - cvtsi2ssl %ecx, %xmm2
# CHECK-NEXT: - - - - - - 1.00 - - - 1.00 - - - cvtsi2ssq %rcx, %xmm2
# CHECK-NEXT: - - - - - - 1.00 1.00 - - 1.00 - - - cvtsi2ssl (%rax), %xmm2
@ -339,8 +339,8 @@ xorps (%rax), %xmm2
# CHECK-NEXT: - - - 1.00 - 1.00 - 1.00 - - - - - - subps (%rax), %xmm2
# CHECK-NEXT: - - - 1.00 - 1.00 - - - - - - - - subss %xmm0, %xmm2
# CHECK-NEXT: - - - 1.00 - 1.00 - 1.00 - - - - - - subss (%rax), %xmm2
# CHECK-NEXT: - - - 1.00 - 1.00 - - - - - - - - ucomiss %xmm0, %xmm1
# CHECK-NEXT: - - - 1.00 - 1.00 - 1.00 - - - - - - ucomiss (%rax), %xmm1
# CHECK-NEXT: 1.00 - - 1.00 - 1.00 - - - - - - - - ucomiss %xmm0, %xmm1
# CHECK-NEXT: 1.00 - - 1.00 - 1.00 - 1.00 - - - - - - ucomiss (%rax), %xmm1
# CHECK-NEXT: - - - 0.50 0.50 0.50 0.50 - - - - - - - unpckhps %xmm0, %xmm2
# CHECK-NEXT: - - - 0.50 0.50 0.50 0.50 1.00 - - - - - - unpckhps (%rax), %xmm2
# CHECK-NEXT: - - - 0.50 0.50 0.50 0.50 - - - - - - - unpcklps %xmm0, %xmm2

View File

@ -408,8 +408,8 @@ xorpd (%rax), %xmm2
# CHECK-NEXT: - - - 1.00 - 1.00 - 1.00 - - - - - - cmppd $0, (%rax), %xmm2
# CHECK-NEXT: - - - 1.00 - 1.00 - - - - - - - - cmpsd $0, %xmm0, %xmm2
# CHECK-NEXT: - - - 1.00 - 1.00 - 1.00 - - - - - - cmpsd $0, (%rax), %xmm2
# CHECK-NEXT: - - - 1.00 - 1.00 - - - - - - - - comisd %xmm0, %xmm1
# CHECK-NEXT: - - - 1.00 - 1.00 - 1.00 - - - - - - comisd (%rax), %xmm1
# CHECK-NEXT: 1.00 - - 1.00 - 1.00 - - - - - - - - comisd %xmm0, %xmm1
# CHECK-NEXT: 1.00 - - 1.00 - 1.00 - 1.00 - - - - - - comisd (%rax), %xmm1
# CHECK-NEXT: - - - - - - 1.00 - - - 1.00 - - - cvtdq2pd %xmm0, %xmm2
# CHECK-NEXT: - - - - - - 1.00 1.00 - - 1.00 - - - cvtdq2pd (%rax), %xmm2
# CHECK-NEXT: - - - - - - 1.00 - - - 1.00 - - - cvtdq2ps %xmm0, %xmm2
@ -640,8 +640,8 @@ xorpd (%rax), %xmm2
# CHECK-NEXT: - - - 1.00 - 1.00 - 1.00 - - - - - - subpd (%rax), %xmm2
# CHECK-NEXT: - - - 1.00 - 1.00 - - - - - - - - subsd %xmm0, %xmm2
# CHECK-NEXT: - - - 1.00 - 1.00 - 1.00 - - - - - - subsd (%rax), %xmm2
# CHECK-NEXT: - - - 1.00 - 1.00 - - - - - - - - ucomisd %xmm0, %xmm1
# CHECK-NEXT: - - - 1.00 - 1.00 - 1.00 - - - - - - ucomisd (%rax), %xmm1
# CHECK-NEXT: 1.00 - - 1.00 - 1.00 - - - - - - - - ucomisd %xmm0, %xmm1
# CHECK-NEXT: 1.00 - - 1.00 - 1.00 - 1.00 - - - - - - ucomisd (%rax), %xmm1
# CHECK-NEXT: - - - 0.50 0.50 0.50 0.50 - - - - - - - unpckhpd %xmm0, %xmm2
# CHECK-NEXT: - - - 0.50 0.50 0.50 0.50 1.00 - - - - - - unpckhpd (%rax), %xmm2
# CHECK-NEXT: - - - 0.50 0.50 0.50 0.50 - - - - - - - unpcklpd %xmm0, %xmm2