From 7580a7997ddd38c938708621882b8529aa21ff5c Mon Sep 17 00:00:00 2001 From: Craig Topper Date: Fri, 23 Mar 2018 06:41:40 +0000 Subject: [PATCH] [X86] Change VPSADBW itinerary to SSE_INTALU_ITINS_P to match the SSE version. llvm-svn: 328293 --- llvm/lib/Target/X86/X86InstrSSE.td | 4 +- llvm/test/CodeGen/X86/avx2-schedule.ll | 8 +- llvm/test/CodeGen/X86/sse2-schedule.ll | 8 +- .../tools/llvm-mca/X86/BtVer2/resources-avx1.s | 110 ++++++++++----------- 4 files changed, 65 insertions(+), 65 deletions(-) diff --git a/llvm/lib/Target/X86/X86InstrSSE.td b/llvm/lib/Target/X86/X86InstrSSE.td index acaa190..a054185 100644 --- a/llvm/lib/Target/X86/X86InstrSSE.td +++ b/llvm/lib/Target/X86/X86InstrSSE.td @@ -3817,11 +3817,11 @@ defm PMADDWD : PDI_binop_rm2<0xF5, "pmaddwd", X86vpmaddwd, v4i32, v8i16, VR128, let Predicates = [HasAVX, NoVLX_Or_NoBWI] in defm VPSADBW : PDI_binop_rm2<0xF6, "vpsadbw", X86psadbw, v2i64, v16i8, VR128, - loadv2i64, i128mem, SSE_INTMUL_ITINS_P, 0>, + loadv2i64, i128mem, SSE_INTALU_ITINS_P, 0>, VEX_4V, VEX_WIG; let Predicates = [HasAVX2, NoVLX_Or_NoBWI] in defm VPSADBWY : PDI_binop_rm2<0xF6, "vpsadbw", X86psadbw, v4i64, v32i8, VR256, - loadv4i64, i256mem, SSE_INTMUL_ITINS_P, 0>, + loadv4i64, i256mem, SSE_INTALU_ITINS_P, 0>, VEX_4V, VEX_L, VEX_WIG; let Constraints = "$src1 = $dst" in defm PSADBW : PDI_binop_rm2<0xF6, "psadbw", X86psadbw, v2i64, v16i8, VR128, diff --git a/llvm/test/CodeGen/X86/avx2-schedule.ll b/llvm/test/CodeGen/X86/avx2-schedule.ll index e4e9e1c..b9c5486 100644 --- a/llvm/test/CodeGen/X86/avx2-schedule.ll +++ b/llvm/test/CodeGen/X86/avx2-schedule.ll @@ -5083,8 +5083,8 @@ define <4 x i64> @test_por(<4 x i64> %a0, <4 x i64> %a1, <4 x i64> *%a2) { define <4 x i64> @test_psadbw(<32 x i8> %a0, <32 x i8> %a1, <32 x i8> *%a2) { ; GENERIC-LABEL: test_psadbw: ; GENERIC: # %bb.0: -; GENERIC-NEXT: vpsadbw %ymm1, %ymm0, %ymm0 # sched: [5:1.00] -; GENERIC-NEXT: vpsadbw (%rdi), %ymm0, %ymm0 # sched: [9:1.00] +; GENERIC-NEXT: vpsadbw %ymm1, %ymm0, %ymm0 # sched: [3:1.00] +; GENERIC-NEXT: vpsadbw (%rdi), %ymm0, %ymm0 # sched: [7:1.00] ; GENERIC-NEXT: retq # sched: [1:1.00] ; ; HASWELL-LABEL: test_psadbw: @@ -5113,8 +5113,8 @@ define <4 x i64> @test_psadbw(<32 x i8> %a0, <32 x i8> %a1, <32 x i8> *%a2) { ; ; ZNVER1-LABEL: test_psadbw: ; ZNVER1: # %bb.0: -; ZNVER1-NEXT: vpsadbw %ymm1, %ymm0, %ymm0 # sched: [4:1.00] -; ZNVER1-NEXT: vpsadbw (%rdi), %ymm0, %ymm0 # sched: [11:1.00] +; ZNVER1-NEXT: vpsadbw %ymm1, %ymm0, %ymm0 # sched: [1:0.25] +; ZNVER1-NEXT: vpsadbw (%rdi), %ymm0, %ymm0 # sched: [8:0.50] ; ZNVER1-NEXT: retq # sched: [1:0.50] %1 = call <4 x i64> @llvm.x86.avx2.psad.bw(<32 x i8> %a0, <32 x i8> %a1) %2 = bitcast <4 x i64> %1 to <32 x i8> diff --git a/llvm/test/CodeGen/X86/sse2-schedule.ll b/llvm/test/CodeGen/X86/sse2-schedule.ll index f9d7c99..83e8234 100644 --- a/llvm/test/CodeGen/X86/sse2-schedule.ll +++ b/llvm/test/CodeGen/X86/sse2-schedule.ll @@ -6424,14 +6424,14 @@ define <2 x i64> @test_psadbw(<16 x i8> %a0, <16 x i8> %a1, <16 x i8> *%a2) { ; ; BTVER2-LABEL: test_psadbw: ; BTVER2: # %bb.0: -; BTVER2-NEXT: vpsadbw %xmm1, %xmm0, %xmm0 # sched: [2:1.00] -; BTVER2-NEXT: vpsadbw (%rdi), %xmm0, %xmm0 # sched: [7:1.00] +; BTVER2-NEXT: vpsadbw %xmm1, %xmm0, %xmm0 # sched: [1:0.50] +; BTVER2-NEXT: vpsadbw (%rdi), %xmm0, %xmm0 # sched: [6:1.00] ; BTVER2-NEXT: retq # sched: [4:1.00] ; ; ZNVER1-LABEL: test_psadbw: ; ZNVER1: # %bb.0: -; ZNVER1-NEXT: vpsadbw %xmm1, %xmm0, %xmm0 # sched: [4:1.00] -; ZNVER1-NEXT: vpsadbw (%rdi), %xmm0, %xmm0 # sched: [11:1.00] +; ZNVER1-NEXT: vpsadbw %xmm1, %xmm0, %xmm0 # sched: [1:0.25] +; ZNVER1-NEXT: vpsadbw (%rdi), %xmm0, %xmm0 # sched: [8:0.50] ; ZNVER1-NEXT: retq # sched: [1:0.50] %1 = call <2 x i64> @llvm.x86.sse2.psad.bw(<16 x i8> %a0, <16 x i8> %a1) %2 = bitcast <2 x i64> %1 to <16 x i8> diff --git a/llvm/test/tools/llvm-mca/X86/BtVer2/resources-avx1.s b/llvm/test/tools/llvm-mca/X86/BtVer2/resources-avx1.s index c7767cf..8f1270f 100644 --- a/llvm/test/tools/llvm-mca/X86/BtVer2/resources-avx1.s +++ b/llvm/test/tools/llvm-mca/X86/BtVer2/resources-avx1.s @@ -1524,65 +1524,65 @@ vzeroupper # CHECK-NEXT: - - - - - 1.00 - - - - - - - 1.00 vpmuludq %xmm0, %xmm1, %xmm2 # CHECK-NEXT: - - - - - 1.00 - 1.00 - - - - - 1.00 vpmuludq (%rax), %xmm1, %xmm2 # CHECK-NEXT: - - - - - - 1.00 - - - - - 1.00 - vpor %xmm0, %xmm1, %xmm2 -# CHECK-NEXT: - - - - - - 1.00 1.00 - - - 1.00 - - vpor (%rax), %xmm1, %xmm2 -# CHECK-NEXT: - - - - - 1.00 - - - - - - - 1.00 vpsadbw %xmm0, %xmm1, %xmm2 -# CHECK-NEXT: - - - - - 1.00 - 1.00 - - - - - 1.00 vpsadbw (%rax), %xmm1, %xmm2 +# CHECK-NEXT: - - - - - - 1.00 1.00 - - - - 1.00 - vpor (%rax), %xmm1, %xmm2 +# CHECK-NEXT: - - - - - - 1.00 - - - - 1.00 - - vpsadbw %xmm0, %xmm1, %xmm2 +# CHECK-NEXT: - - - - - - 1.00 1.00 - - - - 1.00 - vpsadbw (%rax), %xmm1, %xmm2 # CHECK-NEXT: - - - - - - 4.00 - - - - - - - vpshufb %xmm0, %xmm1, %xmm2 # CHECK-NEXT: - - - - - - 4.00 1.00 - - - - - - vpshufb (%rax), %xmm1, %xmm2 -# CHECK-NEXT: - - - - - - 1.00 - - - - - 1.00 - vpshufd $1, %xmm0, %xmm2 +# CHECK-NEXT: - - - - - - 1.00 - - - - 1.00 - - vpshufd $1, %xmm0, %xmm2 # CHECK-NEXT: - - - - - 1.00 - 1.00 - - - 1.00 - - vpshufd $1, (%rax), %xmm2 -# CHECK-NEXT: - - - - - 1.00 - - - - - - 1.00 - vpshufhw $1, %xmm0, %xmm2 -# CHECK-NEXT: - - - - - - 1.00 1.00 - - - 1.00 - - vpshufhw $1, (%rax), %xmm2 +# CHECK-NEXT: - - - - - 1.00 - - - - - 1.00 - - vpshufhw $1, %xmm0, %xmm2 +# CHECK-NEXT: - - - - - 1.00 - 1.00 - - - - 1.00 - vpshufhw $1, (%rax), %xmm2 # CHECK-NEXT: - - - - - 1.00 - - - - - - 1.00 - vpshuflw $1, %xmm0, %xmm2 -# CHECK-NEXT: - - - - - - 1.00 1.00 - - - 1.00 - - vpshuflw $1, (%rax), %xmm2 -# CHECK-NEXT: - - - - - 1.00 - - - - - - 1.00 - vpsignb %xmm0, %xmm1, %xmm2 -# CHECK-NEXT: - - - - - - 1.00 1.00 - - - 1.00 - - vpsignb (%rax), %xmm1, %xmm2 -# CHECK-NEXT: - - - - - 1.00 - - - - - - 1.00 - vpsignd %xmm0, %xmm1, %xmm2 -# CHECK-NEXT: - - - - - - 1.00 1.00 - - - 1.00 - - vpsignd (%rax), %xmm1, %xmm2 -# CHECK-NEXT: - - - - - 1.00 - - - - - - 1.00 - vpsignw %xmm0, %xmm1, %xmm2 -# CHECK-NEXT: - - - - - - 1.00 1.00 - - - 1.00 - - vpsignw (%rax), %xmm1, %xmm2 -# CHECK-NEXT: - - - - - 1.00 - - - - - - 1.00 - vpslld $1, %xmm0, %xmm2 -# CHECK-NEXT: - - - - - - 1.00 - - - - 1.00 - - vpslld %xmm0, %xmm1, %xmm2 -# CHECK-NEXT: - - - - - 1.00 - 1.00 - - - - 1.00 - vpslld (%rax), %xmm1, %xmm2 -# CHECK-NEXT: - - - - - - 1.00 - - - - 1.00 - - vpslldq $1, %xmm1, %xmm2 -# CHECK-NEXT: - - - - - 1.00 - - - - - - 1.00 - vpsllq $1, %xmm0, %xmm2 -# CHECK-NEXT: - - - - - - 1.00 - - - - 1.00 - - vpsllq %xmm0, %xmm1, %xmm2 -# CHECK-NEXT: - - - - - 1.00 - 1.00 - - - - 1.00 - vpsllq (%rax), %xmm1, %xmm2 -# CHECK-NEXT: - - - - - - 1.00 - - - - 1.00 - - vpsllw $1, %xmm0, %xmm2 -# CHECK-NEXT: - - - - - 1.00 - - - - - - 1.00 - vpsllw %xmm0, %xmm1, %xmm2 -# CHECK-NEXT: - - - - - - 1.00 1.00 - - - 1.00 - - vpsllw (%rax), %xmm1, %xmm2 -# CHECK-NEXT: - - - - - 1.00 - - - - - - 1.00 - vpsrad $1, %xmm0, %xmm2 -# CHECK-NEXT: - - - - - - 1.00 - - - - 1.00 - - vpsrad %xmm0, %xmm1, %xmm2 -# CHECK-NEXT: - - - - - 1.00 - 1.00 - - - - 1.00 - vpsrad (%rax), %xmm1, %xmm2 -# CHECK-NEXT: - - - - - - 1.00 - - - - 1.00 - - vpsraw $1, %xmm0, %xmm2 -# CHECK-NEXT: - - - - - 1.00 - - - - - - 1.00 - vpsraw %xmm0, %xmm1, %xmm2 -# CHECK-NEXT: - - - - - - 1.00 1.00 - - - 1.00 - - vpsraw (%rax), %xmm1, %xmm2 -# CHECK-NEXT: - - - - - 1.00 - - - - - - 1.00 - vpsrld $1, %xmm0, %xmm2 -# CHECK-NEXT: - - - - - - 1.00 - - - - 1.00 - - vpsrld %xmm0, %xmm1, %xmm2 -# CHECK-NEXT: - - - - - 1.00 - 1.00 - - - - 1.00 - vpsrld (%rax), %xmm1, %xmm2 -# CHECK-NEXT: - - - - - - 1.00 - - - - 1.00 - - vpsrldq $1, %xmm1, %xmm2 -# CHECK-NEXT: - - - - - 1.00 - - - - - - 1.00 - vpsrlq $1, %xmm0, %xmm2 -# CHECK-NEXT: - - - - - - 1.00 - - - - 1.00 - - vpsrlq %xmm0, %xmm1, %xmm2 -# CHECK-NEXT: - - - - - 1.00 - 1.00 - - - - 1.00 - vpsrlq (%rax), %xmm1, %xmm2 -# CHECK-NEXT: - - - - - - 1.00 - - - - 1.00 - - vpsrlw $1, %xmm0, %xmm2 -# CHECK-NEXT: - - - - - 1.00 - - - - - - 1.00 - vpsrlw %xmm0, %xmm1, %xmm2 -# CHECK-NEXT: - - - - - - 1.00 1.00 - - - 1.00 - - vpsrlw (%rax), %xmm1, %xmm2 -# CHECK-NEXT: - - - - - 1.00 - - - - - - 1.00 - vpsubb %xmm0, %xmm1, %xmm2 -# CHECK-NEXT: - - - - - - 1.00 1.00 - - - 1.00 - - vpsubb (%rax), %xmm1, %xmm2 -# CHECK-NEXT: - - - - - 1.00 - - - - - - 1.00 - vpsubd %xmm0, %xmm1, %xmm2 -# CHECK-NEXT: - - - - - - 1.00 1.00 - - - 1.00 - - vpsubd (%rax), %xmm1, %xmm2 -# CHECK-NEXT: - - - - - 1.00 - - - - - - 1.00 - vpsubq %xmm0, %xmm1, %xmm2 -# CHECK-NEXT: - - - - - - 1.00 1.00 - - - 1.00 - - vpsubq (%rax), %xmm1, %xmm2 -# CHECK-NEXT: - - - - - 1.00 - - - - - - 1.00 - vpsubsb %xmm0, %xmm1, %xmm2 -# CHECK-NEXT: - - - - - - 1.00 1.00 - - - 1.00 - - vpsubsb (%rax), %xmm1, %xmm2 -# CHECK-NEXT: - - - - - 1.00 - - - - - - 1.00 - vpsubsw %xmm0, %xmm1, %xmm2 -# CHECK-NEXT: - - - - - - 1.00 1.00 - - - 1.00 - - vpsubsw (%rax), %xmm1, %xmm2 -# CHECK-NEXT: - - - - - 1.00 - - - - - - 1.00 - vpsubusb %xmm0, %xmm1, %xmm2 -# CHECK-NEXT: - - - - - - 1.00 1.00 - - - 1.00 - - vpsubusb (%rax), %xmm1, %xmm2 -# CHECK-NEXT: - - - - - 1.00 - - - - - - 1.00 - vpsubusw %xmm0, %xmm1, %xmm2 -# CHECK-NEXT: - - - - - - 1.00 1.00 - - - 1.00 - - vpsubusw (%rax), %xmm1, %xmm2 -# CHECK-NEXT: - - - - - 1.00 - - - - - - 1.00 - vpsubw %xmm0, %xmm1, %xmm2 -# CHECK-NEXT: - - - - - - 1.00 1.00 - - - 1.00 - - vpsubw (%rax), %xmm1, %xmm2 +# CHECK-NEXT: - - - - - 1.00 - 1.00 - - - 1.00 - - vpshuflw $1, (%rax), %xmm2 +# CHECK-NEXT: - - - - - - 1.00 - - - - - 1.00 - vpsignb %xmm0, %xmm1, %xmm2 +# CHECK-NEXT: - - - - - 1.00 - 1.00 - - - 1.00 - - vpsignb (%rax), %xmm1, %xmm2 +# CHECK-NEXT: - - - - - - 1.00 - - - - - 1.00 - vpsignd %xmm0, %xmm1, %xmm2 +# CHECK-NEXT: - - - - - 1.00 - 1.00 - - - 1.00 - - vpsignd (%rax), %xmm1, %xmm2 +# CHECK-NEXT: - - - - - - 1.00 - - - - - 1.00 - vpsignw %xmm0, %xmm1, %xmm2 +# CHECK-NEXT: - - - - - 1.00 - 1.00 - - - 1.00 - - vpsignw (%rax), %xmm1, %xmm2 +# CHECK-NEXT: - - - - - - 1.00 - - - - - 1.00 - vpslld $1, %xmm0, %xmm2 +# CHECK-NEXT: - - - - - 1.00 - - - - - 1.00 - - vpslld %xmm0, %xmm1, %xmm2 +# CHECK-NEXT: - - - - - - 1.00 1.00 - - - - 1.00 - vpslld (%rax), %xmm1, %xmm2 +# CHECK-NEXT: - - - - - 1.00 - - - - - 1.00 - - vpslldq $1, %xmm1, %xmm2 +# CHECK-NEXT: - - - - - - 1.00 - - - - - 1.00 - vpsllq $1, %xmm0, %xmm2 +# CHECK-NEXT: - - - - - 1.00 - - - - - 1.00 - - vpsllq %xmm0, %xmm1, %xmm2 +# CHECK-NEXT: - - - - - - 1.00 1.00 - - - - 1.00 - vpsllq (%rax), %xmm1, %xmm2 +# CHECK-NEXT: - - - - - 1.00 - - - - - 1.00 - - vpsllw $1, %xmm0, %xmm2 +# CHECK-NEXT: - - - - - - 1.00 - - - - - 1.00 - vpsllw %xmm0, %xmm1, %xmm2 +# CHECK-NEXT: - - - - - 1.00 - 1.00 - - - 1.00 - - vpsllw (%rax), %xmm1, %xmm2 +# CHECK-NEXT: - - - - - - 1.00 - - - - - 1.00 - vpsrad $1, %xmm0, %xmm2 +# CHECK-NEXT: - - - - - 1.00 - - - - - 1.00 - - vpsrad %xmm0, %xmm1, %xmm2 +# CHECK-NEXT: - - - - - - 1.00 1.00 - - - - 1.00 - vpsrad (%rax), %xmm1, %xmm2 +# CHECK-NEXT: - - - - - 1.00 - - - - - 1.00 - - vpsraw $1, %xmm0, %xmm2 +# CHECK-NEXT: - - - - - - 1.00 - - - - - 1.00 - vpsraw %xmm0, %xmm1, %xmm2 +# CHECK-NEXT: - - - - - 1.00 - 1.00 - - - 1.00 - - vpsraw (%rax), %xmm1, %xmm2 +# CHECK-NEXT: - - - - - - 1.00 - - - - - 1.00 - vpsrld $1, %xmm0, %xmm2 +# CHECK-NEXT: - - - - - 1.00 - - - - - 1.00 - - vpsrld %xmm0, %xmm1, %xmm2 +# CHECK-NEXT: - - - - - - 1.00 1.00 - - - - 1.00 - vpsrld (%rax), %xmm1, %xmm2 +# CHECK-NEXT: - - - - - 1.00 - - - - - 1.00 - - vpsrldq $1, %xmm1, %xmm2 +# CHECK-NEXT: - - - - - - 1.00 - - - - - 1.00 - vpsrlq $1, %xmm0, %xmm2 +# CHECK-NEXT: - - - - - 1.00 - - - - - 1.00 - - vpsrlq %xmm0, %xmm1, %xmm2 +# CHECK-NEXT: - - - - - - 1.00 1.00 - - - - 1.00 - vpsrlq (%rax), %xmm1, %xmm2 +# CHECK-NEXT: - - - - - 1.00 - - - - - 1.00 - - vpsrlw $1, %xmm0, %xmm2 +# CHECK-NEXT: - - - - - - 1.00 - - - - - 1.00 - vpsrlw %xmm0, %xmm1, %xmm2 +# CHECK-NEXT: - - - - - 1.00 - 1.00 - - - 1.00 - - vpsrlw (%rax), %xmm1, %xmm2 +# CHECK-NEXT: - - - - - - 1.00 - - - - - 1.00 - vpsubb %xmm0, %xmm1, %xmm2 +# CHECK-NEXT: - - - - - 1.00 - 1.00 - - - 1.00 - - vpsubb (%rax), %xmm1, %xmm2 +# CHECK-NEXT: - - - - - - 1.00 - - - - - 1.00 - vpsubd %xmm0, %xmm1, %xmm2 +# CHECK-NEXT: - - - - - 1.00 - 1.00 - - - 1.00 - - vpsubd (%rax), %xmm1, %xmm2 +# CHECK-NEXT: - - - - - - 1.00 - - - - - 1.00 - vpsubq %xmm0, %xmm1, %xmm2 +# CHECK-NEXT: - - - - - 1.00 - 1.00 - - - 1.00 - - vpsubq (%rax), %xmm1, %xmm2 +# CHECK-NEXT: - - - - - - 1.00 - - - - - 1.00 - vpsubsb %xmm0, %xmm1, %xmm2 +# CHECK-NEXT: - - - - - 1.00 - 1.00 - - - 1.00 - - vpsubsb (%rax), %xmm1, %xmm2 +# CHECK-NEXT: - - - - - - 1.00 - - - - - 1.00 - vpsubsw %xmm0, %xmm1, %xmm2 +# CHECK-NEXT: - - - - - 1.00 - 1.00 - - - 1.00 - - vpsubsw (%rax), %xmm1, %xmm2 +# CHECK-NEXT: - - - - - - 1.00 - - - - - 1.00 - vpsubusb %xmm0, %xmm1, %xmm2 +# CHECK-NEXT: - - - - - 1.00 - 1.00 - - - 1.00 - - vpsubusb (%rax), %xmm1, %xmm2 +# CHECK-NEXT: - - - - - - 1.00 - - - - - 1.00 - vpsubusw %xmm0, %xmm1, %xmm2 +# CHECK-NEXT: - - - - - 1.00 - 1.00 - - - 1.00 - - vpsubusw (%rax), %xmm1, %xmm2 +# CHECK-NEXT: - - - - - - 1.00 - - - - - 1.00 - vpsubw %xmm0, %xmm1, %xmm2 +# CHECK-NEXT: - - - - - 1.00 - 1.00 - - - 1.00 - - vpsubw (%rax), %xmm1, %xmm2 # CHECK-NEXT: - - - - - 1.00 - - - - - - - - vptest %xmm0, %xmm1 # CHECK-NEXT: - - - - - 1.00 - 1.00 - - - - - - vptest (%rax), %xmm1 # CHECK-NEXT: - - - - - 2.00 2.00 - - - - - - - vptest %ymm0, %ymm1 -- 2.7.4