[PATCH] D75567: [x86] Enable bypassing 64-bit division on generic x86-64

Ori Livneh via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 3 14:24:30 PST 2020


atdt created this revision.
atdt added a reviewer: echristo.
Herald added subscribers: llvm-commits, hiraditya.
Herald added a project: LLVM.

This is currently enabled for Intel big cores from Sandy Bridge onward, as well as Atom, Silvermont, and KNL, due to 64-bit division being so slow on these cores.  AMD cores can do this in hardware (use 32-bit division based on input operand width), so it's not a win there. But since the majority of x86 CPUs benefit from this optimization, and since the potential upside is significantly greater than the downside, we should enable this for the generic x86-64 target.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D75567

Files:
  llvm/lib/Target/X86/X86.td


Index: llvm/lib/Target/X86/X86.td
===================================================================
--- llvm/lib/Target/X86/X86.td
+++ llvm/lib/Target/X86/X86.td
@@ -1240,6 +1240,7 @@
   FeatureNOPL,
   Feature64Bit,
   FeatureSlow3OpsLEA,
+  FeatureSlowDivide64,
   FeatureSlowIncDec,
   FeatureMacroFusion,
   FeatureInsertVZEROUPPER


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D75567.248023.patch
Type: text/x-patch
Size: 338 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200303/bc51dbfd/attachment.bin>


More information about the llvm-commits mailing list