[PATCH] D36947: [x86] Teach the "generic" x86 CPU to avoid patterns that are slow on widely used processors.

Chandler Carruth via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Aug 20 21:46:23 PDT 2017


chandlerc created this revision.
Herald added subscribers: mcrosier, sanjoy.

This occured to me when I saw that we were generating 'inc' and 'dec'
when for Haswell and newer we shouldn't. However, there were a few "X is
slow" things that we should probably just set.

I've avoided any of the "X is fast" features because most of those would
be pretty serious regressions on processors where X isn't actually fast.
The slow things are likely to be negligible costs on processors where
these aren't slow and a significant win when they are slow.

In retrospect this seems somewhat obvious. Not sure why we didn't do this a long time ago.


https://reviews.llvm.org/D36947

Files:
  lib/Target/X86/X86.td
  test/CodeGen/X86/avx-schedule.ll
  test/CodeGen/X86/lea32-schedule.ll
  test/CodeGen/X86/lea64-schedule.ll
  test/CodeGen/X86/vector-shuffle-512-v16.ll
  test/DebugInfo/COFF/register-variables.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D36947.111924.patch
Type: text/x-patch
Size: 10868 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170821/d28e1ee2/attachment.bin>


More information about the llvm-commits mailing list