[X86][SKL] Updated scheduling information for the SkylakeClient target
Updated the scheduling information for the SkylakeClient target with the following changes:
1. regrouped the instructions after adding load and store latencies.
2. regrouped the instructions after adding identified missing ports in several groups.
The changes were made after revisiting the latencies impact of all the load and store uOps.
Reviewers: zvi, RKSimon, craig.topper
Differential Revision: https://reviews.llvm.org/D38727
Change-Id: I778a308cc11e490e8fa5e27e2047412a1dca029f
llvm-svn: 315978
diff --git a/llvm/test/CodeGen/X86/bmi2-schedule.ll b/llvm/test/CodeGen/X86/bmi2-schedule.ll
index 172a460..a09f774 100644
--- a/llvm/test/CodeGen/X86/bmi2-schedule.ll
+++ b/llvm/test/CodeGen/X86/bmi2-schedule.ll
@@ -13,12 +13,26 @@
 ; GENERIC-NEXT:    addl %ecx, %eax # sched: [1:0.33]
 ; GENERIC-NEXT:    retq # sched: [1:1.00]
 ;
-; COMMON-LABEL: test_bzhi_i32:
-; COMMON:       # BB#0:
-; COMMON-NEXT:    bzhil %edi, (%rdx), %ecx # sched: [1:0.50]
-; COMMON-NEXT:    bzhil %edi, %esi, %eax # sched: [1:0.50]
-; COMMON-NEXT:    addl %ecx, %eax # sched: [1:0.25]
-; COMMON-NEXT:    retq # sched: [2:1.00]
+; HASWELL-LABEL: test_bzhi_i32:
+; HASWELL:       # BB#0:
+; HASWELL-NEXT:    bzhil %edi, (%rdx), %ecx # sched: [1:0.50]
+; HASWELL-NEXT:    bzhil %edi, %esi, %eax # sched: [1:0.50]
+; HASWELL-NEXT:    addl %ecx, %eax # sched: [1:0.25]
+; HASWELL-NEXT:    retq # sched: [2:1.00]
+;
+; SKYLAKE-LABEL: test_bzhi_i32:
+; SKYLAKE:       # BB#0:
+; SKYLAKE-NEXT:    bzhil %edi, (%rdx), %ecx # sched: [6:0.50]
+; SKYLAKE-NEXT:    bzhil %edi, %esi, %eax # sched: [1:0.50]
+; SKYLAKE-NEXT:    addl %ecx, %eax # sched: [1:0.25]
+; SKYLAKE-NEXT:    retq # sched: [7:1.00]
+;
+; KNL-LABEL: test_bzhi_i32:
+; KNL:       # BB#0:
+; KNL-NEXT:    bzhil %edi, (%rdx), %ecx # sched: [1:0.50]
+; KNL-NEXT:    bzhil %edi, %esi, %eax # sched: [1:0.50]
+; KNL-NEXT:    addl %ecx, %eax # sched: [1:0.25]
+; KNL-NEXT:    retq # sched: [2:1.00]
 ;
 ; ZNVER1-LABEL: test_bzhi_i32:
 ; ZNVER1:       # BB#0:
@@ -42,12 +56,26 @@
 ; GENERIC-NEXT:    addq %rcx, %rax # sched: [1:0.33]
 ; GENERIC-NEXT:    retq # sched: [1:1.00]
 ;
-; COMMON-LABEL: test_bzhi_i64:
-; COMMON:       # BB#0:
-; COMMON-NEXT:    bzhiq %rdi, (%rdx), %rcx # sched: [1:0.50]
-; COMMON-NEXT:    bzhiq %rdi, %rsi, %rax # sched: [1:0.50]
-; COMMON-NEXT:    addq %rcx, %rax # sched: [1:0.25]
-; COMMON-NEXT:    retq # sched: [2:1.00]
+; HASWELL-LABEL: test_bzhi_i64:
+; HASWELL:       # BB#0:
+; HASWELL-NEXT:    bzhiq %rdi, (%rdx), %rcx # sched: [1:0.50]
+; HASWELL-NEXT:    bzhiq %rdi, %rsi, %rax # sched: [1:0.50]
+; HASWELL-NEXT:    addq %rcx, %rax # sched: [1:0.25]
+; HASWELL-NEXT:    retq # sched: [2:1.00]
+;
+; SKYLAKE-LABEL: test_bzhi_i64:
+; SKYLAKE:       # BB#0:
+; SKYLAKE-NEXT:    bzhiq %rdi, (%rdx), %rcx # sched: [6:0.50]
+; SKYLAKE-NEXT:    bzhiq %rdi, %rsi, %rax # sched: [1:0.50]
+; SKYLAKE-NEXT:    addq %rcx, %rax # sched: [1:0.25]
+; SKYLAKE-NEXT:    retq # sched: [7:1.00]
+;
+; KNL-LABEL: test_bzhi_i64:
+; KNL:       # BB#0:
+; KNL-NEXT:    bzhiq %rdi, (%rdx), %rcx # sched: [1:0.50]
+; KNL-NEXT:    bzhiq %rdi, %rsi, %rax # sched: [1:0.50]
+; KNL-NEXT:    addq %rcx, %rax # sched: [1:0.25]
+; KNL-NEXT:    retq # sched: [2:1.00]
 ;
 ; ZNVER1-LABEL: test_bzhi_i64:
 ; ZNVER1:       # BB#0:
@@ -75,14 +103,32 @@
 ; GENERIC-NEXT:    orq %rcx, %rax # sched: [1:0.33]
 ; GENERIC-NEXT:    retq # sched: [1:1.00]
 ;
-; COMMON-LABEL: test_mulx_i64:
-; COMMON:       # BB#0:
-; COMMON-NEXT:    movq %rdx, %rax # sched: [1:0.25]
-; COMMON-NEXT:    movq %rdi, %rdx # sched: [1:0.25]
-; COMMON-NEXT:    mulxq %rsi, %rsi, %rcx # sched: [4:1.00]
-; COMMON-NEXT:    mulxq (%rax), %rdx, %rax # sched: [4:1.00]
-; COMMON-NEXT:    orq %rcx, %rax # sched: [1:0.25]
-; COMMON-NEXT:    retq # sched: [2:1.00]
+; HASWELL-LABEL: test_mulx_i64:
+; HASWELL:       # BB#0:
+; HASWELL-NEXT:    movq %rdx, %rax # sched: [1:0.25]
+; HASWELL-NEXT:    movq %rdi, %rdx # sched: [1:0.25]
+; HASWELL-NEXT:    mulxq %rsi, %rsi, %rcx # sched: [4:1.00]
+; HASWELL-NEXT:    mulxq (%rax), %rdx, %rax # sched: [4:1.00]
+; HASWELL-NEXT:    orq %rcx, %rax # sched: [1:0.25]
+; HASWELL-NEXT:    retq # sched: [2:1.00]
+;
+; SKYLAKE-LABEL: test_mulx_i64:
+; SKYLAKE:       # BB#0:
+; SKYLAKE-NEXT:    movq %rdx, %rax # sched: [1:0.25]
+; SKYLAKE-NEXT:    movq %rdi, %rdx # sched: [1:0.25]
+; SKYLAKE-NEXT:    mulxq %rsi, %rsi, %rcx # sched: [4:1.00]
+; SKYLAKE-NEXT:    mulxq (%rax), %rdx, %rax # sched: [9:1.00]
+; SKYLAKE-NEXT:    orq %rcx, %rax # sched: [1:0.25]
+; SKYLAKE-NEXT:    retq # sched: [7:1.00]
+;
+; KNL-LABEL: test_mulx_i64:
+; KNL:       # BB#0:
+; KNL-NEXT:    movq %rdx, %rax # sched: [1:0.25]
+; KNL-NEXT:    movq %rdi, %rdx # sched: [1:0.25]
+; KNL-NEXT:    mulxq %rsi, %rsi, %rcx # sched: [4:1.00]
+; KNL-NEXT:    mulxq (%rax), %rdx, %rax # sched: [4:1.00]
+; KNL-NEXT:    orq %rcx, %rax # sched: [1:0.25]
+; KNL-NEXT:    retq # sched: [2:1.00]
 ;
 ; ZNVER1-LABEL: test_mulx_i64:
 ; ZNVER1:       # BB#0:
@@ -114,12 +160,26 @@
 ; GENERIC-NEXT:    addl %ecx, %eax # sched: [1:0.33]
 ; GENERIC-NEXT:    retq # sched: [1:1.00]
 ;
-; COMMON-LABEL: test_pdep_i32:
-; COMMON:       # BB#0:
-; COMMON-NEXT:    pdepl (%rdx), %edi, %ecx # sched: [3:1.00]
-; COMMON-NEXT:    pdepl %esi, %edi, %eax # sched: [3:1.00]
-; COMMON-NEXT:    addl %ecx, %eax # sched: [1:0.25]
-; COMMON-NEXT:    retq # sched: [2:1.00]
+; HASWELL-LABEL: test_pdep_i32:
+; HASWELL:       # BB#0:
+; HASWELL-NEXT:    pdepl (%rdx), %edi, %ecx # sched: [3:1.00]
+; HASWELL-NEXT:    pdepl %esi, %edi, %eax # sched: [3:1.00]
+; HASWELL-NEXT:    addl %ecx, %eax # sched: [1:0.25]
+; HASWELL-NEXT:    retq # sched: [2:1.00]
+;
+; SKYLAKE-LABEL: test_pdep_i32:
+; SKYLAKE:       # BB#0:
+; SKYLAKE-NEXT:    pdepl (%rdx), %edi, %ecx # sched: [8:1.00]
+; SKYLAKE-NEXT:    pdepl %esi, %edi, %eax # sched: [3:1.00]
+; SKYLAKE-NEXT:    addl %ecx, %eax # sched: [1:0.25]
+; SKYLAKE-NEXT:    retq # sched: [7:1.00]
+;
+; KNL-LABEL: test_pdep_i32:
+; KNL:       # BB#0:
+; KNL-NEXT:    pdepl (%rdx), %edi, %ecx # sched: [3:1.00]
+; KNL-NEXT:    pdepl %esi, %edi, %eax # sched: [3:1.00]
+; KNL-NEXT:    addl %ecx, %eax # sched: [1:0.25]
+; KNL-NEXT:    retq # sched: [2:1.00]
 ;
 ; ZNVER1-LABEL: test_pdep_i32:
 ; ZNVER1:       # BB#0:
@@ -143,12 +203,26 @@
 ; GENERIC-NEXT:    addq %rcx, %rax # sched: [1:0.33]
 ; GENERIC-NEXT:    retq # sched: [1:1.00]
 ;
-; COMMON-LABEL: test_pdep_i64:
-; COMMON:       # BB#0:
-; COMMON-NEXT:    pdepq (%rdx), %rdi, %rcx # sched: [3:1.00]
-; COMMON-NEXT:    pdepq %rsi, %rdi, %rax # sched: [3:1.00]
-; COMMON-NEXT:    addq %rcx, %rax # sched: [1:0.25]
-; COMMON-NEXT:    retq # sched: [2:1.00]
+; HASWELL-LABEL: test_pdep_i64:
+; HASWELL:       # BB#0:
+; HASWELL-NEXT:    pdepq (%rdx), %rdi, %rcx # sched: [3:1.00]
+; HASWELL-NEXT:    pdepq %rsi, %rdi, %rax # sched: [3:1.00]
+; HASWELL-NEXT:    addq %rcx, %rax # sched: [1:0.25]
+; HASWELL-NEXT:    retq # sched: [2:1.00]
+;
+; SKYLAKE-LABEL: test_pdep_i64:
+; SKYLAKE:       # BB#0:
+; SKYLAKE-NEXT:    pdepq (%rdx), %rdi, %rcx # sched: [8:1.00]
+; SKYLAKE-NEXT:    pdepq %rsi, %rdi, %rax # sched: [3:1.00]
+; SKYLAKE-NEXT:    addq %rcx, %rax # sched: [1:0.25]
+; SKYLAKE-NEXT:    retq # sched: [7:1.00]
+;
+; KNL-LABEL: test_pdep_i64:
+; KNL:       # BB#0:
+; KNL-NEXT:    pdepq (%rdx), %rdi, %rcx # sched: [3:1.00]
+; KNL-NEXT:    pdepq %rsi, %rdi, %rax # sched: [3:1.00]
+; KNL-NEXT:    addq %rcx, %rax # sched: [1:0.25]
+; KNL-NEXT:    retq # sched: [2:1.00]
 ;
 ; ZNVER1-LABEL: test_pdep_i64:
 ; ZNVER1:       # BB#0:
@@ -172,12 +246,26 @@
 ; GENERIC-NEXT:    addl %ecx, %eax # sched: [1:0.33]
 ; GENERIC-NEXT:    retq # sched: [1:1.00]
 ;
-; COMMON-LABEL: test_pext_i32:
-; COMMON:       # BB#0:
-; COMMON-NEXT:    pextl (%rdx), %edi, %ecx # sched: [3:1.00]
-; COMMON-NEXT:    pextl %esi, %edi, %eax # sched: [3:1.00]
-; COMMON-NEXT:    addl %ecx, %eax # sched: [1:0.25]
-; COMMON-NEXT:    retq # sched: [2:1.00]
+; HASWELL-LABEL: test_pext_i32:
+; HASWELL:       # BB#0:
+; HASWELL-NEXT:    pextl (%rdx), %edi, %ecx # sched: [3:1.00]
+; HASWELL-NEXT:    pextl %esi, %edi, %eax # sched: [3:1.00]
+; HASWELL-NEXT:    addl %ecx, %eax # sched: [1:0.25]
+; HASWELL-NEXT:    retq # sched: [2:1.00]
+;
+; SKYLAKE-LABEL: test_pext_i32:
+; SKYLAKE:       # BB#0:
+; SKYLAKE-NEXT:    pextl (%rdx), %edi, %ecx # sched: [8:1.00]
+; SKYLAKE-NEXT:    pextl %esi, %edi, %eax # sched: [3:1.00]
+; SKYLAKE-NEXT:    addl %ecx, %eax # sched: [1:0.25]
+; SKYLAKE-NEXT:    retq # sched: [7:1.00]
+;
+; KNL-LABEL: test_pext_i32:
+; KNL:       # BB#0:
+; KNL-NEXT:    pextl (%rdx), %edi, %ecx # sched: [3:1.00]
+; KNL-NEXT:    pextl %esi, %edi, %eax # sched: [3:1.00]
+; KNL-NEXT:    addl %ecx, %eax # sched: [1:0.25]
+; KNL-NEXT:    retq # sched: [2:1.00]
 ;
 ; ZNVER1-LABEL: test_pext_i32:
 ; ZNVER1:       # BB#0:
@@ -201,12 +289,26 @@
 ; GENERIC-NEXT:    addq %rcx, %rax # sched: [1:0.33]
 ; GENERIC-NEXT:    retq # sched: [1:1.00]
 ;
-; COMMON-LABEL: test_pext_i64:
-; COMMON:       # BB#0:
-; COMMON-NEXT:    pextq (%rdx), %rdi, %rcx # sched: [3:1.00]
-; COMMON-NEXT:    pextq %rsi, %rdi, %rax # sched: [3:1.00]
-; COMMON-NEXT:    addq %rcx, %rax # sched: [1:0.25]
-; COMMON-NEXT:    retq # sched: [2:1.00]
+; HASWELL-LABEL: test_pext_i64:
+; HASWELL:       # BB#0:
+; HASWELL-NEXT:    pextq (%rdx), %rdi, %rcx # sched: [3:1.00]
+; HASWELL-NEXT:    pextq %rsi, %rdi, %rax # sched: [3:1.00]
+; HASWELL-NEXT:    addq %rcx, %rax # sched: [1:0.25]
+; HASWELL-NEXT:    retq # sched: [2:1.00]
+;
+; SKYLAKE-LABEL: test_pext_i64:
+; SKYLAKE:       # BB#0:
+; SKYLAKE-NEXT:    pextq (%rdx), %rdi, %rcx # sched: [8:1.00]
+; SKYLAKE-NEXT:    pextq %rsi, %rdi, %rax # sched: [3:1.00]
+; SKYLAKE-NEXT:    addq %rcx, %rax # sched: [1:0.25]
+; SKYLAKE-NEXT:    retq # sched: [7:1.00]
+;
+; KNL-LABEL: test_pext_i64:
+; KNL:       # BB#0:
+; KNL-NEXT:    pextq (%rdx), %rdi, %rcx # sched: [3:1.00]
+; KNL-NEXT:    pextq %rsi, %rdi, %rax # sched: [3:1.00]
+; KNL-NEXT:    addq %rcx, %rax # sched: [1:0.25]
+; KNL-NEXT:    retq # sched: [2:1.00]
 ;
 ; ZNVER1-LABEL: test_pext_i64:
 ; ZNVER1:       # BB#0:
@@ -239,10 +341,10 @@
 ;
 ; SKYLAKE-LABEL: test_rorx_i32:
 ; SKYLAKE:       # BB#0:
-; SKYLAKE-NEXT:    rorxl $5, %edi, %ecx # sched: [1:1.00]
-; SKYLAKE-NEXT:    rorxl $5, (%rdx), %eax # sched: [1:0.50]
+; SKYLAKE-NEXT:    rorxl $5, %edi, %ecx # sched: [1:0.50]
+; SKYLAKE-NEXT:    rorxl $5, (%rdx), %eax # sched: [6:0.50]
 ; SKYLAKE-NEXT:    addl %ecx, %eax # sched: [1:0.25]
-; SKYLAKE-NEXT:    retq # sched: [2:1.00]
+; SKYLAKE-NEXT:    retq # sched: [7:1.00]
 ;
 ; KNL-LABEL: test_rorx_i32:
 ; KNL:       # BB#0:
@@ -285,10 +387,10 @@
 ;
 ; SKYLAKE-LABEL: test_rorx_i64:
 ; SKYLAKE:       # BB#0:
-; SKYLAKE-NEXT:    rorxq $5, %rdi, %rcx # sched: [1:1.00]
-; SKYLAKE-NEXT:    rorxq $5, (%rdx), %rax # sched: [1:0.50]
+; SKYLAKE-NEXT:    rorxq $5, %rdi, %rcx # sched: [1:0.50]
+; SKYLAKE-NEXT:    rorxq $5, (%rdx), %rax # sched: [6:0.50]
 ; SKYLAKE-NEXT:    addq %rcx, %rax # sched: [1:0.25]
-; SKYLAKE-NEXT:    retq # sched: [2:1.00]
+; SKYLAKE-NEXT:    retq # sched: [7:1.00]
 ;
 ; KNL-LABEL: test_rorx_i64:
 ; KNL:       # BB#0:
@@ -331,10 +433,10 @@
 ;
 ; SKYLAKE-LABEL: test_sarx_i32:
 ; SKYLAKE:       # BB#0:
-; SKYLAKE-NEXT:    sarxl %esi, %edi, %ecx # sched: [1:1.00]
-; SKYLAKE-NEXT:    sarxl %esi, (%rdx), %eax # sched: [1:0.50]
+; SKYLAKE-NEXT:    sarxl %esi, %edi, %ecx # sched: [1:0.50]
+; SKYLAKE-NEXT:    sarxl %esi, (%rdx), %eax # sched: [6:0.50]
 ; SKYLAKE-NEXT:    addl %ecx, %eax # sched: [1:0.25]
-; SKYLAKE-NEXT:    retq # sched: [2:1.00]
+; SKYLAKE-NEXT:    retq # sched: [7:1.00]
 ;
 ; KNL-LABEL: test_sarx_i32:
 ; KNL:       # BB#0:
@@ -373,10 +475,10 @@
 ;
 ; SKYLAKE-LABEL: test_sarx_i64:
 ; SKYLAKE:       # BB#0:
-; SKYLAKE-NEXT:    sarxq %rsi, %rdi, %rcx # sched: [1:1.00]
-; SKYLAKE-NEXT:    sarxq %rsi, (%rdx), %rax # sched: [1:0.50]
+; SKYLAKE-NEXT:    sarxq %rsi, %rdi, %rcx # sched: [1:0.50]
+; SKYLAKE-NEXT:    sarxq %rsi, (%rdx), %rax # sched: [6:0.50]
 ; SKYLAKE-NEXT:    addq %rcx, %rax # sched: [1:0.25]
-; SKYLAKE-NEXT:    retq # sched: [2:1.00]
+; SKYLAKE-NEXT:    retq # sched: [7:1.00]
 ;
 ; KNL-LABEL: test_sarx_i64:
 ; KNL:       # BB#0:
@@ -415,10 +517,10 @@
 ;
 ; SKYLAKE-LABEL: test_shlx_i32:
 ; SKYLAKE:       # BB#0:
-; SKYLAKE-NEXT:    shlxl %esi, %edi, %ecx # sched: [1:1.00]
-; SKYLAKE-NEXT:    shlxl %esi, (%rdx), %eax # sched: [1:0.50]
+; SKYLAKE-NEXT:    shlxl %esi, %edi, %ecx # sched: [1:0.50]
+; SKYLAKE-NEXT:    shlxl %esi, (%rdx), %eax # sched: [6:0.50]
 ; SKYLAKE-NEXT:    addl %ecx, %eax # sched: [1:0.25]
-; SKYLAKE-NEXT:    retq # sched: [2:1.00]
+; SKYLAKE-NEXT:    retq # sched: [7:1.00]
 ;
 ; KNL-LABEL: test_shlx_i32:
 ; KNL:       # BB#0:
@@ -457,10 +559,10 @@
 ;
 ; SKYLAKE-LABEL: test_shlx_i64:
 ; SKYLAKE:       # BB#0:
-; SKYLAKE-NEXT:    shlxq %rsi, %rdi, %rcx # sched: [1:1.00]
-; SKYLAKE-NEXT:    shlxq %rsi, (%rdx), %rax # sched: [1:0.50]
+; SKYLAKE-NEXT:    shlxq %rsi, %rdi, %rcx # sched: [1:0.50]
+; SKYLAKE-NEXT:    shlxq %rsi, (%rdx), %rax # sched: [6:0.50]
 ; SKYLAKE-NEXT:    addq %rcx, %rax # sched: [1:0.25]
-; SKYLAKE-NEXT:    retq # sched: [2:1.00]
+; SKYLAKE-NEXT:    retq # sched: [7:1.00]
 ;
 ; KNL-LABEL: test_shlx_i64:
 ; KNL:       # BB#0:
@@ -499,10 +601,10 @@
 ;
 ; SKYLAKE-LABEL: test_shrx_i32:
 ; SKYLAKE:       # BB#0:
-; SKYLAKE-NEXT:    shrxl %esi, %edi, %ecx # sched: [1:1.00]
-; SKYLAKE-NEXT:    shrxl %esi, (%rdx), %eax # sched: [1:0.50]
+; SKYLAKE-NEXT:    shrxl %esi, %edi, %ecx # sched: [1:0.50]
+; SKYLAKE-NEXT:    shrxl %esi, (%rdx), %eax # sched: [6:0.50]
 ; SKYLAKE-NEXT:    addl %ecx, %eax # sched: [1:0.25]
-; SKYLAKE-NEXT:    retq # sched: [2:1.00]
+; SKYLAKE-NEXT:    retq # sched: [7:1.00]
 ;
 ; KNL-LABEL: test_shrx_i32:
 ; KNL:       # BB#0:
@@ -541,10 +643,10 @@
 ;
 ; SKYLAKE-LABEL: test_shrx_i64:
 ; SKYLAKE:       # BB#0:
-; SKYLAKE-NEXT:    shrxq %rsi, %rdi, %rcx # sched: [1:1.00]
-; SKYLAKE-NEXT:    shrxq %rsi, (%rdx), %rax # sched: [1:0.50]
+; SKYLAKE-NEXT:    shrxq %rsi, %rdi, %rcx # sched: [1:0.50]
+; SKYLAKE-NEXT:    shrxq %rsi, (%rdx), %rax # sched: [6:0.50]
 ; SKYLAKE-NEXT:    addq %rcx, %rax # sched: [1:0.25]
-; SKYLAKE-NEXT:    retq # sched: [2:1.00]
+; SKYLAKE-NEXT:    retq # sched: [7:1.00]
 ;
 ; KNL-LABEL: test_shrx_i64:
 ; KNL:       # BB#0: