[PATCH] D39046: SSE 4.1 instructions scheduling in btver2
Andrew V. Tischenko via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 18 04:47:54 PDT 2017
avt77 created this revision.
This patch includes proper schedule numbers for SSE 4.1 instructions on btver2 CPU.
https://reviews.llvm.org/D39046
Files:
lib/Target/X86/X86ScheduleBtVer2.td
test/CodeGen/X86/sse41-schedule.ll
Index: test/CodeGen/X86/sse41-schedule.ll
===================================================================
--- test/CodeGen/X86/sse41-schedule.ll
+++ test/CodeGen/X86/sse41-schedule.ll
@@ -320,8 +320,8 @@
;
; BTVER2-LABEL: test_dppd:
; BTVER2: # BB#0:
-; BTVER2-NEXT: vdppd $7, %xmm1, %xmm0, %xmm0 # sched: [3:1.00]
-; BTVER2-NEXT: vdppd $7, (%rdi), %xmm0, %xmm0 # sched: [8:1.00]
+; BTVER2-NEXT: vdppd $7, %xmm1, %xmm0, %xmm0 # sched: [9:3.00]
+; BTVER2-NEXT: vdppd $7, (%rdi), %xmm0, %xmm0 # sched: [14:3.00]
; BTVER2-NEXT: retq # sched: [4:1.00]
;
; ZNVER1-LABEL: test_dppd:
@@ -381,8 +381,8 @@
;
; BTVER2-LABEL: test_dpps:
; BTVER2: # BB#0:
-; BTVER2-NEXT: vdpps $7, %xmm1, %xmm0, %xmm0 # sched: [3:1.00]
-; BTVER2-NEXT: vdpps $7, (%rdi), %xmm0, %xmm0 # sched: [8:1.00]
+; BTVER2-NEXT: vdpps $7, %xmm1, %xmm0, %xmm0 # sched: [11:4.00]
+; BTVER2-NEXT: vdpps $7, (%rdi), %xmm0, %xmm0 # sched: [16:4.00]
; BTVER2-NEXT: retq # sched: [4:1.00]
;
; ZNVER1-LABEL: test_dpps:
Index: lib/Target/X86/X86ScheduleBtVer2.td
===================================================================
--- lib/Target/X86/X86ScheduleBtVer2.td
+++ lib/Target/X86/X86ScheduleBtVer2.td
@@ -371,6 +371,38 @@
def : WriteRes<WriteNop, []>;
////////////////////////////////////////////////////////////////////////////////
+// SSE4.1 instructions.
+////////////////////////////////////////////////////////////////////////////////
+
+def WriteDPPS: SchedWriteRes<[JFPU0, JFPU1]> {
+ let Latency = 11;
+ let ResourceCycles = [4,4];
+ let NumMicroOps = 5;
+}
+def : InstRW<[WriteDPPS], (instregex "(V)?DPPSrri")>;
+
+def WriteDPPSLd: SchedWriteRes<[JLAGU, JFPU0, JFPU1]> {
+ let Latency = 16;
+ let ResourceCycles = [1,4,4];
+ let NumMicroOps = 6;
+}
+def : InstRW<[WriteDPPSLd], (instregex "(V)?DPPSrmi")>;
+
+def WriteDPPD: SchedWriteRes<[JFPU0, JFPU1]> {
+ let Latency = 9;
+ let ResourceCycles = [3,3];
+ let NumMicroOps = 3;
+}
+def : InstRW<[WriteDPPD], (instregex "(V)?DPPDrri")>;
+
+def WriteDPPDLd: SchedWriteRes<[JLAGU, JFPU0, JFPU1]> {
+ let Latency = 14;
+ let ResourceCycles = [1,3,3];
+ let NumMicroOps = 3;
+}
+def : InstRW<[WriteDPPDLd], (instregex "(V)?DPPDrmi")>;
+
+////////////////////////////////////////////////////////////////////////////////
// SSE4A instructions.
////////////////////////////////////////////////////////////////////////////////
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D39046.119461.patch
Type: text/x-patch
Size: 2416 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20171018/87cd9c97/attachment.bin>
More information about the llvm-commits
mailing list