[llvm] 124b1f8 - [X86] Fix HSW/BDW shift/rotate by CL schedules

Simon Pilgrim via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 27 03:21:29 PST 2024


Author: Simon Pilgrim
Date: 2024-11-27T11:21:07Z
New Revision: 124b1f8d85af71e512e6dc6250c8bfa370a33d48

URL: https://github.com/llvm/llvm-project/commit/124b1f8d85af71e512e6dc6250c8bfa370a33d48
DIFF: https://github.com/llvm/llvm-project/commit/124b1f8d85af71e512e6dc6250c8bfa370a33d48.diff

LOG: [X86] Fix HSW/BDW shift/rotate by CL schedules

This is just Port06 not Port0156 - fixes reported thoughputs

Confirmed by augner/uops.info

Added: 
    

Modified: 
    llvm/lib/Target/X86/X86SchedBroadwell.td
    llvm/lib/Target/X86/X86SchedHaswell.td
    llvm/test/tools/llvm-mca/X86/Broadwell/resources-x86_64.s
    llvm/test/tools/llvm-mca/X86/Haswell/resources-x86_64.s

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Target/X86/X86SchedBroadwell.td b/llvm/lib/Target/X86/X86SchedBroadwell.td
index 8cac444578d041..595dfbf051b86a 100644
--- a/llvm/lib/Target/X86/X86SchedBroadwell.td
+++ b/llvm/lib/Target/X86/X86SchedBroadwell.td
@@ -162,9 +162,9 @@ defm : X86WriteRes<WriteXCHG,      [BWPort0156], 2, [3], 3>;
 
 // Integer shifts and rotates.
 defm : BWWriteResPair<WriteShift,    [BWPort06],  1>;
-defm : BWWriteResPair<WriteShiftCL,  [BWPort06,BWPort0156],  3, [2,1], 3>;
+defm : BWWriteResPair<WriteShiftCL,  [BWPort06],  3, [3], 3>;
 defm : BWWriteResPair<WriteRotate,   [BWPort06],  1, [1], 1>;
-defm : BWWriteResPair<WriteRotateCL, [BWPort06,BWPort0156],  3, [2,1], 3>;
+defm : BWWriteResPair<WriteRotateCL, [BWPort06],  3, [3], 3>;
 
 // SHLD/SHRD.
 defm : X86WriteRes<WriteSHDrri, [BWPort1], 3, [1], 1>;

diff  --git a/llvm/lib/Target/X86/X86SchedHaswell.td b/llvm/lib/Target/X86/X86SchedHaswell.td
index 5e8a110ac3e5b3..e4faa836762fd0 100644
--- a/llvm/lib/Target/X86/X86SchedHaswell.td
+++ b/llvm/lib/Target/X86/X86SchedHaswell.td
@@ -164,9 +164,9 @@ defm : X86WriteRes<WriteXCHG, [HWPort0156], 2, [3], 3>;
 
 // Integer shifts and rotates.
 defm : HWWriteResPair<WriteShift,    [HWPort06],  1>;
-defm : HWWriteResPair<WriteShiftCL,  [HWPort06, HWPort0156],  3, [2,1], 3>;
+defm : HWWriteResPair<WriteShiftCL,  [HWPort06],  3, [3], 3>;
 defm : HWWriteResPair<WriteRotate,   [HWPort06],  1, [1], 1>;
-defm : HWWriteResPair<WriteRotateCL, [HWPort06, HWPort0156],  3, [2,1], 3>;
+defm : HWWriteResPair<WriteRotateCL, [HWPort06],  3, [3], 3>;
 
 // SHLD/SHRD.
 defm : X86WriteRes<WriteSHDrri, [HWPort1], 3, [1], 1>;

diff  --git a/llvm/test/tools/llvm-mca/X86/Broadwell/resources-x86_64.s b/llvm/test/tools/llvm-mca/X86/Broadwell/resources-x86_64.s
index 2a8722665d588c..bd9cf510e002f4 100644
--- a/llvm/test/tools/llvm-mca/X86/Broadwell/resources-x86_64.s
+++ b/llvm/test/tools/llvm-mca/X86/Broadwell/resources-x86_64.s
@@ -1573,8 +1573,8 @@ xorq (%rax), %rdi
 # CHECK-NEXT:  1      1     0.50                        rorb	$7, %dil
 # CHECK-NEXT:  5      7     1.00    *      *            rolb	$7, (%rax)
 # CHECK-NEXT:  5      7     1.00    *      *            rorb	$7, (%rax)
-# CHECK-NEXT:  3      3     1.00                        rolb	%cl, %dil
-# CHECK-NEXT:  3      3     1.00                        rorb	%cl, %dil
+# CHECK-NEXT:  3      3     1.50                        rolb	%cl, %dil
+# CHECK-NEXT:  3      3     1.50                        rorb	%cl, %dil
 # CHECK-NEXT:  6      8     1.00    *      *            rolb	%cl, (%rax)
 # CHECK-NEXT:  6      8     1.00    *      *            rorb	%cl, (%rax)
 # CHECK-NEXT:  2      2     1.00                        rolw	%di
@@ -1585,8 +1585,8 @@ xorq (%rax), %rdi
 # CHECK-NEXT:  1      1     0.50                        rorw	$7, %di
 # CHECK-NEXT:  5      7     1.00    *      *            rolw	$7, (%rax)
 # CHECK-NEXT:  5      7     1.00    *      *            rorw	$7, (%rax)
-# CHECK-NEXT:  3      3     1.00                        rolw	%cl, %di
-# CHECK-NEXT:  3      3     1.00                        rorw	%cl, %di
+# CHECK-NEXT:  3      3     1.50                        rolw	%cl, %di
+# CHECK-NEXT:  3      3     1.50                        rorw	%cl, %di
 # CHECK-NEXT:  6      8     1.00    *      *            rolw	%cl, (%rax)
 # CHECK-NEXT:  6      8     1.00    *      *            rorw	%cl, (%rax)
 # CHECK-NEXT:  2      2     1.00                        roll	%edi
@@ -1597,8 +1597,8 @@ xorq (%rax), %rdi
 # CHECK-NEXT:  1      1     0.50                        rorl	$7, %edi
 # CHECK-NEXT:  5      7     1.00    *      *            roll	$7, (%rax)
 # CHECK-NEXT:  5      7     1.00    *      *            rorl	$7, (%rax)
-# CHECK-NEXT:  3      3     1.00                        roll	%cl, %edi
-# CHECK-NEXT:  3      3     1.00                        rorl	%cl, %edi
+# CHECK-NEXT:  3      3     1.50                        roll	%cl, %edi
+# CHECK-NEXT:  3      3     1.50                        rorl	%cl, %edi
 # CHECK-NEXT:  6      8     1.00    *      *            roll	%cl, (%rax)
 # CHECK-NEXT:  6      8     1.00    *      *            rorl	%cl, (%rax)
 # CHECK-NEXT:  2      2     1.00                        rolq	%rdi
@@ -1609,8 +1609,8 @@ xorq (%rax), %rdi
 # CHECK-NEXT:  1      1     0.50                        rorq	$7, %rdi
 # CHECK-NEXT:  5      7     1.00    *      *            rolq	$7, (%rax)
 # CHECK-NEXT:  5      7     1.00    *      *            rorq	$7, (%rax)
-# CHECK-NEXT:  3      3     1.00                        rolq	%cl, %rdi
-# CHECK-NEXT:  3      3     1.00                        rorq	%cl, %rdi
+# CHECK-NEXT:  3      3     1.50                        rolq	%cl, %rdi
+# CHECK-NEXT:  3      3     1.50                        rorq	%cl, %rdi
 # CHECK-NEXT:  6      8     1.00    *      *            rolq	%cl, (%rax)
 # CHECK-NEXT:  6      8     1.00    *      *            rorq	%cl, (%rax)
 # CHECK-NEXT:  1      1     0.50                        sahf
@@ -1626,9 +1626,9 @@ xorq (%rax), %rdi
 # CHECK-NEXT:  4      6     1.00    *      *            sarb	$7, (%rax)
 # CHECK-NEXT:  4      6     1.00    *      *            shlb	$7, (%rax)
 # CHECK-NEXT:  4      6     1.00    *      *            shrb	$7, (%rax)
-# CHECK-NEXT:  3      3     1.00                        sarb	%cl, %dil
-# CHECK-NEXT:  3      3     1.00                        shlb	%cl, %dil
-# CHECK-NEXT:  3      3     1.00                        shrb	%cl, %dil
+# CHECK-NEXT:  3      3     1.50                        sarb	%cl, %dil
+# CHECK-NEXT:  3      3     1.50                        shlb	%cl, %dil
+# CHECK-NEXT:  3      3     1.50                        shrb	%cl, %dil
 # CHECK-NEXT:  6      8     1.00    *      *            sarb	%cl, (%rax)
 # CHECK-NEXT:  6      8     1.00    *      *            shlb	%cl, (%rax)
 # CHECK-NEXT:  6      8     1.00    *      *            shrb	%cl, (%rax)
@@ -1644,9 +1644,9 @@ xorq (%rax), %rdi
 # CHECK-NEXT:  4      6     1.00    *      *            sarw	$7, (%rax)
 # CHECK-NEXT:  4      6     1.00    *      *            shlw	$7, (%rax)
 # CHECK-NEXT:  4      6     1.00    *      *            shrw	$7, (%rax)
-# CHECK-NEXT:  3      3     1.00                        sarw	%cl, %di
-# CHECK-NEXT:  3      3     1.00                        shlw	%cl, %di
-# CHECK-NEXT:  3      3     1.00                        shrw	%cl, %di
+# CHECK-NEXT:  3      3     1.50                        sarw	%cl, %di
+# CHECK-NEXT:  3      3     1.50                        shlw	%cl, %di
+# CHECK-NEXT:  3      3     1.50                        shrw	%cl, %di
 # CHECK-NEXT:  6      8     1.00    *      *            sarw	%cl, (%rax)
 # CHECK-NEXT:  6      8     1.00    *      *            shlw	%cl, (%rax)
 # CHECK-NEXT:  6      8     1.00    *      *            shrw	%cl, (%rax)
@@ -1662,9 +1662,9 @@ xorq (%rax), %rdi
 # CHECK-NEXT:  4      6     1.00    *      *            sarl	$7, (%rax)
 # CHECK-NEXT:  4      6     1.00    *      *            shll	$7, (%rax)
 # CHECK-NEXT:  4      6     1.00    *      *            shrl	$7, (%rax)
-# CHECK-NEXT:  3      3     1.00                        sarl	%cl, %edi
-# CHECK-NEXT:  3      3     1.00                        shll	%cl, %edi
-# CHECK-NEXT:  3      3     1.00                        shrl	%cl, %edi
+# CHECK-NEXT:  3      3     1.50                        sarl	%cl, %edi
+# CHECK-NEXT:  3      3     1.50                        shll	%cl, %edi
+# CHECK-NEXT:  3      3     1.50                        shrl	%cl, %edi
 # CHECK-NEXT:  6      8     1.00    *      *            sarl	%cl, (%rax)
 # CHECK-NEXT:  6      8     1.00    *      *            shll	%cl, (%rax)
 # CHECK-NEXT:  6      8     1.00    *      *            shrl	%cl, (%rax)
@@ -1680,9 +1680,9 @@ xorq (%rax), %rdi
 # CHECK-NEXT:  4      6     1.00    *      *            sarq	$7, (%rax)
 # CHECK-NEXT:  4      6     1.00    *      *            shlq	$7, (%rax)
 # CHECK-NEXT:  4      6     1.00    *      *            shrq	$7, (%rax)
-# CHECK-NEXT:  3      3     1.00                        sarq	%cl, %rdi
-# CHECK-NEXT:  3      3     1.00                        shlq	%cl, %rdi
-# CHECK-NEXT:  3      3     1.00                        shrq	%cl, %rdi
+# CHECK-NEXT:  3      3     1.50                        sarq	%cl, %rdi
+# CHECK-NEXT:  3      3     1.50                        shlq	%cl, %rdi
+# CHECK-NEXT:  3      3     1.50                        shrq	%cl, %rdi
 # CHECK-NEXT:  6      8     1.00    *      *            sarq	%cl, (%rax)
 # CHECK-NEXT:  6      8     1.00    *      *            shlq	%cl, (%rax)
 # CHECK-NEXT:  6      8     1.00    *      *            shrq	%cl, (%rax)
@@ -1962,7 +1962,7 @@ xorq (%rax), %rdi
 
 # CHECK:      Resource pressure per iteration:
 # CHECK-NEXT: [0]    [1]    [2]    [3]    [4]    [5]    [6]    [7]    [8]    [9]
-# CHECK-NEXT: 50.00   -     610.50 401.50 378.50 378.50 345.00 298.00 646.00 129.00
+# CHECK-NEXT: 50.00   -     615.50 396.50 378.50 378.50 345.00 293.00 651.00 129.00
 
 # CHECK:      Resource pressure by instruction:
 # CHECK-NEXT: [0]    [1]    [2]    [3]    [4]    [5]    [6]    [7]    [8]    [9]    Instructions:
@@ -2505,8 +2505,8 @@ xorq (%rax), %rdi
 # CHECK-NEXT:  -      -     0.50    -      -      -      -      -     0.50    -     rorb	$7, %dil
 # CHECK-NEXT:  -      -     1.00    -     0.83   0.83   1.00    -     1.00   0.33   rolb	$7, (%rax)
 # CHECK-NEXT:  -      -     1.00    -     0.83   0.83   1.00    -     1.00   0.33   rorb	$7, (%rax)
-# CHECK-NEXT:  -      -     1.25   0.25    -      -      -     0.25   1.25    -     rolb	%cl, %dil
-# CHECK-NEXT:  -      -     1.25   0.25    -      -      -     0.25   1.25    -     rorb	%cl, %dil
+# CHECK-NEXT:  -      -     1.50    -      -      -      -      -     1.50    -     rolb	%cl, %dil
+# CHECK-NEXT:  -      -     1.50    -      -      -      -      -     1.50    -     rorb	%cl, %dil
 # CHECK-NEXT:  -      -     1.25   0.25   0.83   0.83   1.00   0.25   1.25   0.33   rolb	%cl, (%rax)
 # CHECK-NEXT:  -      -     1.25   0.25   0.83   0.83   1.00   0.25   1.25   0.33   rorb	%cl, (%rax)
 # CHECK-NEXT:  -      -     1.00    -      -      -      -      -     1.00    -     rolw	%di
@@ -2517,8 +2517,8 @@ xorq (%rax), %rdi
 # CHECK-NEXT:  -      -     0.50    -      -      -      -      -     0.50    -     rorw	$7, %di
 # CHECK-NEXT:  -      -     1.00    -     0.83   0.83   1.00    -     1.00   0.33   rolw	$7, (%rax)
 # CHECK-NEXT:  -      -     1.00    -     0.83   0.83   1.00    -     1.00   0.33   rorw	$7, (%rax)
-# CHECK-NEXT:  -      -     1.25   0.25    -      -      -     0.25   1.25    -     rolw	%cl, %di
-# CHECK-NEXT:  -      -     1.25   0.25    -      -      -     0.25   1.25    -     rorw	%cl, %di
+# CHECK-NEXT:  -      -     1.50    -      -      -      -      -     1.50    -     rolw	%cl, %di
+# CHECK-NEXT:  -      -     1.50    -      -      -      -      -     1.50    -     rorw	%cl, %di
 # CHECK-NEXT:  -      -     1.25   0.25   0.83   0.83   1.00   0.25   1.25   0.33   rolw	%cl, (%rax)
 # CHECK-NEXT:  -      -     1.25   0.25   0.83   0.83   1.00   0.25   1.25   0.33   rorw	%cl, (%rax)
 # CHECK-NEXT:  -      -     1.00    -      -      -      -      -     1.00    -     roll	%edi
@@ -2529,8 +2529,8 @@ xorq (%rax), %rdi
 # CHECK-NEXT:  -      -     0.50    -      -      -      -      -     0.50    -     rorl	$7, %edi
 # CHECK-NEXT:  -      -     1.00    -     0.83   0.83   1.00    -     1.00   0.33   roll	$7, (%rax)
 # CHECK-NEXT:  -      -     1.00    -     0.83   0.83   1.00    -     1.00   0.33   rorl	$7, (%rax)
-# CHECK-NEXT:  -      -     1.25   0.25    -      -      -     0.25   1.25    -     roll	%cl, %edi
-# CHECK-NEXT:  -      -     1.25   0.25    -      -      -     0.25   1.25    -     rorl	%cl, %edi
+# CHECK-NEXT:  -      -     1.50    -      -      -      -      -     1.50    -     roll	%cl, %edi
+# CHECK-NEXT:  -      -     1.50    -      -      -      -      -     1.50    -     rorl	%cl, %edi
 # CHECK-NEXT:  -      -     1.25   0.25   0.83   0.83   1.00   0.25   1.25   0.33   roll	%cl, (%rax)
 # CHECK-NEXT:  -      -     1.25   0.25   0.83   0.83   1.00   0.25   1.25   0.33   rorl	%cl, (%rax)
 # CHECK-NEXT:  -      -     1.00    -      -      -      -      -     1.00    -     rolq	%rdi
@@ -2541,8 +2541,8 @@ xorq (%rax), %rdi
 # CHECK-NEXT:  -      -     0.50    -      -      -      -      -     0.50    -     rorq	$7, %rdi
 # CHECK-NEXT:  -      -     1.00    -     0.83   0.83   1.00    -     1.00   0.33   rolq	$7, (%rax)
 # CHECK-NEXT:  -      -     1.00    -     0.83   0.83   1.00    -     1.00   0.33   rorq	$7, (%rax)
-# CHECK-NEXT:  -      -     1.25   0.25    -      -      -     0.25   1.25    -     rolq	%cl, %rdi
-# CHECK-NEXT:  -      -     1.25   0.25    -      -      -     0.25   1.25    -     rorq	%cl, %rdi
+# CHECK-NEXT:  -      -     1.50    -      -      -      -      -     1.50    -     rolq	%cl, %rdi
+# CHECK-NEXT:  -      -     1.50    -      -      -      -      -     1.50    -     rorq	%cl, %rdi
 # CHECK-NEXT:  -      -     1.25   0.25   0.83   0.83   1.00   0.25   1.25   0.33   rolq	%cl, (%rax)
 # CHECK-NEXT:  -      -     1.25   0.25   0.83   0.83   1.00   0.25   1.25   0.33   rorq	%cl, (%rax)
 # CHECK-NEXT:  -      -     0.50    -      -      -      -      -     0.50    -     sahf
@@ -2558,9 +2558,9 @@ xorq (%rax), %rdi
 # CHECK-NEXT:  -      -     0.50    -     0.83   0.83   1.00    -     0.50   0.33   sarb	$7, (%rax)
 # CHECK-NEXT:  -      -     0.50    -     0.83   0.83   1.00    -     0.50   0.33   shlb	$7, (%rax)
 # CHECK-NEXT:  -      -     0.50    -     0.83   0.83   1.00    -     0.50   0.33   shrb	$7, (%rax)
-# CHECK-NEXT:  -      -     1.25   0.25    -      -      -     0.25   1.25    -     sarb	%cl, %dil
-# CHECK-NEXT:  -      -     1.25   0.25    -      -      -     0.25   1.25    -     shlb	%cl, %dil
-# CHECK-NEXT:  -      -     1.25   0.25    -      -      -     0.25   1.25    -     shrb	%cl, %dil
+# CHECK-NEXT:  -      -     1.50    -      -      -      -      -     1.50    -     sarb	%cl, %dil
+# CHECK-NEXT:  -      -     1.50    -      -      -      -      -     1.50    -     shlb	%cl, %dil
+# CHECK-NEXT:  -      -     1.50    -      -      -      -      -     1.50    -     shrb	%cl, %dil
 # CHECK-NEXT:  -      -     1.25   0.25   0.83   0.83   1.00   0.25   1.25   0.33   sarb	%cl, (%rax)
 # CHECK-NEXT:  -      -     1.25   0.25   0.83   0.83   1.00   0.25   1.25   0.33   shlb	%cl, (%rax)
 # CHECK-NEXT:  -      -     1.25   0.25   0.83   0.83   1.00   0.25   1.25   0.33   shrb	%cl, (%rax)
@@ -2576,9 +2576,9 @@ xorq (%rax), %rdi
 # CHECK-NEXT:  -      -     0.50    -     0.83   0.83   1.00    -     0.50   0.33   sarw	$7, (%rax)
 # CHECK-NEXT:  -      -     0.50    -     0.83   0.83   1.00    -     0.50   0.33   shlw	$7, (%rax)
 # CHECK-NEXT:  -      -     0.50    -     0.83   0.83   1.00    -     0.50   0.33   shrw	$7, (%rax)
-# CHECK-NEXT:  -      -     1.25   0.25    -      -      -     0.25   1.25    -     sarw	%cl, %di
-# CHECK-NEXT:  -      -     1.25   0.25    -      -      -     0.25   1.25    -     shlw	%cl, %di
-# CHECK-NEXT:  -      -     1.25   0.25    -      -      -     0.25   1.25    -     shrw	%cl, %di
+# CHECK-NEXT:  -      -     1.50    -      -      -      -      -     1.50    -     sarw	%cl, %di
+# CHECK-NEXT:  -      -     1.50    -      -      -      -      -     1.50    -     shlw	%cl, %di
+# CHECK-NEXT:  -      -     1.50    -      -      -      -      -     1.50    -     shrw	%cl, %di
 # CHECK-NEXT:  -      -     1.25   0.25   0.83   0.83   1.00   0.25   1.25   0.33   sarw	%cl, (%rax)
 # CHECK-NEXT:  -      -     1.25   0.25   0.83   0.83   1.00   0.25   1.25   0.33   shlw	%cl, (%rax)
 # CHECK-NEXT:  -      -     1.25   0.25   0.83   0.83   1.00   0.25   1.25   0.33   shrw	%cl, (%rax)
@@ -2594,9 +2594,9 @@ xorq (%rax), %rdi
 # CHECK-NEXT:  -      -     0.50    -     0.83   0.83   1.00    -     0.50   0.33   sarl	$7, (%rax)
 # CHECK-NEXT:  -      -     0.50    -     0.83   0.83   1.00    -     0.50   0.33   shll	$7, (%rax)
 # CHECK-NEXT:  -      -     0.50    -     0.83   0.83   1.00    -     0.50   0.33   shrl	$7, (%rax)
-# CHECK-NEXT:  -      -     1.25   0.25    -      -      -     0.25   1.25    -     sarl	%cl, %edi
-# CHECK-NEXT:  -      -     1.25   0.25    -      -      -     0.25   1.25    -     shll	%cl, %edi
-# CHECK-NEXT:  -      -     1.25   0.25    -      -      -     0.25   1.25    -     shrl	%cl, %edi
+# CHECK-NEXT:  -      -     1.50    -      -      -      -      -     1.50    -     sarl	%cl, %edi
+# CHECK-NEXT:  -      -     1.50    -      -      -      -      -     1.50    -     shll	%cl, %edi
+# CHECK-NEXT:  -      -     1.50    -      -      -      -      -     1.50    -     shrl	%cl, %edi
 # CHECK-NEXT:  -      -     1.25   0.25   0.83   0.83   1.00   0.25   1.25   0.33   sarl	%cl, (%rax)
 # CHECK-NEXT:  -      -     1.25   0.25   0.83   0.83   1.00   0.25   1.25   0.33   shll	%cl, (%rax)
 # CHECK-NEXT:  -      -     1.25   0.25   0.83   0.83   1.00   0.25   1.25   0.33   shrl	%cl, (%rax)
@@ -2612,9 +2612,9 @@ xorq (%rax), %rdi
 # CHECK-NEXT:  -      -     0.50    -     0.83   0.83   1.00    -     0.50   0.33   sarq	$7, (%rax)
 # CHECK-NEXT:  -      -     0.50    -     0.83   0.83   1.00    -     0.50   0.33   shlq	$7, (%rax)
 # CHECK-NEXT:  -      -     0.50    -     0.83   0.83   1.00    -     0.50   0.33   shrq	$7, (%rax)
-# CHECK-NEXT:  -      -     1.25   0.25    -      -      -     0.25   1.25    -     sarq	%cl, %rdi
-# CHECK-NEXT:  -      -     1.25   0.25    -      -      -     0.25   1.25    -     shlq	%cl, %rdi
-# CHECK-NEXT:  -      -     1.25   0.25    -      -      -     0.25   1.25    -     shrq	%cl, %rdi
+# CHECK-NEXT:  -      -     1.50    -      -      -      -      -     1.50    -     sarq	%cl, %rdi
+# CHECK-NEXT:  -      -     1.50    -      -      -      -      -     1.50    -     shlq	%cl, %rdi
+# CHECK-NEXT:  -      -     1.50    -      -      -      -      -     1.50    -     shrq	%cl, %rdi
 # CHECK-NEXT:  -      -     1.25   0.25   0.83   0.83   1.00   0.25   1.25   0.33   sarq	%cl, (%rax)
 # CHECK-NEXT:  -      -     1.25   0.25   0.83   0.83   1.00   0.25   1.25   0.33   shlq	%cl, (%rax)
 # CHECK-NEXT:  -      -     1.25   0.25   0.83   0.83   1.00   0.25   1.25   0.33   shrq	%cl, (%rax)

diff  --git a/llvm/test/tools/llvm-mca/X86/Haswell/resources-x86_64.s b/llvm/test/tools/llvm-mca/X86/Haswell/resources-x86_64.s
index 5607ae2b6ebd9c..c85ad704a0aa20 100644
--- a/llvm/test/tools/llvm-mca/X86/Haswell/resources-x86_64.s
+++ b/llvm/test/tools/llvm-mca/X86/Haswell/resources-x86_64.s
@@ -1573,8 +1573,8 @@ xorq (%rax), %rdi
 # CHECK-NEXT:  1      1     0.50                        rorb	$7, %dil
 # CHECK-NEXT:  5      8     1.00    *      *            rolb	$7, (%rax)
 # CHECK-NEXT:  5      8     1.00    *      *            rorb	$7, (%rax)
-# CHECK-NEXT:  3      3     1.00                        rolb	%cl, %dil
-# CHECK-NEXT:  3      3     1.00                        rorb	%cl, %dil
+# CHECK-NEXT:  3      3     1.50                        rolb	%cl, %dil
+# CHECK-NEXT:  3      3     1.50                        rorb	%cl, %dil
 # CHECK-NEXT:  6      9     1.00    *      *            rolb	%cl, (%rax)
 # CHECK-NEXT:  6      9     1.00    *      *            rorb	%cl, (%rax)
 # CHECK-NEXT:  2      2     1.00                        rolw	%di
@@ -1585,8 +1585,8 @@ xorq (%rax), %rdi
 # CHECK-NEXT:  1      1     0.50                        rorw	$7, %di
 # CHECK-NEXT:  5      8     1.00    *      *            rolw	$7, (%rax)
 # CHECK-NEXT:  5      8     1.00    *      *            rorw	$7, (%rax)
-# CHECK-NEXT:  3      3     1.00                        rolw	%cl, %di
-# CHECK-NEXT:  3      3     1.00                        rorw	%cl, %di
+# CHECK-NEXT:  3      3     1.50                        rolw	%cl, %di
+# CHECK-NEXT:  3      3     1.50                        rorw	%cl, %di
 # CHECK-NEXT:  6      9     1.00    *      *            rolw	%cl, (%rax)
 # CHECK-NEXT:  6      9     1.00    *      *            rorw	%cl, (%rax)
 # CHECK-NEXT:  2      2     1.00                        roll	%edi
@@ -1597,8 +1597,8 @@ xorq (%rax), %rdi
 # CHECK-NEXT:  1      1     0.50                        rorl	$7, %edi
 # CHECK-NEXT:  5      8     1.00    *      *            roll	$7, (%rax)
 # CHECK-NEXT:  5      8     1.00    *      *            rorl	$7, (%rax)
-# CHECK-NEXT:  3      3     1.00                        roll	%cl, %edi
-# CHECK-NEXT:  3      3     1.00                        rorl	%cl, %edi
+# CHECK-NEXT:  3      3     1.50                        roll	%cl, %edi
+# CHECK-NEXT:  3      3     1.50                        rorl	%cl, %edi
 # CHECK-NEXT:  6      9     1.00    *      *            roll	%cl, (%rax)
 # CHECK-NEXT:  6      9     1.00    *      *            rorl	%cl, (%rax)
 # CHECK-NEXT:  2      2     1.00                        rolq	%rdi
@@ -1609,8 +1609,8 @@ xorq (%rax), %rdi
 # CHECK-NEXT:  1      1     0.50                        rorq	$7, %rdi
 # CHECK-NEXT:  5      8     1.00    *      *            rolq	$7, (%rax)
 # CHECK-NEXT:  5      8     1.00    *      *            rorq	$7, (%rax)
-# CHECK-NEXT:  3      3     1.00                        rolq	%cl, %rdi
-# CHECK-NEXT:  3      3     1.00                        rorq	%cl, %rdi
+# CHECK-NEXT:  3      3     1.50                        rolq	%cl, %rdi
+# CHECK-NEXT:  3      3     1.50                        rorq	%cl, %rdi
 # CHECK-NEXT:  6      9     1.00    *      *            rolq	%cl, (%rax)
 # CHECK-NEXT:  6      9     1.00    *      *            rorq	%cl, (%rax)
 # CHECK-NEXT:  1      1     0.50                        sahf
@@ -1626,9 +1626,9 @@ xorq (%rax), %rdi
 # CHECK-NEXT:  4      7     1.00    *      *            sarb	$7, (%rax)
 # CHECK-NEXT:  4      7     1.00    *      *            shlb	$7, (%rax)
 # CHECK-NEXT:  4      7     1.00    *      *            shrb	$7, (%rax)
-# CHECK-NEXT:  3      3     1.00                        sarb	%cl, %dil
-# CHECK-NEXT:  3      3     1.00                        shlb	%cl, %dil
-# CHECK-NEXT:  3      3     1.00                        shrb	%cl, %dil
+# CHECK-NEXT:  3      3     1.50                        sarb	%cl, %dil
+# CHECK-NEXT:  3      3     1.50                        shlb	%cl, %dil
+# CHECK-NEXT:  3      3     1.50                        shrb	%cl, %dil
 # CHECK-NEXT:  6      9     1.00    *      *            sarb	%cl, (%rax)
 # CHECK-NEXT:  6      9     1.00    *      *            shlb	%cl, (%rax)
 # CHECK-NEXT:  6      9     1.00    *      *            shrb	%cl, (%rax)
@@ -1644,9 +1644,9 @@ xorq (%rax), %rdi
 # CHECK-NEXT:  4      7     1.00    *      *            sarw	$7, (%rax)
 # CHECK-NEXT:  4      7     1.00    *      *            shlw	$7, (%rax)
 # CHECK-NEXT:  4      7     1.00    *      *            shrw	$7, (%rax)
-# CHECK-NEXT:  3      3     1.00                        sarw	%cl, %di
-# CHECK-NEXT:  3      3     1.00                        shlw	%cl, %di
-# CHECK-NEXT:  3      3     1.00                        shrw	%cl, %di
+# CHECK-NEXT:  3      3     1.50                        sarw	%cl, %di
+# CHECK-NEXT:  3      3     1.50                        shlw	%cl, %di
+# CHECK-NEXT:  3      3     1.50                        shrw	%cl, %di
 # CHECK-NEXT:  6      9     1.00    *      *            sarw	%cl, (%rax)
 # CHECK-NEXT:  6      9     1.00    *      *            shlw	%cl, (%rax)
 # CHECK-NEXT:  6      9     1.00    *      *            shrw	%cl, (%rax)
@@ -1662,9 +1662,9 @@ xorq (%rax), %rdi
 # CHECK-NEXT:  4      7     1.00    *      *            sarl	$7, (%rax)
 # CHECK-NEXT:  4      7     1.00    *      *            shll	$7, (%rax)
 # CHECK-NEXT:  4      7     1.00    *      *            shrl	$7, (%rax)
-# CHECK-NEXT:  3      3     1.00                        sarl	%cl, %edi
-# CHECK-NEXT:  3      3     1.00                        shll	%cl, %edi
-# CHECK-NEXT:  3      3     1.00                        shrl	%cl, %edi
+# CHECK-NEXT:  3      3     1.50                        sarl	%cl, %edi
+# CHECK-NEXT:  3      3     1.50                        shll	%cl, %edi
+# CHECK-NEXT:  3      3     1.50                        shrl	%cl, %edi
 # CHECK-NEXT:  6      9     1.00    *      *            sarl	%cl, (%rax)
 # CHECK-NEXT:  6      9     1.00    *      *            shll	%cl, (%rax)
 # CHECK-NEXT:  6      9     1.00    *      *            shrl	%cl, (%rax)
@@ -1680,9 +1680,9 @@ xorq (%rax), %rdi
 # CHECK-NEXT:  4      7     1.00    *      *            sarq	$7, (%rax)
 # CHECK-NEXT:  4      7     1.00    *      *            shlq	$7, (%rax)
 # CHECK-NEXT:  4      7     1.00    *      *            shrq	$7, (%rax)
-# CHECK-NEXT:  3      3     1.00                        sarq	%cl, %rdi
-# CHECK-NEXT:  3      3     1.00                        shlq	%cl, %rdi
-# CHECK-NEXT:  3      3     1.00                        shrq	%cl, %rdi
+# CHECK-NEXT:  3      3     1.50                        sarq	%cl, %rdi
+# CHECK-NEXT:  3      3     1.50                        shlq	%cl, %rdi
+# CHECK-NEXT:  3      3     1.50                        shrq	%cl, %rdi
 # CHECK-NEXT:  6      9     1.00    *      *            sarq	%cl, (%rax)
 # CHECK-NEXT:  6      9     1.00    *      *            shlq	%cl, (%rax)
 # CHECK-NEXT:  6      9     1.00    *      *            shrq	%cl, (%rax)
@@ -1962,7 +1962,7 @@ xorq (%rax), %rdi
 
 # CHECK:      Resource pressure per iteration:
 # CHECK-NEXT: [0]    [1]    [2]    [3]    [4]    [5]    [6]    [7]    [8]    [9]
-# CHECK-NEXT: 80.00   -     663.50 424.50 371.50 371.50 331.00 323.00 728.00 123.00
+# CHECK-NEXT: 80.00   -     668.50 419.50 371.50 371.50 331.00 318.00 733.00 123.00
 
 # CHECK:      Resource pressure by instruction:
 # CHECK-NEXT: [0]    [1]    [2]    [3]    [4]    [5]    [6]    [7]    [8]    [9]    Instructions:
@@ -2505,8 +2505,8 @@ xorq (%rax), %rdi
 # CHECK-NEXT:  -      -     0.50    -      -      -      -      -     0.50    -     rorb	$7, %dil
 # CHECK-NEXT:  -      -     1.00    -     0.83   0.83   1.00    -     1.00   0.33   rolb	$7, (%rax)
 # CHECK-NEXT:  -      -     1.00    -     0.83   0.83   1.00    -     1.00   0.33   rorb	$7, (%rax)
-# CHECK-NEXT:  -      -     1.25   0.25    -      -      -     0.25   1.25    -     rolb	%cl, %dil
-# CHECK-NEXT:  -      -     1.25   0.25    -      -      -     0.25   1.25    -     rorb	%cl, %dil
+# CHECK-NEXT:  -      -     1.50    -      -      -      -      -     1.50    -     rolb	%cl, %dil
+# CHECK-NEXT:  -      -     1.50    -      -      -      -      -     1.50    -     rorb	%cl, %dil
 # CHECK-NEXT:  -      -     1.25   0.25   0.83   0.83   1.00   0.25   1.25   0.33   rolb	%cl, (%rax)
 # CHECK-NEXT:  -      -     1.25   0.25   0.83   0.83   1.00   0.25   1.25   0.33   rorb	%cl, (%rax)
 # CHECK-NEXT:  -      -     1.00    -      -      -      -      -     1.00    -     rolw	%di
@@ -2517,8 +2517,8 @@ xorq (%rax), %rdi
 # CHECK-NEXT:  -      -     0.50    -      -      -      -      -     0.50    -     rorw	$7, %di
 # CHECK-NEXT:  -      -     1.00    -     0.83   0.83   1.00    -     1.00   0.33   rolw	$7, (%rax)
 # CHECK-NEXT:  -      -     1.00    -     0.83   0.83   1.00    -     1.00   0.33   rorw	$7, (%rax)
-# CHECK-NEXT:  -      -     1.25   0.25    -      -      -     0.25   1.25    -     rolw	%cl, %di
-# CHECK-NEXT:  -      -     1.25   0.25    -      -      -     0.25   1.25    -     rorw	%cl, %di
+# CHECK-NEXT:  -      -     1.50    -      -      -      -      -     1.50    -     rolw	%cl, %di
+# CHECK-NEXT:  -      -     1.50    -      -      -      -      -     1.50    -     rorw	%cl, %di
 # CHECK-NEXT:  -      -     1.25   0.25   0.83   0.83   1.00   0.25   1.25   0.33   rolw	%cl, (%rax)
 # CHECK-NEXT:  -      -     1.25   0.25   0.83   0.83   1.00   0.25   1.25   0.33   rorw	%cl, (%rax)
 # CHECK-NEXT:  -      -     1.00    -      -      -      -      -     1.00    -     roll	%edi
@@ -2529,8 +2529,8 @@ xorq (%rax), %rdi
 # CHECK-NEXT:  -      -     0.50    -      -      -      -      -     0.50    -     rorl	$7, %edi
 # CHECK-NEXT:  -      -     1.00    -     0.83   0.83   1.00    -     1.00   0.33   roll	$7, (%rax)
 # CHECK-NEXT:  -      -     1.00    -     0.83   0.83   1.00    -     1.00   0.33   rorl	$7, (%rax)
-# CHECK-NEXT:  -      -     1.25   0.25    -      -      -     0.25   1.25    -     roll	%cl, %edi
-# CHECK-NEXT:  -      -     1.25   0.25    -      -      -     0.25   1.25    -     rorl	%cl, %edi
+# CHECK-NEXT:  -      -     1.50    -      -      -      -      -     1.50    -     roll	%cl, %edi
+# CHECK-NEXT:  -      -     1.50    -      -      -      -      -     1.50    -     rorl	%cl, %edi
 # CHECK-NEXT:  -      -     1.25   0.25   0.83   0.83   1.00   0.25   1.25   0.33   roll	%cl, (%rax)
 # CHECK-NEXT:  -      -     1.25   0.25   0.83   0.83   1.00   0.25   1.25   0.33   rorl	%cl, (%rax)
 # CHECK-NEXT:  -      -     1.00    -      -      -      -      -     1.00    -     rolq	%rdi
@@ -2541,8 +2541,8 @@ xorq (%rax), %rdi
 # CHECK-NEXT:  -      -     0.50    -      -      -      -      -     0.50    -     rorq	$7, %rdi
 # CHECK-NEXT:  -      -     1.00    -     0.83   0.83   1.00    -     1.00   0.33   rolq	$7, (%rax)
 # CHECK-NEXT:  -      -     1.00    -     0.83   0.83   1.00    -     1.00   0.33   rorq	$7, (%rax)
-# CHECK-NEXT:  -      -     1.25   0.25    -      -      -     0.25   1.25    -     rolq	%cl, %rdi
-# CHECK-NEXT:  -      -     1.25   0.25    -      -      -     0.25   1.25    -     rorq	%cl, %rdi
+# CHECK-NEXT:  -      -     1.50    -      -      -      -      -     1.50    -     rolq	%cl, %rdi
+# CHECK-NEXT:  -      -     1.50    -      -      -      -      -     1.50    -     rorq	%cl, %rdi
 # CHECK-NEXT:  -      -     1.25   0.25   0.83   0.83   1.00   0.25   1.25   0.33   rolq	%cl, (%rax)
 # CHECK-NEXT:  -      -     1.25   0.25   0.83   0.83   1.00   0.25   1.25   0.33   rorq	%cl, (%rax)
 # CHECK-NEXT:  -      -     0.50    -      -      -      -      -     0.50    -     sahf
@@ -2558,9 +2558,9 @@ xorq (%rax), %rdi
 # CHECK-NEXT:  -      -     0.50    -     0.83   0.83   1.00    -     0.50   0.33   sarb	$7, (%rax)
 # CHECK-NEXT:  -      -     0.50    -     0.83   0.83   1.00    -     0.50   0.33   shlb	$7, (%rax)
 # CHECK-NEXT:  -      -     0.50    -     0.83   0.83   1.00    -     0.50   0.33   shrb	$7, (%rax)
-# CHECK-NEXT:  -      -     1.25   0.25    -      -      -     0.25   1.25    -     sarb	%cl, %dil
-# CHECK-NEXT:  -      -     1.25   0.25    -      -      -     0.25   1.25    -     shlb	%cl, %dil
-# CHECK-NEXT:  -      -     1.25   0.25    -      -      -     0.25   1.25    -     shrb	%cl, %dil
+# CHECK-NEXT:  -      -     1.50    -      -      -      -      -     1.50    -     sarb	%cl, %dil
+# CHECK-NEXT:  -      -     1.50    -      -      -      -      -     1.50    -     shlb	%cl, %dil
+# CHECK-NEXT:  -      -     1.50    -      -      -      -      -     1.50    -     shrb	%cl, %dil
 # CHECK-NEXT:  -      -     1.25   0.25   0.83   0.83   1.00   0.25   1.25   0.33   sarb	%cl, (%rax)
 # CHECK-NEXT:  -      -     1.25   0.25   0.83   0.83   1.00   0.25   1.25   0.33   shlb	%cl, (%rax)
 # CHECK-NEXT:  -      -     1.25   0.25   0.83   0.83   1.00   0.25   1.25   0.33   shrb	%cl, (%rax)
@@ -2576,9 +2576,9 @@ xorq (%rax), %rdi
 # CHECK-NEXT:  -      -     0.50    -     0.83   0.83   1.00    -     0.50   0.33   sarw	$7, (%rax)
 # CHECK-NEXT:  -      -     0.50    -     0.83   0.83   1.00    -     0.50   0.33   shlw	$7, (%rax)
 # CHECK-NEXT:  -      -     0.50    -     0.83   0.83   1.00    -     0.50   0.33   shrw	$7, (%rax)
-# CHECK-NEXT:  -      -     1.25   0.25    -      -      -     0.25   1.25    -     sarw	%cl, %di
-# CHECK-NEXT:  -      -     1.25   0.25    -      -      -     0.25   1.25    -     shlw	%cl, %di
-# CHECK-NEXT:  -      -     1.25   0.25    -      -      -     0.25   1.25    -     shrw	%cl, %di
+# CHECK-NEXT:  -      -     1.50    -      -      -      -      -     1.50    -     sarw	%cl, %di
+# CHECK-NEXT:  -      -     1.50    -      -      -      -      -     1.50    -     shlw	%cl, %di
+# CHECK-NEXT:  -      -     1.50    -      -      -      -      -     1.50    -     shrw	%cl, %di
 # CHECK-NEXT:  -      -     1.25   0.25   0.83   0.83   1.00   0.25   1.25   0.33   sarw	%cl, (%rax)
 # CHECK-NEXT:  -      -     1.25   0.25   0.83   0.83   1.00   0.25   1.25   0.33   shlw	%cl, (%rax)
 # CHECK-NEXT:  -      -     1.25   0.25   0.83   0.83   1.00   0.25   1.25   0.33   shrw	%cl, (%rax)
@@ -2594,9 +2594,9 @@ xorq (%rax), %rdi
 # CHECK-NEXT:  -      -     0.50    -     0.83   0.83   1.00    -     0.50   0.33   sarl	$7, (%rax)
 # CHECK-NEXT:  -      -     0.50    -     0.83   0.83   1.00    -     0.50   0.33   shll	$7, (%rax)
 # CHECK-NEXT:  -      -     0.50    -     0.83   0.83   1.00    -     0.50   0.33   shrl	$7, (%rax)
-# CHECK-NEXT:  -      -     1.25   0.25    -      -      -     0.25   1.25    -     sarl	%cl, %edi
-# CHECK-NEXT:  -      -     1.25   0.25    -      -      -     0.25   1.25    -     shll	%cl, %edi
-# CHECK-NEXT:  -      -     1.25   0.25    -      -      -     0.25   1.25    -     shrl	%cl, %edi
+# CHECK-NEXT:  -      -     1.50    -      -      -      -      -     1.50    -     sarl	%cl, %edi
+# CHECK-NEXT:  -      -     1.50    -      -      -      -      -     1.50    -     shll	%cl, %edi
+# CHECK-NEXT:  -      -     1.50    -      -      -      -      -     1.50    -     shrl	%cl, %edi
 # CHECK-NEXT:  -      -     1.25   0.25   0.83   0.83   1.00   0.25   1.25   0.33   sarl	%cl, (%rax)
 # CHECK-NEXT:  -      -     1.25   0.25   0.83   0.83   1.00   0.25   1.25   0.33   shll	%cl, (%rax)
 # CHECK-NEXT:  -      -     1.25   0.25   0.83   0.83   1.00   0.25   1.25   0.33   shrl	%cl, (%rax)
@@ -2612,9 +2612,9 @@ xorq (%rax), %rdi
 # CHECK-NEXT:  -      -     0.50    -     0.83   0.83   1.00    -     0.50   0.33   sarq	$7, (%rax)
 # CHECK-NEXT:  -      -     0.50    -     0.83   0.83   1.00    -     0.50   0.33   shlq	$7, (%rax)
 # CHECK-NEXT:  -      -     0.50    -     0.83   0.83   1.00    -     0.50   0.33   shrq	$7, (%rax)
-# CHECK-NEXT:  -      -     1.25   0.25    -      -      -     0.25   1.25    -     sarq	%cl, %rdi
-# CHECK-NEXT:  -      -     1.25   0.25    -      -      -     0.25   1.25    -     shlq	%cl, %rdi
-# CHECK-NEXT:  -      -     1.25   0.25    -      -      -     0.25   1.25    -     shrq	%cl, %rdi
+# CHECK-NEXT:  -      -     1.50    -      -      -      -      -     1.50    -     sarq	%cl, %rdi
+# CHECK-NEXT:  -      -     1.50    -      -      -      -      -     1.50    -     shlq	%cl, %rdi
+# CHECK-NEXT:  -      -     1.50    -      -      -      -      -     1.50    -     shrq	%cl, %rdi
 # CHECK-NEXT:  -      -     1.25   0.25   0.83   0.83   1.00   0.25   1.25   0.33   sarq	%cl, (%rax)
 # CHECK-NEXT:  -      -     1.25   0.25   0.83   0.83   1.00   0.25   1.25   0.33   shlq	%cl, (%rax)
 # CHECK-NEXT:  -      -     1.25   0.25   0.83   0.83   1.00   0.25   1.25   0.33   shrq	%cl, (%rax)


        


More information about the llvm-commits mailing list