Skip to content
This repository was archived by the owner on Apr 23, 2020. It is now read-only.

Commit 928b0fd

Browse files
committed
[X86][BtVer2] X86ISD::VPERMILPV has local forwarding disabled
Similar to horizontal ops on D56777, the vpermilpd/vpermilps variable mask ops has local forwarding disabled, adding +1cy to the use latency for the result. Differential Revision: https://reviews.llvm.org/D57022 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@351815 91177308-0d34-0410-b5e6-96231b3b80d8
1 parent e0a63eb commit 928b0fd

File tree

3 files changed

+18
-18
lines changed

3 files changed

+18
-18
lines changed

lib/Target/X86/X86ScheduleBtVer2.td

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -400,8 +400,8 @@ defm : X86WriteResPairUnsupported<WriteFTestZ>;
400400
defm : JWriteResFpuPair<WriteFShuffle, [JFPU01, JFPX], 1>;
401401
defm : JWriteResYMMPair<WriteFShuffleY, [JFPU01, JFPX], 1, [2, 2], 2>;
402402
defm : X86WriteResPairUnsupported<WriteFShuffleZ>;
403-
defm : JWriteResFpuPair<WriteFVarShuffle, [JFPU01, JFPX], 2, [1, 4], 3>;
404-
defm : JWriteResYMMPair<WriteFVarShuffleY,[JFPU01, JFPX], 3, [2, 6], 6>;
403+
defm : JWriteResFpuPair<WriteFVarShuffle, [JFPU01, JFPX], 3, [1, 4], 3>; // +1cy latency.
404+
defm : JWriteResYMMPair<WriteFVarShuffleY,[JFPU01, JFPX], 4, [2, 6], 6>; // +1cy latency.
405405
defm : X86WriteResPairUnsupported<WriteFVarShuffleZ>;
406406
defm : JWriteResFpuPair<WriteFBlend, [JFPU01, JFPX], 1>;
407407
defm : JWriteResYMMPair<WriteFBlendY, [JFPU01, JFPX], 1, [2, 2], 2>;

test/CodeGen/X86/avx-schedule.ll

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4258,8 +4258,8 @@ define <2 x double> @test_permilvarpd(<2 x double> %a0, <2 x i64> %a1, <2 x i64>
42584258
;
42594259
; BTVER2-LABEL: test_permilvarpd:
42604260
; BTVER2: # %bb.0:
4261-
; BTVER2-NEXT: vpermilpd %xmm1, %xmm0, %xmm0 # sched: [2:2.00]
4262-
; BTVER2-NEXT: vpermilpd (%rdi), %xmm0, %xmm0 # sched: [7:2.00]
4261+
; BTVER2-NEXT: vpermilpd %xmm1, %xmm0, %xmm0 # sched: [3:2.00]
4262+
; BTVER2-NEXT: vpermilpd (%rdi), %xmm0, %xmm0 # sched: [8:2.00]
42634263
; BTVER2-NEXT: retq # sched: [4:1.00]
42644264
;
42654265
; ZNVER1-LABEL: test_permilvarpd:
@@ -4319,8 +4319,8 @@ define <4 x double> @test_permilvarpd_ymm(<4 x double> %a0, <4 x i64> %a1, <4 x
43194319
;
43204320
; BTVER2-LABEL: test_permilvarpd_ymm:
43214321
; BTVER2: # %bb.0:
4322-
; BTVER2-NEXT: vpermilpd %ymm1, %ymm0, %ymm0 # sched: [3:3.00]
4323-
; BTVER2-NEXT: vpermilpd (%rdi), %ymm0, %ymm0 # sched: [8:3.00]
4322+
; BTVER2-NEXT: vpermilpd %ymm1, %ymm0, %ymm0 # sched: [4:3.00]
4323+
; BTVER2-NEXT: vpermilpd (%rdi), %ymm0, %ymm0 # sched: [9:3.00]
43244324
; BTVER2-NEXT: retq # sched: [4:1.00]
43254325
;
43264326
; ZNVER1-LABEL: test_permilvarpd_ymm:
@@ -4380,8 +4380,8 @@ define <4 x float> @test_permilvarps(<4 x float> %a0, <4 x i32> %a1, <4 x i32> *
43804380
;
43814381
; BTVER2-LABEL: test_permilvarps:
43824382
; BTVER2: # %bb.0:
4383-
; BTVER2-NEXT: vpermilps %xmm1, %xmm0, %xmm0 # sched: [2:2.00]
4384-
; BTVER2-NEXT: vpermilps (%rdi), %xmm0, %xmm0 # sched: [7:2.00]
4383+
; BTVER2-NEXT: vpermilps %xmm1, %xmm0, %xmm0 # sched: [3:2.00]
4384+
; BTVER2-NEXT: vpermilps (%rdi), %xmm0, %xmm0 # sched: [8:2.00]
43854385
; BTVER2-NEXT: retq # sched: [4:1.00]
43864386
;
43874387
; ZNVER1-LABEL: test_permilvarps:
@@ -4441,8 +4441,8 @@ define <8 x float> @test_permilvarps_ymm(<8 x float> %a0, <8 x i32> %a1, <8 x i3
44414441
;
44424442
; BTVER2-LABEL: test_permilvarps_ymm:
44434443
; BTVER2: # %bb.0:
4444-
; BTVER2-NEXT: vpermilps %ymm1, %ymm0, %ymm0 # sched: [3:3.00]
4445-
; BTVER2-NEXT: vpermilps (%rdi), %ymm0, %ymm0 # sched: [8:3.00]
4444+
; BTVER2-NEXT: vpermilps %ymm1, %ymm0, %ymm0 # sched: [4:3.00]
4445+
; BTVER2-NEXT: vpermilps (%rdi), %ymm0, %ymm0 # sched: [9:3.00]
44464446
; BTVER2-NEXT: retq # sched: [4:1.00]
44474447
;
44484448
; ZNVER1-LABEL: test_permilvarps_ymm:

test/tools/llvm-mca/X86/BtVer2/resources-avx1.s

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1433,20 +1433,20 @@ vzeroupper
14331433
# CHECK-NEXT: 2 6 1.00 * vperm2f128 $1, (%rax), %ymm1, %ymm2
14341434
# CHECK-NEXT: 1 1 0.50 vpermilpd $1, %xmm0, %xmm2
14351435
# CHECK-NEXT: 1 6 1.00 * vpermilpd $1, (%rax), %xmm2
1436-
# CHECK-NEXT: 3 2 2.00 vpermilpd %xmm0, %xmm1, %xmm2
1437-
# CHECK-NEXT: 3 7 2.00 * vpermilpd (%rax), %xmm1, %xmm2
1436+
# CHECK-NEXT: 3 3 2.00 vpermilpd %xmm0, %xmm1, %xmm2
1437+
# CHECK-NEXT: 3 8 2.00 * vpermilpd (%rax), %xmm1, %xmm2
14381438
# CHECK-NEXT: 2 1 1.00 vpermilpd $1, %ymm0, %ymm2
14391439
# CHECK-NEXT: 2 6 2.00 * vpermilpd $1, (%rax), %ymm2
1440-
# CHECK-NEXT: 6 3 3.00 vpermilpd %ymm0, %ymm1, %ymm2
1441-
# CHECK-NEXT: 6 8 3.00 * vpermilpd (%rax), %ymm1, %ymm2
1440+
# CHECK-NEXT: 6 4 3.00 vpermilpd %ymm0, %ymm1, %ymm2
1441+
# CHECK-NEXT: 6 9 3.00 * vpermilpd (%rax), %ymm1, %ymm2
14421442
# CHECK-NEXT: 1 1 0.50 vpermilps $1, %xmm0, %xmm2
14431443
# CHECK-NEXT: 1 6 1.00 * vpermilps $1, (%rax), %xmm2
1444-
# CHECK-NEXT: 3 2 2.00 vpermilps %xmm0, %xmm1, %xmm2
1445-
# CHECK-NEXT: 3 7 2.00 * vpermilps (%rax), %xmm1, %xmm2
1444+
# CHECK-NEXT: 3 3 2.00 vpermilps %xmm0, %xmm1, %xmm2
1445+
# CHECK-NEXT: 3 8 2.00 * vpermilps (%rax), %xmm1, %xmm2
14461446
# CHECK-NEXT: 2 1 1.00 vpermilps $1, %ymm0, %ymm2
14471447
# CHECK-NEXT: 2 6 2.00 * vpermilps $1, (%rax), %ymm2
1448-
# CHECK-NEXT: 6 3 3.00 vpermilps %ymm0, %ymm1, %ymm2
1449-
# CHECK-NEXT: 6 8 3.00 * vpermilps (%rax), %ymm1, %ymm2
1448+
# CHECK-NEXT: 6 4 3.00 vpermilps %ymm0, %ymm1, %ymm2
1449+
# CHECK-NEXT: 6 9 3.00 * vpermilps (%rax), %ymm1, %ymm2
14501450
# CHECK-NEXT: 1 3 1.00 vpextrb $1, %xmm0, %ecx
14511451
# CHECK-NEXT: 1 3 1.00 * vpextrb $1, %xmm0, (%rax)
14521452
# CHECK-NEXT: 1 3 1.00 vpextrd $1, %xmm0, %ecx

0 commit comments

Comments
 (0)