[X86] Don't disable slow INC/DEC if optimizing for size
authorCraig Topper <craig.topper@intel.com>
Sat, 9 Sep 2017 17:11:59 +0000 (17:11 +0000)
committerCraig Topper <craig.topper@intel.com>
Sat, 9 Sep 2017 17:11:59 +0000 (17:11 +0000)
commit3be1db82b6cc285994e395fe91588eb8efb81aae
tree947c292f6f9b60d3dd9498c3ba5579863b933627
parent7c2556a8950545a582e4437913cf7be1590a88e8
[X86] Don't disable slow INC/DEC if optimizing for size

Summary:
Just because INC/DEC is a little slow on some processors doesn't mean we shouldn't prefer it when optimizing for size.

This appears to match gcc behavior.

Reviewers: chandlerc, zvi, RKSimon, spatel

Reviewed By: RKSimon

Subscribers: llvm-commits

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

llvm-svn: 312866
llvm/lib/Target/X86/X86ISelLowering.cpp
llvm/lib/Target/X86/X86InstrArithmetic.td
llvm/lib/Target/X86/X86InstrCompiler.td
llvm/lib/Target/X86/X86InstrInfo.td
llvm/test/CodeGen/X86/slow-incdec.ll