[llvm] r332109 - [X86][BtVer2] Model ymm move as double pumped instructions
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Fri May 11 10:38:36 PDT 2018
Author: rksimon
Date: Fri May 11 10:38:36 2018
New Revision: 332109
URL: http://llvm.org/viewvc/llvm-project?rev=332109&view=rev
Log:
[X86][BtVer2] Model ymm move as double pumped instructions
We still need to handle mmx/xmm moves as 'decode-only' no-pipe instructions
Modified:
llvm/trunk/lib/Target/X86/X86ScheduleBtVer2.td
llvm/trunk/test/CodeGen/X86/avx-schedule.ll
llvm/trunk/test/tools/llvm-mca/X86/BtVer2/resources-avx1.s
Modified: llvm/trunk/lib/Target/X86/X86ScheduleBtVer2.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ScheduleBtVer2.td?rev=332109&r1=332108&r2=332109&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86ScheduleBtVer2.td (original)
+++ llvm/trunk/lib/Target/X86/X86ScheduleBtVer2.td Fri May 11 10:38:36 2018
@@ -279,11 +279,11 @@ defm : X86WriteRes<WriteFStoreY, [
defm : X86WriteRes<WriteFMaskedStore, [JSAGU, JFPU01, JFPX], 6, [1, 1, 4], 1>;
defm : X86WriteRes<WriteFMaskedStoreY, [JSAGU, JFPU01, JFPX], 6, [2, 2, 4], 2>;
-def : WriteRes<WriteFMove, [JFPU01, JFPX]>;
-def : WriteRes<WriteFMoveX, [JFPU01, JFPX]>;
-def : WriteRes<WriteFMoveY, [JFPU01, JFPX]>;
+defm : X86WriteRes<WriteFMove, [JFPU01, JFPX], 1, [1, 1], 1>;
+defm : X86WriteRes<WriteFMoveX, [JFPU01, JFPX], 1, [1, 1], 1>;
+defm : X86WriteRes<WriteFMoveY, [JFPU01, JFPX], 1, [2, 2], 2>;
-def : WriteRes<WriteEMMS, [JFPU01, JFPX]> { let Latency = 2; }
+defm : X86WriteRes<WriteEMMS, [JFPU01, JFPX], 2, [1, 1], 1>;
defm : JWriteResFpuPair<WriteFAdd, [JFPU0, JFPA], 3>;
defm : JWriteResFpuPair<WriteFAddX, [JFPU0, JFPA], 3>;
@@ -415,9 +415,9 @@ defm : X86WriteRes<WriteVecStoreY,
defm : X86WriteRes<WriteVecMaskedStore, [JSAGU, JFPU01, JVALU], 6, [1, 1, 4], 1>;
defm : X86WriteRes<WriteVecMaskedStoreY, [JSAGU, JFPU01, JVALU], 6, [2, 2, 4], 2>;
-def : WriteRes<WriteVecMove, [JFPU01, JVALU]>;
-def : WriteRes<WriteVecMoveX, [JFPU01, JVALU]>;
-def : WriteRes<WriteVecMoveY, [JFPU01, JVALU]>;
+defm : X86WriteRes<WriteVecMove, [JFPU01, JVALU], 1, [1, 1], 1>;
+defm : X86WriteRes<WriteVecMoveX, [JFPU01, JVALU], 1, [1, 1], 1>;
+defm : X86WriteRes<WriteVecMoveY, [JFPU01, JVALU], 1, [2, 2], 2>;
defm : JWriteResFpuPair<WriteVecALU, [JFPU01, JVALU], 1>;
defm : JWriteResFpuPair<WriteVecALUX, [JFPU01, JVALU], 1>;
Modified: llvm/trunk/test/CodeGen/X86/avx-schedule.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/avx-schedule.ll?rev=332109&r1=332108&r2=332109&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/X86/avx-schedule.ll (original)
+++ llvm/trunk/test/CodeGen/X86/avx-schedule.ll Fri May 11 10:38:36 2018
@@ -2159,7 +2159,7 @@ define <4 x double> @test_maskmovpd_ymm(
; BTVER2: # %bb.0:
; BTVER2-NEXT: vmaskmovpd (%rdi), %ymm0, %ymm2 # sched: [6:2.00]
; BTVER2-NEXT: vmaskmovpd %ymm1, %ymm0, (%rdi) # sched: [6:2.00]
-; BTVER2-NEXT: vmovapd %ymm2, %ymm0 # sched: [1:0.50]
+; BTVER2-NEXT: vmovapd %ymm2, %ymm0 # sched: [1:1.00]
; BTVER2-NEXT: retq # sched: [4:1.00]
;
; ZNVER1-LABEL: test_maskmovpd_ymm:
@@ -2285,7 +2285,7 @@ define <8 x float> @test_maskmovps_ymm(i
; BTVER2: # %bb.0:
; BTVER2-NEXT: vmaskmovps (%rdi), %ymm0, %ymm2 # sched: [6:2.00]
; BTVER2-NEXT: vmaskmovps %ymm1, %ymm0, (%rdi) # sched: [6:2.00]
-; BTVER2-NEXT: vmovaps %ymm2, %ymm0 # sched: [1:0.50]
+; BTVER2-NEXT: vmovaps %ymm2, %ymm0 # sched: [1:1.00]
; BTVER2-NEXT: retq # sched: [4:1.00]
;
; ZNVER1-LABEL: test_maskmovps_ymm:
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=332109&r1=332108&r2=332109&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 Fri May 11 10:38:36 2018
@@ -1243,13 +1243,13 @@ vzeroupper
# CHECK-NEXT: 1 1 0.50 vmovapd %xmm0, %xmm2
# CHECK-NEXT: 1 1 1.00 * vmovapd %xmm0, (%rax)
# CHECK-NEXT: 1 5 1.00 * vmovapd (%rax), %xmm2
-# CHECK-NEXT: 1 1 0.50 vmovapd %ymm0, %ymm2
+# CHECK-NEXT: 2 1 1.00 vmovapd %ymm0, %ymm2
# CHECK-NEXT: 1 1 1.00 * vmovapd %ymm0, (%rax)
# CHECK-NEXT: 1 5 1.00 * vmovapd (%rax), %ymm2
# CHECK-NEXT: 1 1 0.50 vmovaps %xmm0, %xmm2
# CHECK-NEXT: 1 1 1.00 * vmovaps %xmm0, (%rax)
# CHECK-NEXT: 1 5 1.00 * vmovaps (%rax), %xmm2
-# CHECK-NEXT: 1 1 0.50 vmovaps %ymm0, %ymm2
+# CHECK-NEXT: 2 1 1.00 vmovaps %ymm0, %ymm2
# CHECK-NEXT: 1 1 1.00 * vmovaps %ymm0, (%rax)
# CHECK-NEXT: 1 5 1.00 * vmovaps (%rax), %ymm2
# CHECK-NEXT: 1 1 0.50 vmovd %eax, %xmm2
@@ -1263,13 +1263,13 @@ vzeroupper
# CHECK-NEXT: 1 1 0.50 vmovdqa %xmm0, %xmm2
# CHECK-NEXT: 1 1 1.00 * vmovdqa %xmm0, (%rax)
# CHECK-NEXT: 1 5 1.00 * vmovdqa (%rax), %xmm2
-# CHECK-NEXT: 1 1 0.50 vmovdqa %ymm0, %ymm2
+# CHECK-NEXT: 2 1 1.00 vmovdqa %ymm0, %ymm2
# CHECK-NEXT: 1 1 1.00 * vmovdqa %ymm0, (%rax)
# CHECK-NEXT: 1 5 1.00 * vmovdqa (%rax), %ymm2
# CHECK-NEXT: 1 1 0.50 vmovdqu %xmm0, %xmm2
# CHECK-NEXT: 1 1 1.00 * vmovdqu %xmm0, (%rax)
# CHECK-NEXT: 1 5 1.00 * vmovdqu (%rax), %xmm2
-# CHECK-NEXT: 1 1 0.50 vmovdqu %ymm0, %ymm2
+# CHECK-NEXT: 2 1 1.00 vmovdqu %ymm0, %ymm2
# CHECK-NEXT: 1 1 1.00 * vmovdqu %ymm0, (%rax)
# CHECK-NEXT: 1 5 1.00 * vmovdqu (%rax), %ymm2
# CHECK-NEXT: 1 1 0.50 vmovhlps %xmm0, %xmm1, %xmm2
@@ -1316,13 +1316,13 @@ vzeroupper
# CHECK-NEXT: 1 1 0.50 vmovupd %xmm0, %xmm2
# CHECK-NEXT: 1 1 1.00 * vmovupd %xmm0, (%rax)
# CHECK-NEXT: 1 5 1.00 * vmovupd (%rax), %xmm2
-# CHECK-NEXT: 1 1 0.50 vmovupd %ymm0, %ymm2
+# CHECK-NEXT: 2 1 1.00 vmovupd %ymm0, %ymm2
# CHECK-NEXT: 1 1 1.00 * vmovupd %ymm0, (%rax)
# CHECK-NEXT: 1 5 1.00 * vmovupd (%rax), %ymm2
# CHECK-NEXT: 1 1 0.50 vmovups %xmm0, %xmm2
# CHECK-NEXT: 1 1 1.00 * vmovups %xmm0, (%rax)
# CHECK-NEXT: 1 5 1.00 * vmovups (%rax), %xmm2
-# CHECK-NEXT: 1 1 0.50 vmovups %ymm0, %ymm2
+# CHECK-NEXT: 2 1 1.00 vmovups %ymm0, %ymm2
# CHECK-NEXT: 1 1 1.00 * vmovups %ymm0, (%rax)
# CHECK-NEXT: 1 5 1.00 * vmovups (%rax), %ymm2
# CHECK-NEXT: 1 3 2.00 vmpsadbw $1, %xmm0, %xmm1, %xmm2
@@ -1720,7 +1720,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: 48.00 2.00 - 347.50 907.50 394.00 406.00 381.00 - 43.00 122.00 117.50 117.50 38.00
+# CHECK-NEXT: 48.00 2.00 - 349.50 909.50 397.00 409.00 381.00 - 43.00 122.00 118.50 118.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:
@@ -1949,13 +1949,13 @@ vzeroupper
# CHECK-NEXT: - - - 0.50 0.50 0.50 0.50 - - - - - - - vmovapd %xmm0, %xmm2
# CHECK-NEXT: - - - - - - 1.00 - - 1.00 1.00 - - - vmovapd %xmm0, (%rax)
# CHECK-NEXT: - - - 0.50 0.50 0.50 0.50 1.00 - - - - - - vmovapd (%rax), %xmm2
-# CHECK-NEXT: - - - 0.50 0.50 0.50 0.50 - - - - - - - vmovapd %ymm0, %ymm2
+# CHECK-NEXT: - - - 1.00 1.00 1.00 1.00 - - - - - - - vmovapd %ymm0, %ymm2
# CHECK-NEXT: - - - - - - 1.00 - - 1.00 1.00 - - - vmovapd %ymm0, (%rax)
# CHECK-NEXT: - - - 0.50 0.50 0.50 0.50 1.00 - - - - - - vmovapd (%rax), %ymm2
# CHECK-NEXT: - - - 0.50 0.50 0.50 0.50 - - - - - - - vmovaps %xmm0, %xmm2
# CHECK-NEXT: - - - - - - 1.00 - - 1.00 1.00 - - - vmovaps %xmm0, (%rax)
# CHECK-NEXT: - - - 0.50 0.50 0.50 0.50 1.00 - - - - - - vmovaps (%rax), %xmm2
-# CHECK-NEXT: - - - 0.50 0.50 0.50 0.50 - - - - - - - vmovaps %ymm0, %ymm2
+# CHECK-NEXT: - - - 1.00 1.00 1.00 1.00 - - - - - - - vmovaps %ymm0, %ymm2
# CHECK-NEXT: - - - - - - 1.00 - - 1.00 1.00 - - - vmovaps %ymm0, (%rax)
# CHECK-NEXT: - - - 0.50 0.50 0.50 0.50 1.00 - - - - - - vmovaps (%rax), %ymm2
# CHECK-NEXT: 0.50 0.50 - - - - - - - - - - - - vmovd %eax, %xmm2
@@ -1969,13 +1969,13 @@ vzeroupper
# CHECK-NEXT: - - - - - 0.50 0.50 - - - - 0.50 0.50 - vmovdqa %xmm0, %xmm2
# CHECK-NEXT: - - - - - - 1.00 - - 1.00 1.00 - - - vmovdqa %xmm0, (%rax)
# CHECK-NEXT: - - - - - 0.50 0.50 1.00 - - - 0.50 0.50 - vmovdqa (%rax), %xmm2
-# CHECK-NEXT: - - - - - 0.50 0.50 - - - - 0.50 0.50 - vmovdqa %ymm0, %ymm2
+# CHECK-NEXT: - - - - - 1.00 1.00 - - - - 1.00 1.00 - vmovdqa %ymm0, %ymm2
# CHECK-NEXT: - - - - - - 1.00 - - 1.00 1.00 - - - vmovdqa %ymm0, (%rax)
# CHECK-NEXT: - - - - - 0.50 0.50 1.00 - - - 0.50 0.50 - vmovdqa (%rax), %ymm2
# CHECK-NEXT: - - - - - 0.50 0.50 - - - - 0.50 0.50 - vmovdqu %xmm0, %xmm2
# CHECK-NEXT: - - - - - - 1.00 - - 1.00 1.00 - - - vmovdqu %xmm0, (%rax)
# CHECK-NEXT: - - - - - 0.50 0.50 1.00 - - - 0.50 0.50 - vmovdqu (%rax), %xmm2
-# CHECK-NEXT: - - - - - 0.50 0.50 - - - - 0.50 0.50 - vmovdqu %ymm0, %ymm2
+# CHECK-NEXT: - - - - - 1.00 1.00 - - - - 1.00 1.00 - vmovdqu %ymm0, %ymm2
# CHECK-NEXT: - - - - - - 1.00 - - 1.00 1.00 - - - vmovdqu %ymm0, (%rax)
# CHECK-NEXT: - - - - - 0.50 0.50 1.00 - - - 0.50 0.50 - vmovdqu (%rax), %ymm2
# CHECK-NEXT: - - - 0.50 0.50 0.50 0.50 - - - - - - - vmovhlps %xmm0, %xmm1, %xmm2
@@ -2022,13 +2022,13 @@ vzeroupper
# CHECK-NEXT: - - - 0.50 0.50 0.50 0.50 - - - - - - - vmovupd %xmm0, %xmm2
# CHECK-NEXT: - - - - - - 1.00 - - 1.00 1.00 - - - vmovupd %xmm0, (%rax)
# CHECK-NEXT: - - - 0.50 0.50 0.50 0.50 1.00 - - - - - - vmovupd (%rax), %xmm2
-# CHECK-NEXT: - - - 0.50 0.50 0.50 0.50 - - - - - - - vmovupd %ymm0, %ymm2
+# CHECK-NEXT: - - - 1.00 1.00 1.00 1.00 - - - - - - - vmovupd %ymm0, %ymm2
# CHECK-NEXT: - - - - - - 1.00 - - 1.00 1.00 - - - vmovupd %ymm0, (%rax)
# CHECK-NEXT: - - - 0.50 0.50 0.50 0.50 1.00 - - - - - - vmovupd (%rax), %ymm2
# CHECK-NEXT: - - - 0.50 0.50 0.50 0.50 - - - - - - - vmovups %xmm0, %xmm2
# CHECK-NEXT: - - - - - - 1.00 - - 1.00 1.00 - - - vmovups %xmm0, (%rax)
# CHECK-NEXT: - - - 0.50 0.50 0.50 0.50 1.00 - - - - - - vmovups (%rax), %xmm2
-# CHECK-NEXT: - - - 0.50 0.50 0.50 0.50 - - - - - - - vmovups %ymm0, %ymm2
+# CHECK-NEXT: - - - 1.00 1.00 1.00 1.00 - - - - - - - vmovups %ymm0, %ymm2
# CHECK-NEXT: - - - - - - 1.00 - - 1.00 1.00 - - - vmovups %ymm0, (%rax)
# CHECK-NEXT: - - - 0.50 0.50 0.50 0.50 1.00 - - - - - - vmovups (%rax), %ymm2
# CHECK-NEXT: - - - - - 1.00 - - - - - - - 2.00 vmpsadbw $1, %xmm0, %xmm1, %xmm2
More information about the llvm-commits
mailing list