Skip to content

Commit

Permalink
[X86][SLM] Fix uops for PCLMULQDQ
Browse files Browse the repository at this point in the history
Based off a recent llvm-exegesis capture and what Intel AoM / Agner reports as well.
  • Loading branch information
RKSimon committed Oct 17, 2021
1 parent 498c723 commit 680afaa
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion llvm/lib/Target/X86/X86ScheduleSLM.td
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,7 @@ defm : SLMWriteResPair<WriteAESIMC, [SLM_FPC_RSV0], 8, [5]>;
defm : SLMWriteResPair<WriteAESKeyGen, [SLM_FPC_RSV0], 8, [5]>;

// Carry-less multiplication instructions.
defm : SLMWriteResPair<WriteCLMul, [SLM_FPC_RSV0], 10, [10]>;
defm : SLMWriteResPair<WriteCLMul, [SLM_FPC_RSV0], 10, [10], 8, 1>;

def : WriteRes<WriteSystem, [SLM_FPC_RSV0]> { let Latency = 100; }
def : WriteRes<WriteMicrocoded, [SLM_FPC_RSV0]> { let Latency = 100; }
Expand Down
4 changes: 2 additions & 2 deletions llvm/test/tools/llvm-mca/X86/SLM/resources-pclmul.s
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ pclmulqdq $11, (%rax), %xmm2
# CHECK-NEXT: [6]: HasSideEffects (U)

# CHECK: [1] [2] [3] [4] [5] [6] Instructions:
# CHECK-NEXT: 1 10 10.00 pclmulqdq $11, %xmm0, %xmm2
# CHECK-NEXT: 1 13 10.00 * pclmulqdq $11, (%rax), %xmm2
# CHECK-NEXT: 8 10 10.00 pclmulqdq $11, %xmm0, %xmm2
# CHECK-NEXT: 9 13 10.00 * pclmulqdq $11, (%rax), %xmm2

# CHECK: Resources:
# CHECK-NEXT: [0] - SLMDivider
Expand Down

0 comments on commit 680afaa

Please sign in to comment.