[llvm] r331388 - [X86][SNB] Fix scheduling of MMX integer multiply instructions.
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Wed May 2 12:26:14 PDT 2018
Author: rksimon
Date: Wed May 2 12:26:14 2018
New Revision: 331388
URL: http://llvm.org/viewvc/llvm-project?rev=331388&view=rev
Log:
[X86][SNB] Fix scheduling of MMX integer multiply instructions.
The entries were being bound to the wrong class.
Modified:
llvm/trunk/lib/Target/X86/X86SchedSandyBridge.td
llvm/trunk/test/CodeGen/X86/mmx-schedule.ll
llvm/trunk/test/tools/llvm-mca/X86/SandyBridge/resources-mmx.s
llvm/trunk/test/tools/llvm-mca/X86/SandyBridge/resources-sse1.s
llvm/trunk/test/tools/llvm-mca/X86/SandyBridge/resources-sse2.s
llvm/trunk/test/tools/llvm-mca/X86/SandyBridge/resources-ssse3.s
Modified: llvm/trunk/lib/Target/X86/X86SchedSandyBridge.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86SchedSandyBridge.td?rev=331388&r1=331387&r2=331388&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86SchedSandyBridge.td (original)
+++ llvm/trunk/lib/Target/X86/X86SchedSandyBridge.td Wed May 2 12:26:14 2018
@@ -1247,14 +1247,14 @@ def SBWriteResGroup89_2 : SchedWriteRes<
let NumMicroOps = 2;
let ResourceCycles = [1,1];
}
-def: InstRW<[SBWriteResGroup89], (instregex "MMX_PMADDUBSWrm",
- "MMX_PMADDWDirm",
- "MMX_PMULHRSWrm",
- "MMX_PMULHUWirm",
- "MMX_PMULHWirm",
- "MMX_PMULLWirm",
- "MMX_PMULUDQirm",
- "MMX_PSADBWirm")>;
+def: InstRW<[SBWriteResGroup89_2], (instregex "MMX_PMADDUBSWrm",
+ "MMX_PMADDWDirm",
+ "MMX_PMULHRSWrm",
+ "MMX_PMULHUWirm",
+ "MMX_PMULHWirm",
+ "MMX_PMULLWirm",
+ "MMX_PMULUDQirm",
+ "MMX_PSADBWirm")>;
def SBWriteResGroup90 : SchedWriteRes<[SBPort1,SBPort23]> {
let Latency = 9;
Modified: llvm/trunk/test/CodeGen/X86/mmx-schedule.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/mmx-schedule.ll?rev=331388&r1=331387&r2=331388&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/X86/mmx-schedule.ll (original)
+++ llvm/trunk/test/CodeGen/X86/mmx-schedule.ll Wed May 2 12:26:14 2018
@@ -3591,7 +3591,7 @@ define i64 @test_pmaddwd(x86_mmx %a0, x8
; GENERIC-LABEL: test_pmaddwd:
; GENERIC: # %bb.0:
; GENERIC-NEXT: pmaddwd %mm1, %mm0 # sched: [5:1.00]
-; GENERIC-NEXT: pmaddwd (%rdi), %mm0 # sched: [11:1.00]
+; GENERIC-NEXT: pmaddwd (%rdi), %mm0 # sched: [10:1.00]
; GENERIC-NEXT: movq %mm0, %rax # sched: [1:0.33]
; GENERIC-NEXT: retq # sched: [1:1.00]
;
@@ -3612,7 +3612,7 @@ define i64 @test_pmaddwd(x86_mmx %a0, x8
; SANDY-LABEL: test_pmaddwd:
; SANDY: # %bb.0:
; SANDY-NEXT: pmaddwd %mm1, %mm0 # sched: [5:1.00]
-; SANDY-NEXT: pmaddwd (%rdi), %mm0 # sched: [11:1.00]
+; SANDY-NEXT: pmaddwd (%rdi), %mm0 # sched: [10:1.00]
; SANDY-NEXT: movq %mm0, %rax # sched: [1:0.33]
; SANDY-NEXT: retq # sched: [1:1.00]
;
@@ -3669,7 +3669,7 @@ define i64 @test_pmaddubsw(x86_mmx %a0,
; GENERIC-LABEL: test_pmaddubsw:
; GENERIC: # %bb.0:
; GENERIC-NEXT: pmaddubsw %mm1, %mm0 # sched: [5:1.00]
-; GENERIC-NEXT: pmaddubsw (%rdi), %mm0 # sched: [11:1.00]
+; GENERIC-NEXT: pmaddubsw (%rdi), %mm0 # sched: [10:1.00]
; GENERIC-NEXT: movq %mm0, %rax # sched: [1:0.33]
; GENERIC-NEXT: retq # sched: [1:1.00]
;
@@ -3690,7 +3690,7 @@ define i64 @test_pmaddubsw(x86_mmx %a0,
; SANDY-LABEL: test_pmaddubsw:
; SANDY: # %bb.0:
; SANDY-NEXT: pmaddubsw %mm1, %mm0 # sched: [5:1.00]
-; SANDY-NEXT: pmaddubsw (%rdi), %mm0 # sched: [11:1.00]
+; SANDY-NEXT: pmaddubsw (%rdi), %mm0 # sched: [10:1.00]
; SANDY-NEXT: movq %mm0, %rax # sched: [1:0.33]
; SANDY-NEXT: retq # sched: [1:1.00]
;
@@ -4114,7 +4114,7 @@ define i64 @test_pmulhrsw(x86_mmx %a0, x
; GENERIC-LABEL: test_pmulhrsw:
; GENERIC: # %bb.0:
; GENERIC-NEXT: pmulhrsw %mm1, %mm0 # sched: [5:1.00]
-; GENERIC-NEXT: pmulhrsw (%rdi), %mm0 # sched: [11:1.00]
+; GENERIC-NEXT: pmulhrsw (%rdi), %mm0 # sched: [10:1.00]
; GENERIC-NEXT: movq %mm0, %rax # sched: [1:0.33]
; GENERIC-NEXT: retq # sched: [1:1.00]
;
@@ -4135,7 +4135,7 @@ define i64 @test_pmulhrsw(x86_mmx %a0, x
; SANDY-LABEL: test_pmulhrsw:
; SANDY: # %bb.0:
; SANDY-NEXT: pmulhrsw %mm1, %mm0 # sched: [5:1.00]
-; SANDY-NEXT: pmulhrsw (%rdi), %mm0 # sched: [11:1.00]
+; SANDY-NEXT: pmulhrsw (%rdi), %mm0 # sched: [10:1.00]
; SANDY-NEXT: movq %mm0, %rax # sched: [1:0.33]
; SANDY-NEXT: retq # sched: [1:1.00]
;
@@ -4192,7 +4192,7 @@ define i64 @test_pmulhw(x86_mmx %a0, x86
; GENERIC-LABEL: test_pmulhw:
; GENERIC: # %bb.0:
; GENERIC-NEXT: pmulhw %mm1, %mm0 # sched: [5:1.00]
-; GENERIC-NEXT: pmulhw (%rdi), %mm0 # sched: [11:1.00]
+; GENERIC-NEXT: pmulhw (%rdi), %mm0 # sched: [10:1.00]
; GENERIC-NEXT: movq %mm0, %rax # sched: [1:0.33]
; GENERIC-NEXT: retq # sched: [1:1.00]
;
@@ -4213,7 +4213,7 @@ define i64 @test_pmulhw(x86_mmx %a0, x86
; SANDY-LABEL: test_pmulhw:
; SANDY: # %bb.0:
; SANDY-NEXT: pmulhw %mm1, %mm0 # sched: [5:1.00]
-; SANDY-NEXT: pmulhw (%rdi), %mm0 # sched: [11:1.00]
+; SANDY-NEXT: pmulhw (%rdi), %mm0 # sched: [10:1.00]
; SANDY-NEXT: movq %mm0, %rax # sched: [1:0.33]
; SANDY-NEXT: retq # sched: [1:1.00]
;
@@ -4270,7 +4270,7 @@ define i64 @test_pmulhuw(x86_mmx %a0, x8
; GENERIC-LABEL: test_pmulhuw:
; GENERIC: # %bb.0:
; GENERIC-NEXT: pmulhuw %mm1, %mm0 # sched: [5:1.00]
-; GENERIC-NEXT: pmulhuw (%rdi), %mm0 # sched: [11:1.00]
+; GENERIC-NEXT: pmulhuw (%rdi), %mm0 # sched: [10:1.00]
; GENERIC-NEXT: movq %mm0, %rax # sched: [1:0.33]
; GENERIC-NEXT: retq # sched: [1:1.00]
;
@@ -4291,7 +4291,7 @@ define i64 @test_pmulhuw(x86_mmx %a0, x8
; SANDY-LABEL: test_pmulhuw:
; SANDY: # %bb.0:
; SANDY-NEXT: pmulhuw %mm1, %mm0 # sched: [5:1.00]
-; SANDY-NEXT: pmulhuw (%rdi), %mm0 # sched: [11:1.00]
+; SANDY-NEXT: pmulhuw (%rdi), %mm0 # sched: [10:1.00]
; SANDY-NEXT: movq %mm0, %rax # sched: [1:0.33]
; SANDY-NEXT: retq # sched: [1:1.00]
;
@@ -4348,7 +4348,7 @@ define i64 @test_pmullw(x86_mmx %a0, x86
; GENERIC-LABEL: test_pmullw:
; GENERIC: # %bb.0:
; GENERIC-NEXT: pmullw %mm1, %mm0 # sched: [5:1.00]
-; GENERIC-NEXT: pmullw (%rdi), %mm0 # sched: [11:1.00]
+; GENERIC-NEXT: pmullw (%rdi), %mm0 # sched: [10:1.00]
; GENERIC-NEXT: movq %mm0, %rax # sched: [1:0.33]
; GENERIC-NEXT: retq # sched: [1:1.00]
;
@@ -4369,7 +4369,7 @@ define i64 @test_pmullw(x86_mmx %a0, x86
; SANDY-LABEL: test_pmullw:
; SANDY: # %bb.0:
; SANDY-NEXT: pmullw %mm1, %mm0 # sched: [5:1.00]
-; SANDY-NEXT: pmullw (%rdi), %mm0 # sched: [11:1.00]
+; SANDY-NEXT: pmullw (%rdi), %mm0 # sched: [10:1.00]
; SANDY-NEXT: movq %mm0, %rax # sched: [1:0.33]
; SANDY-NEXT: retq # sched: [1:1.00]
;
@@ -4426,7 +4426,7 @@ define i64 @test_pmuludq(x86_mmx %a0, x8
; GENERIC-LABEL: test_pmuludq:
; GENERIC: # %bb.0:
; GENERIC-NEXT: pmuludq %mm1, %mm0 # sched: [5:1.00]
-; GENERIC-NEXT: pmuludq (%rdi), %mm0 # sched: [11:1.00]
+; GENERIC-NEXT: pmuludq (%rdi), %mm0 # sched: [10:1.00]
; GENERIC-NEXT: movq %mm0, %rax # sched: [1:0.33]
; GENERIC-NEXT: retq # sched: [1:1.00]
;
@@ -4447,7 +4447,7 @@ define i64 @test_pmuludq(x86_mmx %a0, x8
; SANDY-LABEL: test_pmuludq:
; SANDY: # %bb.0:
; SANDY-NEXT: pmuludq %mm1, %mm0 # sched: [5:1.00]
-; SANDY-NEXT: pmuludq (%rdi), %mm0 # sched: [11:1.00]
+; SANDY-NEXT: pmuludq (%rdi), %mm0 # sched: [10:1.00]
; SANDY-NEXT: movq %mm0, %rax # sched: [1:0.33]
; SANDY-NEXT: retq # sched: [1:1.00]
;
@@ -4582,7 +4582,7 @@ define i64 @test_psadbw(x86_mmx %a0, x86
; GENERIC-LABEL: test_psadbw:
; GENERIC: # %bb.0:
; GENERIC-NEXT: psadbw %mm1, %mm0 # sched: [5:1.00]
-; GENERIC-NEXT: psadbw (%rdi), %mm0 # sched: [11:1.00]
+; GENERIC-NEXT: psadbw (%rdi), %mm0 # sched: [10:1.00]
; GENERIC-NEXT: movq %mm0, %rax # sched: [1:0.33]
; GENERIC-NEXT: retq # sched: [1:1.00]
;
@@ -4603,7 +4603,7 @@ define i64 @test_psadbw(x86_mmx %a0, x86
; SANDY-LABEL: test_psadbw:
; SANDY: # %bb.0:
; SANDY-NEXT: psadbw %mm1, %mm0 # sched: [5:1.00]
-; SANDY-NEXT: psadbw (%rdi), %mm0 # sched: [11:1.00]
+; SANDY-NEXT: psadbw (%rdi), %mm0 # sched: [10:1.00]
; SANDY-NEXT: movq %mm0, %rax # sched: [1:0.33]
; SANDY-NEXT: retq # sched: [1:1.00]
;
Modified: llvm/trunk/test/tools/llvm-mca/X86/SandyBridge/resources-mmx.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-mca/X86/SandyBridge/resources-mmx.s?rev=331388&r1=331387&r2=331388&view=diff
==============================================================================
--- llvm/trunk/test/tools/llvm-mca/X86/SandyBridge/resources-mmx.s (original)
+++ llvm/trunk/test/tools/llvm-mca/X86/SandyBridge/resources-mmx.s Wed May 2 12:26:14 2018
@@ -210,11 +210,11 @@ pxor (%rax), %mm2
# CHECK-NEXT: 1 3 1.00 pcmpgtw %mm0, %mm2
# CHECK-NEXT: 2 8 1.00 * pcmpgtw (%rax), %mm2
# CHECK-NEXT: 1 5 1.00 pmaddwd %mm0, %mm2
-# CHECK-NEXT: 2 11 1.00 * pmaddwd (%rax), %mm2
+# CHECK-NEXT: 2 10 1.00 * pmaddwd (%rax), %mm2
# CHECK-NEXT: 1 5 1.00 pmulhw %mm0, %mm2
-# CHECK-NEXT: 2 11 1.00 * pmulhw (%rax), %mm2
+# CHECK-NEXT: 2 10 1.00 * pmulhw (%rax), %mm2
# CHECK-NEXT: 1 5 1.00 pmullw %mm0, %mm2
-# CHECK-NEXT: 2 11 1.00 * pmullw (%rax), %mm2
+# CHECK-NEXT: 2 10 1.00 * pmullw (%rax), %mm2
# CHECK-NEXT: 1 1 0.33 por %mm0, %mm2
# CHECK-NEXT: 2 6 0.50 * por (%rax), %mm2
# CHECK-NEXT: 1 1 1.00 pslld $1, %mm2
Modified: llvm/trunk/test/tools/llvm-mca/X86/SandyBridge/resources-sse1.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-mca/X86/SandyBridge/resources-sse1.s?rev=331388&r1=331387&r2=331388&view=diff
==============================================================================
--- llvm/trunk/test/tools/llvm-mca/X86/SandyBridge/resources-sse1.s (original)
+++ llvm/trunk/test/tools/llvm-mca/X86/SandyBridge/resources-sse1.s Wed May 2 12:26:14 2018
@@ -281,13 +281,13 @@ xorps (%rax), %xmm2
# CHECK-NEXT: 2 8 1.00 * pminub (%rax), %mm2
# CHECK-NEXT: 1 2 1.00 pmovmskb %xmm0, %ecx
# CHECK-NEXT: 1 5 1.00 pmulhuw %mm0, %mm2
-# CHECK-NEXT: 2 11 1.00 * pmulhuw (%rax), %mm2
+# CHECK-NEXT: 2 10 1.00 * pmulhuw (%rax), %mm2
# CHECK-NEXT: 1 5 0.50 * * prefetcht0 (%rax)
# CHECK-NEXT: 1 5 0.50 * * prefetcht1 (%rax)
# CHECK-NEXT: 1 5 0.50 * * prefetcht2 (%rax)
# CHECK-NEXT: 1 5 0.50 * * prefetchnta (%rax)
# CHECK-NEXT: 1 5 1.00 psadbw %mm0, %mm2
-# CHECK-NEXT: 2 11 1.00 * psadbw (%rax), %mm2
+# CHECK-NEXT: 2 10 1.00 * psadbw (%rax), %mm2
# CHECK-NEXT: 1 1 1.00 pshufw $1, %mm0, %mm2
# CHECK-NEXT: 2 6 1.00 * pshufw $1, (%rax), %mm2
# CHECK-NEXT: 1 5 1.00 rcpps %xmm0, %xmm2
Modified: llvm/trunk/test/tools/llvm-mca/X86/SandyBridge/resources-sse2.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-mca/X86/SandyBridge/resources-sse2.s?rev=331388&r1=331387&r2=331388&view=diff
==============================================================================
--- llvm/trunk/test/tools/llvm-mca/X86/SandyBridge/resources-sse2.s (original)
+++ llvm/trunk/test/tools/llvm-mca/X86/SandyBridge/resources-sse2.s Wed May 2 12:26:14 2018
@@ -573,7 +573,7 @@ xorpd (%rax), %xmm2
# CHECK-NEXT: 1 5 1.00 pmullw %xmm0, %xmm2
# CHECK-NEXT: 2 11 1.00 * pmullw (%rax), %xmm2
# CHECK-NEXT: 1 5 1.00 pmuludq %mm0, %mm2
-# CHECK-NEXT: 2 11 1.00 * pmuludq (%rax), %mm2
+# CHECK-NEXT: 2 10 1.00 * pmuludq (%rax), %mm2
# CHECK-NEXT: 1 5 1.00 pmuludq %xmm0, %xmm2
# CHECK-NEXT: 2 11 1.00 * pmuludq (%rax), %xmm2
# CHECK-NEXT: 1 1 0.33 por %xmm0, %xmm2
Modified: llvm/trunk/test/tools/llvm-mca/X86/SandyBridge/resources-ssse3.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-mca/X86/SandyBridge/resources-ssse3.s?rev=331388&r1=331387&r2=331388&view=diff
==============================================================================
--- llvm/trunk/test/tools/llvm-mca/X86/SandyBridge/resources-ssse3.s (original)
+++ llvm/trunk/test/tools/llvm-mca/X86/SandyBridge/resources-ssse3.s Wed May 2 12:26:14 2018
@@ -147,11 +147,11 @@ psignw (%rax), %xmm2
# CHECK-NEXT: 3 3 1.50 phsubw %xmm0, %xmm2
# CHECK-NEXT: 4 9 1.50 * phsubw (%rax), %xmm2
# CHECK-NEXT: 1 5 1.00 pmaddubsw %mm0, %mm2
-# CHECK-NEXT: 2 11 1.00 * pmaddubsw (%rax), %mm2
+# CHECK-NEXT: 2 10 1.00 * pmaddubsw (%rax), %mm2
# CHECK-NEXT: 1 5 1.00 pmaddubsw %xmm0, %xmm2
# CHECK-NEXT: 2 11 1.00 * pmaddubsw (%rax), %xmm2
# CHECK-NEXT: 1 5 1.00 pmulhrsw %mm0, %mm2
-# CHECK-NEXT: 2 11 1.00 * pmulhrsw (%rax), %mm2
+# CHECK-NEXT: 2 10 1.00 * pmulhrsw (%rax), %mm2
# CHECK-NEXT: 1 5 1.00 pmulhrsw %xmm0, %xmm2
# CHECK-NEXT: 2 11 1.00 * pmulhrsw (%rax), %xmm2
# CHECK-NEXT: 1 1 0.50 pshufb %mm0, %mm2
More information about the llvm-commits
mailing list