]> granicus.if.org Git - llvm/commit
[x86] Teach the "generic" x86 CPU to avoid patterns that are slow on
authorChandler Carruth <chandlerc@gmail.com>
Mon, 21 Aug 2017 08:45:22 +0000 (08:45 +0000)
committerChandler Carruth <chandlerc@gmail.com>
Mon, 21 Aug 2017 08:45:22 +0000 (08:45 +0000)
commit0b54cd97e1726978f8919c4af41a5b16fa8385c7
tree07401c37f93bfdaed03f51410bf59dedcea90742
parent8f31059722e8297af78a16a0bf70bb3aa7c14546
[x86] Teach the "generic" x86 CPU to avoid patterns that are slow on
widely used processors.

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.

Differential Revision: https://reviews.llvm.org/D36947

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@311318 91177308-0d34-0410-b5e6-96231b3b80d8
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