[X86] Fix the SNB scheduler for BLENDVB.
authorCraig Topper <craig.topper@intel.com>
Tue, 20 Mar 2018 01:30:21 +0000 (01:30 +0000)
committerCraig Topper <craig.topper@intel.com>
Tue, 20 Mar 2018 01:30:21 +0000 (01:30 +0000)
PBLENDVBrr0 was with the memory version of VBLENDVB and PBLENDVBrm0 was missing.

llvm-svn: 327937

llvm/lib/Target/X86/X86SchedSandyBridge.td
llvm/test/CodeGen/X86/sse41-schedule.ll

index 1e12fba..fedadb1 100644 (file)
@@ -698,6 +698,7 @@ def SBWriteResGroup10 : SchedWriteRes<[SBPort15]> {
   let NumMicroOps = 2;
   let ResourceCycles = [2];
 }
+def: InstRW<[SBWriteResGroup10], (instregex "PBLENDVBrr0")>;
 def: InstRW<[SBWriteResGroup10], (instregex "VPBLENDVBrr")>;
 
 def SBWriteResGroup11 : SchedWriteRes<[SBPort015]> {
@@ -1917,7 +1918,7 @@ def SBWriteResGroup76 : SchedWriteRes<[SBPort23,SBPort15]> {
   let NumMicroOps = 3;
   let ResourceCycles = [1,2];
 }
-def: InstRW<[SBWriteResGroup76], (instregex "PBLENDVBrr0")>;
+def: InstRW<[SBWriteResGroup76], (instregex "PBLENDVBrm0")>;
 def: InstRW<[SBWriteResGroup76], (instregex "VPBLENDVBrm")>;
 
 def SBWriteResGroup77 : SchedWriteRes<[SBPort0,SBPort1,SBPort23]> {
index 1718888..42a17b3 100644 (file)
@@ -709,8 +709,8 @@ define <16 x i8> @test_pblendvb(<16 x i8> %a0, <16 x i8> %a1, <16 x i8> %a2, <16
 ; GENERIC:       # %bb.0:
 ; GENERIC-NEXT:    movdqa %xmm0, %xmm3 # sched: [1:0.33]
 ; GENERIC-NEXT:    movaps %xmm2, %xmm0 # sched: [1:1.00]
-; GENERIC-NEXT:    pblendvb %xmm0, %xmm1, %xmm3 # sched: [8:1.00]
-; GENERIC-NEXT:    pblendvb %xmm0, (%rdi), %xmm3 # sched: [6:1.00]
+; GENERIC-NEXT:    pblendvb %xmm0, %xmm1, %xmm3 # sched: [2:1.00]
+; GENERIC-NEXT:    pblendvb %xmm0, (%rdi), %xmm3 # sched: [8:1.00]
 ; GENERIC-NEXT:    movdqa %xmm3, %xmm0 # sched: [1:0.33]
 ; GENERIC-NEXT:    retq # sched: [1:1.00]
 ;