[PATCH] D43460: [X86] Fix scheduling info for IMUL on haswell onwards.

Clement Courbet via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 19 06:17:34 PST 2018


courbet created this revision.
courbet added reviewers: craig.topper, RKSimon, gadi.haber.
Herald added a subscriber: llvm-commits.

Only IMUL16rri uses an extra P0156. IMUL32* and IMUL16rr only use
https://reviews.llvm.org/P1.
This was computed using https://github.com/google/EXEgesis/blob/master/exegesis/tools/compute_itineraries.cc

This can easily be validated by running perf on the following code:

  int main(int argc, char**argv) {
    int a = argc;
    int b = argc;
    int c = argc;
    int d = argc;
  
    for (int i = 0; i < LOOP_ITERATIONS; ++i) {
      asm volatile(
        R"(
          .rept 10000
          imull $0x2, %%edx, %%eax
          imull $0x2, %%ecx, %%ebx
          imull $0x2, %%eax, %%edx
          imull $0x2, %%ebx, %%ecx
          .endr
        )"
        : "+a"(a), "+b"(b), "+c"(c), "+d"(d)
        :
        :);
    }
    return a+b+c+d;
  }

-> test.cc

perf stat -x, -e cycles --pfm-events=uops_executed_port:port_0:u,uops_executed_port:port_1:u,uops_executed_port:port_2:u,uops_executed_port:port_3:u,uops_executed_port:port_4:u,uops_executed_port:port_5:u,uops_executed_port:port_6:u,uops_executed_port:port_7:u test


Repository:
  rL LLVM

https://reviews.llvm.org/D43460

Files:
  lib/Target/X86/X86SchedBroadwell.td
  lib/Target/X86/X86SchedHaswell.td
  lib/Target/X86/X86SchedSkylakeClient.td
  lib/Target/X86/X86SchedSkylakeServer.td

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D43460.134902.patch
Type: text/x-patch
Size: 5775 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180219/8b661011/attachment.bin>


More information about the llvm-commits mailing list