From: Andrew V. Tischenko Date: Mon, 27 Nov 2017 09:58:00 +0000 (+0000) Subject: Update BTVER2 sched numbers for SSE42 string instructions. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=67a7add24b5dcfb1d23af70e7a22b9cf262e8395;p=llvm Update BTVER2 sched numbers for SSE42 string instructions. Differential Revision: https://reviews.llvm.org/D39846 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319013 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Target/X86/X86ScheduleBtVer2.td b/lib/Target/X86/X86ScheduleBtVer2.td index 98e06a15202..edfb58059e1 100644 --- a/lib/Target/X86/X86ScheduleBtVer2.td +++ b/lib/Target/X86/X86ScheduleBtVer2.td @@ -274,43 +274,49 @@ def : WriteRes { // FIXME: approximate latencies + pipe dependencies //////////////////////////////////////////////////////////////////////////////// -def : WriteRes { - let Latency = 7; - let ResourceCycles = [2]; +def : WriteRes { + let Latency = 8; + let ResourceCycles = [2, 2]; + let NumMicroOps = 3; } -def : WriteRes { - let Latency = 12; - let ResourceCycles = [1, 2]; +def : WriteRes { + let Latency = 13; + let ResourceCycles = [1, 2, 2]; + let NumMicroOps = 3; } // Packed Compare Explicit Length Strings, Return Mask -def : WriteRes { - let Latency = 13; - let ResourceCycles = [5]; +def : WriteRes { + let Latency = 14; + let ResourceCycles = [5, 5, 5, 5, 5]; + let NumMicroOps = 9; } -def : WriteRes { - let Latency = 18; - let ResourceCycles = [1, 5]; +def : WriteRes { + let Latency = 19; + let ResourceCycles = [1, 5, 5, 5, 5, 5]; + let NumMicroOps = 9; } // Packed Compare Implicit Length Strings, Return Index -def : WriteRes { - let Latency = 6; - let ResourceCycles = [2]; +def : WriteRes { + let Latency = 7; + let ResourceCycles = [2, 2]; } -def : WriteRes { - let Latency = 11; - let ResourceCycles = [1, 2]; +def : WriteRes { + let Latency = 12; + let ResourceCycles = [1, 2, 2]; } // Packed Compare Explicit Length Strings, Return Index -def : WriteRes { - let Latency = 13; - let ResourceCycles = [5]; +def : WriteRes { + let Latency = 14; + let ResourceCycles = [5, 5, 5, 5, 5]; + let NumMicroOps = 9; } -def : WriteRes { - let Latency = 18; - let ResourceCycles = [1, 5]; +def : WriteRes { + let Latency = 19; + let ResourceCycles = [1, 5, 5, 5, 5, 5]; + let NumMicroOps = 9; } //////////////////////////////////////////////////////////////////////////////// diff --git a/test/CodeGen/X86/sse42-schedule.ll b/test/CodeGen/X86/sse42-schedule.ll index 419395c793d..d966ee66c5c 100644 --- a/test/CodeGen/X86/sse42-schedule.ll +++ b/test/CodeGen/X86/sse42-schedule.ll @@ -456,11 +456,11 @@ define i32 @test_pcmpestri(<16 x i8> %a0, <16 x i8> %a1, <16 x i8> *%a2) { ; BTVER2: # BB#0: ; BTVER2-NEXT: movl $7, %eax # sched: [1:0.17] ; BTVER2-NEXT: movl $7, %edx # sched: [1:0.17] -; BTVER2-NEXT: vpcmpestri $7, %xmm1, %xmm0 # sched: [13:2.50] +; BTVER2-NEXT: vpcmpestri $7, %xmm1, %xmm0 # sched: [14:10.00] ; BTVER2-NEXT: movl $7, %eax # sched: [1:0.17] ; BTVER2-NEXT: movl $7, %edx # sched: [1:0.17] ; BTVER2-NEXT: movl %ecx, %esi # sched: [1:0.17] -; BTVER2-NEXT: vpcmpestri $7, (%rdi), %xmm0 # sched: [18:2.50] +; BTVER2-NEXT: vpcmpestri $7, (%rdi), %xmm0 # sched: [19:10.00] ; BTVER2-NEXT: # kill: %ECX %ECX %RCX ; BTVER2-NEXT: leal (%rcx,%rsi), %eax # sched: [1:0.50] ; BTVER2-NEXT: retq # sched: [4:1.00] @@ -560,10 +560,10 @@ define <16 x i8> @test_pcmpestrm(<16 x i8> %a0, <16 x i8> %a1, <16 x i8> *%a2) { ; BTVER2: # BB#0: ; BTVER2-NEXT: movl $7, %eax # sched: [1:0.17] ; BTVER2-NEXT: movl $7, %edx # sched: [1:0.17] -; BTVER2-NEXT: vpcmpestrm $7, %xmm1, %xmm0 # sched: [13:2.50] +; BTVER2-NEXT: vpcmpestrm $7, %xmm1, %xmm0 # sched: [14:10.00] ; BTVER2-NEXT: movl $7, %eax # sched: [1:0.17] ; BTVER2-NEXT: movl $7, %edx # sched: [1:0.17] -; BTVER2-NEXT: vpcmpestrm $7, (%rdi), %xmm0 # sched: [18:2.50] +; BTVER2-NEXT: vpcmpestrm $7, (%rdi), %xmm0 # sched: [19:10.00] ; BTVER2-NEXT: retq # sched: [4:1.00] ; ; ZNVER1-LABEL: test_pcmpestrm: @@ -648,9 +648,9 @@ define i32 @test_pcmpistri(<16 x i8> %a0, <16 x i8> %a1, <16 x i8> *%a2) { ; ; BTVER2-LABEL: test_pcmpistri: ; BTVER2: # BB#0: -; BTVER2-NEXT: vpcmpistri $7, %xmm1, %xmm0 # sched: [6:1.00] +; BTVER2-NEXT: vpcmpistri $7, %xmm1, %xmm0 # sched: [7:2.00] ; BTVER2-NEXT: movl %ecx, %eax # sched: [1:0.17] -; BTVER2-NEXT: vpcmpistri $7, (%rdi), %xmm0 # sched: [11:1.00] +; BTVER2-NEXT: vpcmpistri $7, (%rdi), %xmm0 # sched: [12:2.00] ; BTVER2-NEXT: # kill: %ECX %ECX %RCX ; BTVER2-NEXT: leal (%rcx,%rax), %eax # sched: [1:0.50] ; BTVER2-NEXT: retq # sched: [4:1.00] @@ -716,8 +716,8 @@ define <16 x i8> @test_pcmpistrm(<16 x i8> %a0, <16 x i8> %a1, <16 x i8> *%a2) { ; ; BTVER2-LABEL: test_pcmpistrm: ; BTVER2: # BB#0: -; BTVER2-NEXT: vpcmpistrm $7, %xmm1, %xmm0 # sched: [7:1.00] -; BTVER2-NEXT: vpcmpistrm $7, (%rdi), %xmm0 # sched: [12:1.00] +; BTVER2-NEXT: vpcmpistrm $7, %xmm1, %xmm0 # sched: [8:2.00] +; BTVER2-NEXT: vpcmpistrm $7, (%rdi), %xmm0 # sched: [13:2.00] ; BTVER2-NEXT: retq # sched: [4:1.00] ; ; ZNVER1-LABEL: test_pcmpistrm: