[llvm] r343597 - [X86][Btver2] Fix BLENDV and AESDEC schedules
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 2 08:13:18 PDT 2018
Author: rksimon
Date: Tue Oct 2 08:13:18 2018
New Revision: 343597
URL: http://llvm.org/viewvc/llvm-project?rev=343597&view=rev
Log:
[X86][Btver2] Fix BLENDV and AESDEC schedules
Match AMD Fam16h SOG + llvm-exegesis tests
Modified:
llvm/trunk/lib/Target/X86/X86ScheduleBtVer2.td
llvm/trunk/test/tools/llvm-mca/X86/BtVer2/resources-aes.s
llvm/trunk/test/tools/llvm-mca/X86/BtVer2/resources-avx1.s
llvm/trunk/test/tools/llvm-mca/X86/BtVer2/resources-sse41.s
Modified: llvm/trunk/lib/Target/X86/X86ScheduleBtVer2.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ScheduleBtVer2.td?rev=343597&r1=343596&r2=343597&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86ScheduleBtVer2.td (original)
+++ llvm/trunk/lib/Target/X86/X86ScheduleBtVer2.td Tue Oct 2 08:13:18 2018
@@ -389,8 +389,8 @@ defm : X86WriteResPairUnsupported<WriteF
defm : JWriteResFpuPair<WriteFBlend, [JFPU01, JFPX], 1>;
defm : JWriteResYMMPair<WriteFBlendY, [JFPU01, JFPX], 1, [2, 2], 2>;
defm : X86WriteResPairUnsupported<WriteFBlendZ>;
-defm : JWriteResFpuPair<WriteFVarBlend, [JFPU01, JFPX], 2, [1, 4], 3>;
-defm : JWriteResYMMPair<WriteFVarBlendY, [JFPU01, JFPX], 3, [2, 6], 6>;
+defm : JWriteResFpuPair<WriteFVarBlend, [JFPU01, JFPX], 2, [4, 4], 3>;
+defm : JWriteResYMMPair<WriteFVarBlendY, [JFPU01, JFPX], 3, [6, 6], 6>;
defm : X86WriteResPairUnsupported<WriteFVarBlendZ>;
defm : JWriteResFpuPair<WriteFShuffle256, [JFPU01, JFPX], 1, [2, 2], 2>;
defm : X86WriteResPairUnsupported<WriteFVarShuffle256>;
@@ -506,7 +506,7 @@ defm : X86WriteResPairUnsupported<WriteV
defm : JWriteResFpuPair<WriteBlend, [JFPU01, JVALU], 1>;
defm : X86WriteResPairUnsupported<WriteBlendY>;
defm : X86WriteResPairUnsupported<WriteBlendZ>;
-defm : JWriteResFpuPair<WriteVarBlend, [JFPU01, JVALU], 2, [1, 4], 3>;
+defm : JWriteResFpuPair<WriteVarBlend, [JFPU01, JVALU], 2, [4, 4], 3>;
defm : X86WriteResPairUnsupported<WriteVarBlendY>;
defm : X86WriteResPairUnsupported<WriteVarBlendZ>;
defm : JWriteResFpuPair<WriteVecLogic, [JFPU01, JVALU], 1>;
@@ -552,7 +552,7 @@ def : WriteRes<WriteMMXMOVMSK, [JFPU0,
defm : JWriteResFpuPair<WriteAESIMC, [JFPU0, JVIMUL], 2>;
defm : JWriteResFpuPair<WriteAESKeyGen, [JFPU0, JVIMUL], 2>;
-defm : JWriteResFpuPair<WriteAESDecEnc, [JFPU0, JVIMUL], 3, [1, 1], 2>;
+defm : JWriteResFpuPair<WriteAESDecEnc, [JFPU01, JVALU, JFPU0, JVIMUL], 3, [1,1,1,1], 2>;
////////////////////////////////////////////////////////////////////////////////
// Horizontal add/sub instructions.
Modified: llvm/trunk/test/tools/llvm-mca/X86/BtVer2/resources-aes.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-mca/X86/BtVer2/resources-aes.s?rev=343597&r1=343596&r2=343597&view=diff
==============================================================================
--- llvm/trunk/test/tools/llvm-mca/X86/BtVer2/resources-aes.s (original)
+++ llvm/trunk/test/tools/llvm-mca/X86/BtVer2/resources-aes.s Tue Oct 2 08:13:18 2018
@@ -59,18 +59,18 @@ aeskeygenassist $22, (%rax), %xmm2
# CHECK: Resource pressure per iteration:
# CHECK-NEXT: [0] [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13]
-# CHECK-NEXT: - - - - - 12.00 - 6.00 - - - - - 12.00
+# CHECK-NEXT: - - - - - 16.00 4.00 6.00 - - - 4.00 4.00 12.00
# CHECK: Resource pressure by instruction:
# CHECK-NEXT: [0] [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] Instructions:
-# CHECK-NEXT: - - - - - 1.00 - - - - - - - 1.00 aesdec %xmm0, %xmm2
-# CHECK-NEXT: - - - - - 1.00 - 1.00 - - - - - 1.00 aesdec (%rax), %xmm2
-# CHECK-NEXT: - - - - - 1.00 - - - - - - - 1.00 aesdeclast %xmm0, %xmm2
-# CHECK-NEXT: - - - - - 1.00 - 1.00 - - - - - 1.00 aesdeclast (%rax), %xmm2
-# CHECK-NEXT: - - - - - 1.00 - - - - - - - 1.00 aesenc %xmm0, %xmm2
-# CHECK-NEXT: - - - - - 1.00 - 1.00 - - - - - 1.00 aesenc (%rax), %xmm2
-# CHECK-NEXT: - - - - - 1.00 - - - - - - - 1.00 aesenclast %xmm0, %xmm2
-# CHECK-NEXT: - - - - - 1.00 - 1.00 - - - - - 1.00 aesenclast (%rax), %xmm2
+# CHECK-NEXT: - - - - - 1.50 0.50 - - - - 0.50 0.50 1.00 aesdec %xmm0, %xmm2
+# CHECK-NEXT: - - - - - 1.50 0.50 1.00 - - - 0.50 0.50 1.00 aesdec (%rax), %xmm2
+# CHECK-NEXT: - - - - - 1.50 0.50 - - - - 0.50 0.50 1.00 aesdeclast %xmm0, %xmm2
+# CHECK-NEXT: - - - - - 1.50 0.50 1.00 - - - 0.50 0.50 1.00 aesdeclast (%rax), %xmm2
+# CHECK-NEXT: - - - - - 1.50 0.50 - - - - 0.50 0.50 1.00 aesenc %xmm0, %xmm2
+# CHECK-NEXT: - - - - - 1.50 0.50 1.00 - - - 0.50 0.50 1.00 aesenc (%rax), %xmm2
+# CHECK-NEXT: - - - - - 1.50 0.50 - - - - 0.50 0.50 1.00 aesenclast %xmm0, %xmm2
+# CHECK-NEXT: - - - - - 1.50 0.50 1.00 - - - 0.50 0.50 1.00 aesenclast (%rax), %xmm2
# CHECK-NEXT: - - - - - 1.00 - - - - - - - 1.00 aesimc %xmm0, %xmm2
# CHECK-NEXT: - - - - - 1.00 - 1.00 - - - - - 1.00 aesimc (%rax), %xmm2
# CHECK-NEXT: - - - - - 1.00 - - - - - - - 1.00 aeskeygenassist $22, %xmm0, %xmm2
Modified: llvm/trunk/test/tools/llvm-mca/X86/BtVer2/resources-avx1.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-mca/X86/BtVer2/resources-avx1.s?rev=343597&r1=343596&r2=343597&view=diff
==============================================================================
--- llvm/trunk/test/tools/llvm-mca/X86/BtVer2/resources-avx1.s (original)
+++ llvm/trunk/test/tools/llvm-mca/X86/BtVer2/resources-avx1.s Tue Oct 2 08:13:18 2018
@@ -1740,7 +1740,7 @@ vzeroupper
# CHECK: Resource pressure per iteration:
# CHECK-NEXT: [0] [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13]
-# CHECK-NEXT: 56.00 - - 365.00 915.00 426.50 440.50 394.00 - 51.00 132.00 131.50 155.50 38.00
+# CHECK-NEXT: 56.00 - - 365.00 915.00 447.50 461.50 394.00 - 51.00 132.00 135.50 159.50 38.00
# CHECK: Resource pressure by instruction:
# CHECK-NEXT: [0] [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] Instructions:
@@ -1764,14 +1764,14 @@ vzeroupper
# CHECK-NEXT: - - - 1.00 - 1.00 - 1.00 - - - - - - vaddsubps (%rax), %xmm1, %xmm2
# CHECK-NEXT: - - - 2.00 - 2.00 - - - - - - - - vaddsubps %ymm0, %ymm1, %ymm2
# CHECK-NEXT: - - - 2.00 - 2.00 - 2.00 - - - - - - vaddsubps (%rax), %ymm1, %ymm2
-# CHECK-NEXT: - - - - - 1.00 - - - - - - - 1.00 vaesdec %xmm0, %xmm1, %xmm2
-# CHECK-NEXT: - - - - - 1.00 - 1.00 - - - - - 1.00 vaesdec (%rax), %xmm1, %xmm2
-# CHECK-NEXT: - - - - - 1.00 - - - - - - - 1.00 vaesdeclast %xmm0, %xmm1, %xmm2
-# CHECK-NEXT: - - - - - 1.00 - 1.00 - - - - - 1.00 vaesdeclast (%rax), %xmm1, %xmm2
-# CHECK-NEXT: - - - - - 1.00 - - - - - - - 1.00 vaesenc %xmm0, %xmm1, %xmm2
-# CHECK-NEXT: - - - - - 1.00 - 1.00 - - - - - 1.00 vaesenc (%rax), %xmm1, %xmm2
-# CHECK-NEXT: - - - - - 1.00 - - - - - - - 1.00 vaesenclast %xmm0, %xmm1, %xmm2
-# CHECK-NEXT: - - - - - 1.00 - 1.00 - - - - - 1.00 vaesenclast (%rax), %xmm1, %xmm2
+# CHECK-NEXT: - - - - - 1.50 0.50 - - - - 0.50 0.50 1.00 vaesdec %xmm0, %xmm1, %xmm2
+# CHECK-NEXT: - - - - - 1.50 0.50 1.00 - - - 0.50 0.50 1.00 vaesdec (%rax), %xmm1, %xmm2
+# CHECK-NEXT: - - - - - 1.50 0.50 - - - - 0.50 0.50 1.00 vaesdeclast %xmm0, %xmm1, %xmm2
+# CHECK-NEXT: - - - - - 1.50 0.50 1.00 - - - 0.50 0.50 1.00 vaesdeclast (%rax), %xmm1, %xmm2
+# CHECK-NEXT: - - - - - 1.50 0.50 - - - - 0.50 0.50 1.00 vaesenc %xmm0, %xmm1, %xmm2
+# CHECK-NEXT: - - - - - 1.50 0.50 1.00 - - - 0.50 0.50 1.00 vaesenc (%rax), %xmm1, %xmm2
+# CHECK-NEXT: - - - - - 1.50 0.50 - - - - 0.50 0.50 1.00 vaesenclast %xmm0, %xmm1, %xmm2
+# CHECK-NEXT: - - - - - 1.50 0.50 1.00 - - - 0.50 0.50 1.00 vaesenclast (%rax), %xmm1, %xmm2
# CHECK-NEXT: - - - - - 1.00 - - - - - - - 1.00 vaesimc %xmm0, %xmm2
# CHECK-NEXT: - - - - - 1.00 - 1.00 - - - - - 1.00 vaesimc (%rax), %xmm2
# CHECK-NEXT: - - - - - 1.00 - - - - - - - 1.00 vaeskeygenassist $22, %xmm0, %xmm2
@@ -1800,14 +1800,14 @@ vzeroupper
# CHECK-NEXT: - - - 0.50 0.50 0.50 0.50 1.00 - - - - - - vblendps $11, (%rax), %xmm1, %xmm2
# CHECK-NEXT: - - - 1.00 1.00 1.00 1.00 - - - - - - - vblendps $11, %ymm0, %ymm1, %ymm2
# CHECK-NEXT: - - - 1.00 1.00 1.00 1.00 2.00 - - - - - - vblendps $11, (%rax), %ymm1, %ymm2
-# CHECK-NEXT: - - - 2.00 2.00 0.50 0.50 - - - - - - - vblendvpd %xmm3, %xmm0, %xmm1, %xmm2
-# CHECK-NEXT: - - - 2.00 2.00 0.50 0.50 1.00 - - - - - - vblendvpd %xmm3, (%rax), %xmm1, %xmm2
-# CHECK-NEXT: - - - 3.00 3.00 1.00 1.00 - - - - - - - vblendvpd %ymm3, %ymm0, %ymm1, %ymm2
-# CHECK-NEXT: - - - 3.00 3.00 1.00 1.00 2.00 - - - - - - vblendvpd %ymm3, (%rax), %ymm1, %ymm2
-# CHECK-NEXT: - - - 2.00 2.00 0.50 0.50 - - - - - - - vblendvps %xmm3, %xmm0, %xmm1, %xmm2
-# CHECK-NEXT: - - - 2.00 2.00 0.50 0.50 1.00 - - - - - - vblendvps %xmm3, (%rax), %xmm1, %xmm2
-# CHECK-NEXT: - - - 3.00 3.00 1.00 1.00 - - - - - - - vblendvps %ymm3, %ymm0, %ymm1, %ymm2
-# CHECK-NEXT: - - - 3.00 3.00 1.00 1.00 2.00 - - - - - - vblendvps %ymm3, (%rax), %ymm1, %ymm2
+# CHECK-NEXT: - - - 2.00 2.00 2.00 2.00 - - - - - - - vblendvpd %xmm3, %xmm0, %xmm1, %xmm2
+# CHECK-NEXT: - - - 2.00 2.00 2.00 2.00 1.00 - - - - - - vblendvpd %xmm3, (%rax), %xmm1, %xmm2
+# CHECK-NEXT: - - - 3.00 3.00 3.00 3.00 - - - - - - - vblendvpd %ymm3, %ymm0, %ymm1, %ymm2
+# CHECK-NEXT: - - - 3.00 3.00 3.00 3.00 2.00 - - - - - - vblendvpd %ymm3, (%rax), %ymm1, %ymm2
+# CHECK-NEXT: - - - 2.00 2.00 2.00 2.00 - - - - - - - vblendvps %xmm3, %xmm0, %xmm1, %xmm2
+# CHECK-NEXT: - - - 2.00 2.00 2.00 2.00 1.00 - - - - - - vblendvps %xmm3, (%rax), %xmm1, %xmm2
+# CHECK-NEXT: - - - 3.00 3.00 3.00 3.00 - - - - - - - vblendvps %ymm3, %ymm0, %ymm1, %ymm2
+# CHECK-NEXT: - - - 3.00 3.00 3.00 3.00 2.00 - - - - - - vblendvps %ymm3, (%rax), %ymm1, %ymm2
# CHECK-NEXT: - - - 2.00 2.00 1.00 1.00 1.00 - - - - - - vbroadcastf128 (%rax), %ymm2
# CHECK-NEXT: - - - 2.00 2.00 1.00 1.00 1.00 - - - - - - vbroadcastsd (%rax), %ymm2
# CHECK-NEXT: - - - 0.50 0.50 0.50 0.50 1.00 - - - - - - vbroadcastss (%rax), %xmm2
@@ -2113,8 +2113,8 @@ vzeroupper
# CHECK-NEXT: - - - - - 0.50 0.50 1.00 - - - 0.50 0.50 - vpavgb (%rax), %xmm1, %xmm2
# CHECK-NEXT: - - - - - 0.50 0.50 - - - - 0.50 0.50 - vpavgw %xmm0, %xmm1, %xmm2
# CHECK-NEXT: - - - - - 0.50 0.50 1.00 - - - 0.50 0.50 - vpavgw (%rax), %xmm1, %xmm2
-# CHECK-NEXT: - - - - - 0.50 0.50 - - - - 2.00 2.00 - vpblendvb %xmm3, %xmm0, %xmm1, %xmm2
-# CHECK-NEXT: - - - - - 0.50 0.50 1.00 - - - 2.00 2.00 - vpblendvb %xmm3, (%rax), %xmm1, %xmm2
+# CHECK-NEXT: - - - - - 2.00 2.00 - - - - 2.00 2.00 - vpblendvb %xmm3, %xmm0, %xmm1, %xmm2
+# CHECK-NEXT: - - - - - 2.00 2.00 1.00 - - - 2.00 2.00 - vpblendvb %xmm3, (%rax), %xmm1, %xmm2
# CHECK-NEXT: - - - - - 0.50 0.50 - - - - 0.50 0.50 - vpblendw $11, %xmm0, %xmm1, %xmm2
# CHECK-NEXT: - - - - - 0.50 0.50 1.00 - - - 0.50 0.50 - vpblendw $11, (%rax), %xmm1, %xmm2
# CHECK-NEXT: - - - - - 1.00 - - - - - - - 1.00 vpclmulqdq $11, %xmm0, %xmm1, %xmm2
Modified: llvm/trunk/test/tools/llvm-mca/X86/BtVer2/resources-sse41.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-mca/X86/BtVer2/resources-sse41.s?rev=343597&r1=343596&r2=343597&view=diff
==============================================================================
--- llvm/trunk/test/tools/llvm-mca/X86/BtVer2/resources-sse41.s (original)
+++ llvm/trunk/test/tools/llvm-mca/X86/BtVer2/resources-sse41.s Tue Oct 2 08:13:18 2018
@@ -270,7 +270,7 @@ roundss $1, (%rax), %xmm2
# CHECK: Resource pressure per iteration:
# CHECK-NEXT: [0] [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13]
-# CHECK-NEXT: 6.00 - - 29.00 23.00 48.50 51.50 44.00 - 5.00 13.00 32.50 32.50 10.00
+# CHECK-NEXT: 6.00 - - 29.00 23.00 57.50 60.50 44.00 - 5.00 13.00 32.50 32.50 10.00
# CHECK: Resource pressure by instruction:
# CHECK-NEXT: [0] [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] Instructions:
@@ -278,10 +278,10 @@ roundss $1, (%rax), %xmm2
# CHECK-NEXT: - - - 0.50 0.50 0.50 0.50 1.00 - - - - - - blendpd $11, (%rax), %xmm2
# CHECK-NEXT: - - - 0.50 0.50 0.50 0.50 - - - - - - - blendps $11, %xmm0, %xmm2
# CHECK-NEXT: - - - 0.50 0.50 0.50 0.50 1.00 - - - - - - blendps $11, (%rax), %xmm2
-# CHECK-NEXT: - - - 2.00 2.00 0.50 0.50 - - - - - - - blendvpd %xmm0, %xmm0, %xmm2
-# CHECK-NEXT: - - - 2.00 2.00 0.50 0.50 1.00 - - - - - - blendvpd %xmm0, (%rax), %xmm2
-# CHECK-NEXT: - - - 2.00 2.00 0.50 0.50 - - - - - - - blendvps %xmm0, %xmm0, %xmm2
-# CHECK-NEXT: - - - 2.00 2.00 0.50 0.50 1.00 - - - - - - blendvps %xmm0, (%rax), %xmm2
+# CHECK-NEXT: - - - 2.00 2.00 2.00 2.00 - - - - - - - blendvpd %xmm0, %xmm0, %xmm2
+# CHECK-NEXT: - - - 2.00 2.00 2.00 2.00 1.00 - - - - - - blendvpd %xmm0, (%rax), %xmm2
+# CHECK-NEXT: - - - 2.00 2.00 2.00 2.00 - - - - - - - blendvps %xmm0, %xmm0, %xmm2
+# CHECK-NEXT: - - - 2.00 2.00 2.00 2.00 1.00 - - - - - - blendvps %xmm0, (%rax), %xmm2
# CHECK-NEXT: - - - 3.00 3.00 - 1.00 - - - - - - - dppd $22, %xmm0, %xmm2
# CHECK-NEXT: - - - 3.00 3.00 - 1.00 1.00 - - - - - - dppd $22, (%rax), %xmm2
# CHECK-NEXT: - - - 3.00 3.00 - 1.00 - - - - - - - dpps $22, %xmm0, %xmm2
@@ -295,8 +295,8 @@ roundss $1, (%rax), %xmm2
# CHECK-NEXT: - - - - - 1.00 - 1.00 - - - - - 2.00 mpsadbw $1, (%rax), %xmm2
# CHECK-NEXT: - - - - - 0.50 0.50 - - - - 0.50 0.50 - packusdw %xmm0, %xmm2
# CHECK-NEXT: - - - - - 0.50 0.50 1.00 - - - 0.50 0.50 - packusdw (%rax), %xmm2
-# CHECK-NEXT: - - - - - 0.50 0.50 - - - - 2.00 2.00 - pblendvb %xmm0, %xmm0, %xmm2
-# CHECK-NEXT: - - - - - 0.50 0.50 1.00 - - - 2.00 2.00 - pblendvb %xmm0, (%rax), %xmm2
+# CHECK-NEXT: - - - - - 2.00 2.00 - - - - 2.00 2.00 - pblendvb %xmm0, %xmm0, %xmm2
+# CHECK-NEXT: - - - - - 2.00 2.00 1.00 - - - 2.00 2.00 - pblendvb %xmm0, (%rax), %xmm2
# CHECK-NEXT: - - - - - 0.50 0.50 - - - - 0.50 0.50 - pblendw $11, %xmm0, %xmm2
# CHECK-NEXT: - - - - - 0.50 0.50 1.00 - - - 0.50 0.50 - pblendw $11, (%rax), %xmm2
# CHECK-NEXT: - - - - - 0.50 0.50 - - - - 0.50 0.50 - pcmpeqq %xmm0, %xmm2
More information about the llvm-commits
mailing list