summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/X86/X86.td
diff options
context:
space:
mode:
authorAlexey Volkov <avolkov.intel@gmail.com>2014-11-21 11:19:34 +0000
committerAlexey Volkov <avolkov.intel@gmail.com>2014-11-21 11:19:34 +0000
commitfd1731d8765002abafcc97c358e6fcefa047285d (patch)
tree6aae61c0d4df3a4c667ff381e28d3655f1b82039 /llvm/lib/Target/X86/X86.td
parent30a990744b777c4d8414df452e5800cd1d67f352 (diff)
downloadbcm5719-llvm-fd1731d8765002abafcc97c358e6fcefa047285d.tar.gz
bcm5719-llvm-fd1731d8765002abafcc97c358e6fcefa047285d.zip
[X86] For Silvermont CPU use 16-bit division instead of 64-bit for small positive numbers
Differential Revision: http://reviews.llvm.org/D5938 llvm-svn: 222521
Diffstat (limited to 'llvm/lib/Target/X86/X86.td')
-rw-r--r--llvm/lib/Target/X86/X86.td12
1 files changed, 8 insertions, 4 deletions
diff --git a/llvm/lib/Target/X86/X86.td b/llvm/lib/Target/X86/X86.td
index 83f55d32975..9729f4638cb 100644
--- a/llvm/lib/Target/X86/X86.td
+++ b/llvm/lib/Target/X86/X86.td
@@ -167,9 +167,12 @@ def FeatureSMAP : SubtargetFeature<"smap", "HasSMAP", "true",
"Support SMAP instructions">;
def FeatureLeaForSP : SubtargetFeature<"lea-sp", "UseLeaForSP", "true",
"Use LEA for adjusting the stack pointer">;
-def FeatureSlowDivide : SubtargetFeature<"idiv-to-divb",
- "HasSlowDivide", "true",
- "Use small divide for positive values less than 256">;
+def FeatureSlowDivide32 : SubtargetFeature<"idivl-to-divb",
+ "HasSlowDivide32", "true",
+ "Use 8-bit divide for positive values less than 256">;
+def FeatureSlowDivide64 : SubtargetFeature<"idivq-to-divw",
+ "HasSlowDivide64", "true",
+ "Use 16-bit divide for positive values less than 65536">;
def FeaturePadShortFunctions : SubtargetFeature<"pad-short-functions",
"PadShortFunctions", "true",
"Pad short functions">;
@@ -234,7 +237,7 @@ def : ProcessorModel<"penryn", SandyBridgeModel,
def : ProcessorModel<"atom", AtomModel,
[ProcIntelAtom, FeatureSSSE3, FeatureCMPXCHG16B,
FeatureMOVBE, FeatureSlowBTMem, FeatureLeaForSP,
- FeatureSlowDivide,
+ FeatureSlowDivide32, FeatureSlowDivide64,
FeatureCallRegIndirect,
FeatureLEAUsesAG,
FeaturePadShortFunctions]>;
@@ -244,6 +247,7 @@ def : ProcessorModel<"slm", SLMModel, [ProcIntelSLM,
FeatureSSE42, FeatureCMPXCHG16B,
FeatureMOVBE, FeaturePOPCNT,
FeaturePCLMUL, FeatureAES,
+ FeatureSlowDivide64,
FeatureCallRegIndirect,
FeaturePRFCHW,
FeatureSlowLEA, FeatureSlowIncDec,
OpenPOWER on IntegriCloud