From 4ed0763c6c29d306d8279f61329652b5b4d8ee9d Mon Sep 17 00:00:00 2001 From: Simon Pilgrim Date: Fri, 28 Sep 2018 13:19:22 +0000 Subject: [PATCH] [X86][Btver2] CVTSS2I/CVTSD2I - add missing JFPU0 pipe We issue JFPU1->JSTC then JFPU0->JFPA then -> JALU0 (integer pipe) Match AMD Fam16h SOG + llvm-exegesis tests llvm-svn: 343314 --- lib/Target/X86/X86ScheduleBtVer2.td | 4 +-- .../llvm-mca/X86/BtVer2/resources-avx1.s | 34 +++++++++---------- .../llvm-mca/X86/BtVer2/resources-sse1.s | 18 +++++----- .../llvm-mca/X86/BtVer2/resources-sse2.s | 18 +++++----- 4 files changed, 37 insertions(+), 37 deletions(-) diff --git a/lib/Target/X86/X86ScheduleBtVer2.td b/lib/Target/X86/X86ScheduleBtVer2.td index 578e43c6363..649d706b1b0 100644 --- a/lib/Target/X86/X86ScheduleBtVer2.td +++ b/lib/Target/X86/X86ScheduleBtVer2.td @@ -392,11 +392,11 @@ defm : X86WriteResPairUnsupported; // Conversions. //////////////////////////////////////////////////////////////////////////////// -defm : JWriteResFpuPair; +defm : JWriteResFpuPair; defm : JWriteResFpuPair; defm : JWriteResYMMPair; defm : X86WriteResPairUnsupported; -defm : JWriteResFpuPair; +defm : JWriteResFpuPair; defm : JWriteResFpuPair; defm : JWriteResYMMPair; defm : X86WriteResPairUnsupported; diff --git a/test/tools/llvm-mca/X86/BtVer2/resources-avx1.s b/test/tools/llvm-mca/X86/BtVer2/resources-avx1.s index 0cd13649168..f74baecbb73 100644 --- a/test/tools/llvm-mca/X86/BtVer2/resources-avx1.s +++ b/test/tools/llvm-mca/X86/BtVer2/resources-avx1.s @@ -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 - - 357.00 915.00 403.50 425.50 382.00 - 43.00 132.00 119.50 119.50 38.00 +# CHECK-NEXT: 48.00 - - 357.00 915.00 419.50 425.50 382.00 - 43.00 132.00 119.50 119.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: @@ -1832,10 +1832,10 @@ vzeroupper # CHECK-NEXT: - - - - - - 1.00 1.00 - - 1.00 - - - vcvtps2pd (%rax), %xmm2 # CHECK-NEXT: - - - - - - 2.00 - - - 2.00 - - - vcvtps2pd %xmm0, %ymm2 # CHECK-NEXT: - - - - - - 2.00 2.00 - - 2.00 - - - vcvtps2pd (%rax), %ymm2 -# CHECK-NEXT: 1.00 - - 1.00 - - 1.00 - - - 1.00 - - - vcvtsd2si %xmm0, %ecx -# CHECK-NEXT: 1.00 - - 1.00 - - 1.00 - - - 1.00 - - - vcvtsd2si %xmm0, %rcx -# CHECK-NEXT: 1.00 - - 1.00 - - 1.00 1.00 - - 1.00 - - - vcvtsd2si (%rax), %ecx -# CHECK-NEXT: 1.00 - - 1.00 - - 1.00 1.00 - - 1.00 - - - vcvtsd2si (%rax), %rcx +# CHECK-NEXT: 1.00 - - 1.00 - 1.00 1.00 - - - 1.00 - - - vcvtsd2si %xmm0, %ecx +# CHECK-NEXT: 1.00 - - 1.00 - 1.00 1.00 - - - 1.00 - - - vcvtsd2si %xmm0, %rcx +# CHECK-NEXT: 1.00 - - 1.00 - 1.00 1.00 1.00 - - 1.00 - - - vcvtsd2si (%rax), %ecx +# CHECK-NEXT: 1.00 - - 1.00 - 1.00 1.00 1.00 - - 1.00 - - - vcvtsd2si (%rax), %rcx # CHECK-NEXT: - - - - - - 1.00 - - - 2.00 - - - vcvtsd2ss %xmm0, %xmm1, %xmm2 # CHECK-NEXT: - - - - - - 1.00 1.00 - - 2.00 - - - vcvtsd2ss (%rax), %xmm1, %xmm2 # CHECK-NEXT: - - - - - - 1.00 - - - 1.00 - - - vcvtsi2sdl %ecx, %xmm0, %xmm2 @@ -1848,10 +1848,10 @@ vzeroupper # CHECK-NEXT: - - - - - - 1.00 1.00 - - 1.00 - - - vcvtsi2ssq (%rax), %xmm0, %xmm2 # CHECK-NEXT: - - - - - - 1.00 - - - 2.00 - - - vcvtss2sd %xmm0, %xmm1, %xmm2 # CHECK-NEXT: - - - - - - 1.00 1.00 - - 2.00 - - - vcvtss2sd (%rax), %xmm1, %xmm2 -# CHECK-NEXT: 1.00 - - 1.00 - - 1.00 - - - 1.00 - - - vcvtss2si %xmm0, %ecx -# CHECK-NEXT: 1.00 - - 1.00 - - 1.00 - - - 1.00 - - - vcvtss2si %xmm0, %rcx -# CHECK-NEXT: 1.00 - - 1.00 - - 1.00 1.00 - - 1.00 - - - vcvtss2si (%rax), %ecx -# CHECK-NEXT: 1.00 - - 1.00 - - 1.00 1.00 - - 1.00 - - - vcvtss2si (%rax), %rcx +# CHECK-NEXT: 1.00 - - 1.00 - 1.00 1.00 - - - 1.00 - - - vcvtss2si %xmm0, %ecx +# CHECK-NEXT: 1.00 - - 1.00 - 1.00 1.00 - - - 1.00 - - - vcvtss2si %xmm0, %rcx +# CHECK-NEXT: 1.00 - - 1.00 - 1.00 1.00 1.00 - - 1.00 - - - vcvtss2si (%rax), %ecx +# CHECK-NEXT: 1.00 - - 1.00 - 1.00 1.00 1.00 - - 1.00 - - - vcvtss2si (%rax), %rcx # CHECK-NEXT: - - - - - - 1.00 - - - 1.00 - - - vcvttpd2dq %xmm0, %xmm2 # CHECK-NEXT: - - - - - - 1.00 1.00 - - 1.00 - - - vcvttpd2dqx (%rax), %xmm2 # CHECK-NEXT: - - - 2.00 2.00 - 2.00 - - - 2.00 - - - vcvttpd2dq %ymm0, %xmm2 @@ -1860,14 +1860,14 @@ vzeroupper # CHECK-NEXT: - - - - - - 1.00 1.00 - - 1.00 - - - vcvttps2dq (%rax), %xmm2 # CHECK-NEXT: - - - - - - 2.00 - - - 2.00 - - - vcvttps2dq %ymm0, %ymm2 # CHECK-NEXT: - - - - - - 2.00 2.00 - - 2.00 - - - vcvttps2dq (%rax), %ymm2 -# CHECK-NEXT: 1.00 - - 1.00 - - 1.00 - - - 1.00 - - - vcvttsd2si %xmm0, %ecx -# CHECK-NEXT: 1.00 - - 1.00 - - 1.00 - - - 1.00 - - - vcvttsd2si %xmm0, %rcx -# CHECK-NEXT: 1.00 - - 1.00 - - 1.00 1.00 - - 1.00 - - - vcvttsd2si (%rax), %ecx -# CHECK-NEXT: 1.00 - - 1.00 - - 1.00 1.00 - - 1.00 - - - vcvttsd2si (%rax), %rcx -# CHECK-NEXT: 1.00 - - 1.00 - - 1.00 - - - 1.00 - - - vcvttss2si %xmm0, %ecx -# CHECK-NEXT: 1.00 - - 1.00 - - 1.00 - - - 1.00 - - - vcvttss2si %xmm0, %rcx -# CHECK-NEXT: 1.00 - - 1.00 - - 1.00 1.00 - - 1.00 - - - vcvttss2si (%rax), %ecx -# CHECK-NEXT: 1.00 - - 1.00 - - 1.00 1.00 - - 1.00 - - - vcvttss2si (%rax), %rcx +# CHECK-NEXT: 1.00 - - 1.00 - 1.00 1.00 - - - 1.00 - - - vcvttsd2si %xmm0, %ecx +# CHECK-NEXT: 1.00 - - 1.00 - 1.00 1.00 - - - 1.00 - - - vcvttsd2si %xmm0, %rcx +# CHECK-NEXT: 1.00 - - 1.00 - 1.00 1.00 1.00 - - 1.00 - - - vcvttsd2si (%rax), %ecx +# CHECK-NEXT: 1.00 - - 1.00 - 1.00 1.00 1.00 - - 1.00 - - - vcvttsd2si (%rax), %rcx +# CHECK-NEXT: 1.00 - - 1.00 - 1.00 1.00 - - - 1.00 - - - vcvttss2si %xmm0, %ecx +# CHECK-NEXT: 1.00 - - 1.00 - 1.00 1.00 - - - 1.00 - - - vcvttss2si %xmm0, %rcx +# CHECK-NEXT: 1.00 - - 1.00 - 1.00 1.00 1.00 - - 1.00 - - - vcvttss2si (%rax), %ecx +# CHECK-NEXT: 1.00 - - 1.00 - 1.00 1.00 1.00 - - 1.00 - - - vcvttss2si (%rax), %rcx # CHECK-NEXT: - - - - 19.00 - 1.00 - - - - - - - vdivpd %xmm0, %xmm1, %xmm2 # CHECK-NEXT: - - - - 19.00 - 1.00 1.00 - - - - - - vdivpd (%rax), %xmm1, %xmm2 # CHECK-NEXT: - - - - 38.00 - 2.00 - - - - - - - vdivpd %ymm0, %ymm1, %ymm2 diff --git a/test/tools/llvm-mca/X86/BtVer2/resources-sse1.s b/test/tools/llvm-mca/X86/BtVer2/resources-sse1.s index c2fac8cf8ec..ef20da259ca 100644 --- a/test/tools/llvm-mca/X86/BtVer2/resources-sse1.s +++ b/test/tools/llvm-mca/X86/BtVer2/resources-sse1.s @@ -337,7 +337,7 @@ xorps (%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: 15.00 - - 47.00 184.00 50.50 66.50 58.00 - 9.00 25.00 9.50 9.50 2.00 +# CHECK-NEXT: 15.00 - - 47.00 184.00 58.50 66.50 58.00 - 9.00 25.00 9.50 9.50 2.00 # CHECK: Resource pressure by instruction: # CHECK-NEXT: [0] [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] Instructions: @@ -363,16 +363,16 @@ xorps (%rax), %xmm2 # CHECK-NEXT: - - - - - - 1.00 - - - 1.00 - - - cvtsi2ssq %rcx, %xmm2 # CHECK-NEXT: - - - - - - 1.00 1.00 - - 1.00 - - - cvtsi2ssl (%rax), %xmm2 # CHECK-NEXT: - - - - - - 1.00 1.00 - - 1.00 - - - cvtsi2ssl (%rax), %xmm2 -# CHECK-NEXT: 1.00 - - 1.00 - - 1.00 - - - 1.00 - - - cvtss2si %xmm0, %ecx -# CHECK-NEXT: 1.00 - - 1.00 - - 1.00 - - - 1.00 - - - cvtss2si %xmm0, %rcx -# CHECK-NEXT: 1.00 - - 1.00 - - 1.00 1.00 - - 1.00 - - - cvtss2si (%rax), %ecx -# CHECK-NEXT: 1.00 - - 1.00 - - 1.00 1.00 - - 1.00 - - - cvtss2si (%rax), %rcx +# CHECK-NEXT: 1.00 - - 1.00 - 1.00 1.00 - - - 1.00 - - - cvtss2si %xmm0, %ecx +# CHECK-NEXT: 1.00 - - 1.00 - 1.00 1.00 - - - 1.00 - - - cvtss2si %xmm0, %rcx +# CHECK-NEXT: 1.00 - - 1.00 - 1.00 1.00 1.00 - - 1.00 - - - cvtss2si (%rax), %ecx +# CHECK-NEXT: 1.00 - - 1.00 - 1.00 1.00 1.00 - - 1.00 - - - cvtss2si (%rax), %rcx # CHECK-NEXT: - - - - - - 1.00 - - - 1.00 - - - cvttps2pi %xmm0, %mm2 # CHECK-NEXT: - - - - - - 1.00 1.00 - - 1.00 - - - cvttps2pi (%rax), %mm2 -# CHECK-NEXT: 1.00 - - 1.00 - - 1.00 - - - 1.00 - - - cvttss2si %xmm0, %ecx -# CHECK-NEXT: 1.00 - - 1.00 - - 1.00 - - - 1.00 - - - cvttss2si %xmm0, %rcx -# CHECK-NEXT: 1.00 - - 1.00 - - 1.00 1.00 - - 1.00 - - - cvttss2si (%rax), %ecx -# CHECK-NEXT: 1.00 - - 1.00 - - 1.00 1.00 - - 1.00 - - - cvttss2si (%rax), %rcx +# CHECK-NEXT: 1.00 - - 1.00 - 1.00 1.00 - - - 1.00 - - - cvttss2si %xmm0, %ecx +# CHECK-NEXT: 1.00 - - 1.00 - 1.00 1.00 - - - 1.00 - - - cvttss2si %xmm0, %rcx +# CHECK-NEXT: 1.00 - - 1.00 - 1.00 1.00 1.00 - - 1.00 - - - cvttss2si (%rax), %ecx +# CHECK-NEXT: 1.00 - - 1.00 - 1.00 1.00 1.00 - - 1.00 - - - cvttss2si (%rax), %rcx # CHECK-NEXT: - - - - 19.00 - 1.00 - - - - - - - divps %xmm0, %xmm2 # CHECK-NEXT: - - - - 19.00 - 1.00 1.00 - - - - - - divps (%rax), %xmm2 # CHECK-NEXT: - - - - 19.00 - 1.00 - - - - - - - divss %xmm0, %xmm2 diff --git a/test/tools/llvm-mca/X86/BtVer2/resources-sse2.s b/test/tools/llvm-mca/X86/BtVer2/resources-sse2.s index dca7b7f6a86..13f1966cf5b 100644 --- a/test/tools/llvm-mca/X86/BtVer2/resources-sse2.s +++ b/test/tools/llvm-mca/X86/BtVer2/resources-sse2.s @@ -685,7 +685,7 @@ xorpd (%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: 17.00 - - 49.00 204.00 119.50 140.50 117.00 - 15.00 54.00 66.50 66.50 12.00 +# CHECK-NEXT: 17.00 - - 49.00 204.00 127.50 140.50 117.00 - 15.00 54.00 66.50 66.50 12.00 # CHECK: Resource pressure by instruction: # CHECK-NEXT: [0] [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] Instructions: @@ -720,10 +720,10 @@ xorpd (%rax), %xmm2 # CHECK-NEXT: - - - - - - 1.00 1.00 - - 1.00 - - - cvtps2dq (%rax), %xmm2 # CHECK-NEXT: - - - - - - 1.00 - - - 1.00 - - - cvtps2pd %xmm0, %xmm2 # CHECK-NEXT: - - - - - - 1.00 1.00 - - 1.00 - - - cvtps2pd (%rax), %xmm2 -# CHECK-NEXT: 1.00 - - 1.00 - - 1.00 - - - 1.00 - - - cvtsd2si %xmm0, %ecx -# CHECK-NEXT: 1.00 - - 1.00 - - 1.00 - - - 1.00 - - - cvtsd2si %xmm0, %rcx -# CHECK-NEXT: 1.00 - - 1.00 - - 1.00 1.00 - - 1.00 - - - cvtsd2si (%rax), %ecx -# CHECK-NEXT: 1.00 - - 1.00 - - 1.00 1.00 - - 1.00 - - - cvtsd2si (%rax), %rcx +# CHECK-NEXT: 1.00 - - 1.00 - 1.00 1.00 - - - 1.00 - - - cvtsd2si %xmm0, %ecx +# CHECK-NEXT: 1.00 - - 1.00 - 1.00 1.00 - - - 1.00 - - - cvtsd2si %xmm0, %rcx +# CHECK-NEXT: 1.00 - - 1.00 - 1.00 1.00 1.00 - - 1.00 - - - cvtsd2si (%rax), %ecx +# CHECK-NEXT: 1.00 - - 1.00 - 1.00 1.00 1.00 - - 1.00 - - - cvtsd2si (%rax), %rcx # CHECK-NEXT: - - - - - - 1.00 - - - 2.00 - - - cvtsd2ss %xmm0, %xmm2 # CHECK-NEXT: - - - - - - 1.00 1.00 - - 2.00 - - - cvtsd2ss (%rax), %xmm2 # CHECK-NEXT: - - - - - - 1.00 - - - 1.00 - - - cvtsi2sdl %ecx, %xmm2 @@ -738,10 +738,10 @@ xorpd (%rax), %xmm2 # CHECK-NEXT: - - - - - - 1.00 1.00 - - 1.00 - - - cvttpd2pi (%rax), %mm2 # CHECK-NEXT: - - - - - - 1.00 - - - 1.00 - - - cvttps2dq %xmm0, %xmm2 # CHECK-NEXT: - - - - - - 1.00 1.00 - - 1.00 - - - cvttps2dq (%rax), %xmm2 -# CHECK-NEXT: 1.00 - - 1.00 - - 1.00 - - - 1.00 - - - cvttsd2si %xmm0, %ecx -# CHECK-NEXT: 1.00 - - 1.00 - - 1.00 - - - 1.00 - - - cvttsd2si %xmm0, %rcx -# CHECK-NEXT: 1.00 - - 1.00 - - 1.00 1.00 - - 1.00 - - - cvttsd2si (%rax), %ecx -# CHECK-NEXT: 1.00 - - 1.00 - - 1.00 1.00 - - 1.00 - - - cvttsd2si (%rax), %rcx +# CHECK-NEXT: 1.00 - - 1.00 - 1.00 1.00 - - - 1.00 - - - cvttsd2si %xmm0, %ecx +# CHECK-NEXT: 1.00 - - 1.00 - 1.00 1.00 - - - 1.00 - - - cvttsd2si %xmm0, %rcx +# CHECK-NEXT: 1.00 - - 1.00 - 1.00 1.00 1.00 - - 1.00 - - - cvttsd2si (%rax), %ecx +# CHECK-NEXT: 1.00 - - 1.00 - 1.00 1.00 1.00 - - 1.00 - - - cvttsd2si (%rax), %rcx # CHECK-NEXT: - - - - 19.00 - 1.00 - - - - - - - divpd %xmm0, %xmm2 # CHECK-NEXT: - - - - 19.00 - 1.00 1.00 - - - - - - divpd (%rax), %xmm2 # CHECK-NEXT: - - - - 19.00 - 1.00 - - - - - - - divsd %xmm0, %xmm2