[llvm] r328573 - [X86][Btver2] Add (U)COMISD/(U)COMISD scheduler costs
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 26 12:01:06 PDT 2018
Author: rksimon
Date: Mon Mar 26 12:01:06 2018
New Revision: 328573
URL: http://llvm.org/viewvc/llvm-project?rev=328573&view=rev
Log:
[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)
Modified:
llvm/trunk/lib/Target/X86/X86ScheduleBtVer2.td
llvm/trunk/test/tools/llvm-mca/X86/BtVer2/resources-avx1.s
llvm/trunk/test/tools/llvm-mca/X86/BtVer2/resources-sse1.s
llvm/trunk/test/tools/llvm-mca/X86/BtVer2/resources-sse2.s
Modified: llvm/trunk/lib/Target/X86/X86ScheduleBtVer2.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ScheduleBtVer2.td?rev=328573&r1=328572&r2=328573&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86ScheduleBtVer2.td (original)
+++ llvm/trunk/lib/Target/X86/X86ScheduleBtVer2.td Mon Mar 26 12:01:06 2018
@@ -647,6 +647,16 @@ def JWriteVMOVNTPYSt: SchedWriteRes<[JFP
}
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;
}
Modified: llvm/trunk/test/tools/llvm-mca/X86/BtVer2/resources-avx1.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-mca/X86/BtVer2/resources-avx1.s?rev=328573&r1=328572&r2=328573&view=diff
==============================================================================
--- llvm/trunk/test/tools/llvm-mca/X86/BtVer2/resources-avx1.s (original)
+++ llvm/trunk/test/tools/llvm-mca/X86/BtVer2/resources-avx1.s Mon Mar 26 12:01:06 2018
@@ -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
Modified: llvm/trunk/test/tools/llvm-mca/X86/BtVer2/resources-sse1.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-mca/X86/BtVer2/resources-sse1.s?rev=328573&r1=328572&r2=328573&view=diff
==============================================================================
--- llvm/trunk/test/tools/llvm-mca/X86/BtVer2/resources-sse1.s (original)
+++ llvm/trunk/test/tools/llvm-mca/X86/BtVer2/resources-sse1.s Mon Mar 26 12:01:06 2018
@@ -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
Modified: llvm/trunk/test/tools/llvm-mca/X86/BtVer2/resources-sse2.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-mca/X86/BtVer2/resources-sse2.s?rev=328573&r1=328572&r2=328573&view=diff
==============================================================================
--- llvm/trunk/test/tools/llvm-mca/X86/BtVer2/resources-sse2.s (original)
+++ llvm/trunk/test/tools/llvm-mca/X86/BtVer2/resources-sse2.s Mon Mar 26 12:01:06 2018
@@ -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
More information about the llvm-commits
mailing list