[PATCH] D37177: [X86] Don't disable slow INC/DEC if optimizing for size

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Aug 26 09:25:14 PDT 2017


craig.topper updated this revision to Diff 112791.
craig.topper added a comment.

Use a simpler test case.

I'd also like to see less feature flags. Particularly the ones that encode the CPU name into a flag.

Is there anything in the CPU scheduler model that captures INC/DEC being slow. I think its only "slow" because it doesn't update the carry flag and creates false dependencies later.

I also think it should be disabled on earlier CPUs than Haswell. I don't think anything change in microarchitecture at Haswell that made it different. gcc disables INC/DEC at least back to "core2".


https://reviews.llvm.org/D37177

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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D37177.112791.patch
Type: text/x-patch
Size: 10429 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170826/e3a0c913/attachment.bin>


More information about the llvm-commits mailing list