[llvm] r345286 - [X86] Remove ProcIntelKNL and replace with a SlowPMADDWD flag to use in the one place it was checked.
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 25 10:29:00 PDT 2018
Author: ctopper
Date: Thu Oct 25 10:29:00 2018
New Revision: 345286
URL: http://llvm.org/viewvc/llvm-project?rev=345286&view=rev
Log:
[X86] Remove ProcIntelKNL and replace with a SlowPMADDWD flag to use in the one place it was checked.
Modified:
llvm/trunk/lib/Target/X86/X86.td
llvm/trunk/lib/Target/X86/X86ISelLowering.cpp
llvm/trunk/lib/Target/X86/X86Subtarget.h
Modified: llvm/trunk/lib/Target/X86/X86.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86.td?rev=345286&r1=345285&r2=345286&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86.td (original)
+++ llvm/trunk/lib/Target/X86/X86.td Thu Oct 25 10:29:00 2018
@@ -98,6 +98,9 @@ def FeatureSlowSHLD : SubtargetFeature<"
"SHLD instruction is slow">;
def FeatureSlowPMULLD : SubtargetFeature<"slow-pmulld", "IsPMULLDSlow", "true",
"PMULLD instruction is slow">;
+def FeatureSlowPMADDWD : SubtargetFeature<"slow-pmaddwd", "IsPMADDWDSlow",
+ "true",
+ "PMADDWD is slower than PMULLD">;
// FIXME: This should not apply to CPUs that do not have SSE.
def FeatureSlowUAMem16 : SubtargetFeature<"slow-unaligned-mem-16",
"IsUAMem16Slow", "true",
@@ -460,8 +463,6 @@ def ProcIntelGLP : SubtargetFeature<"gl
"Intel Goldmont Plus processors">;
def ProcIntelTRM : SubtargetFeature<"tremont", "X86ProcFamily", "IntelTRM",
"Intel Tremont processors">;
-def ProcIntelKNL : SubtargetFeature<"knl", "X86ProcFamily",
- "IntelKNL", "Intel Knights Landing processors">;
class Proc<string Name, list<SubtargetFeature> Features>
: ProcessorModel<Name, GenericModel, Features>;
@@ -845,19 +846,19 @@ def KNLFeatures : ProcessorFeatures<[],
// FIXME: define KNL model
class KnightsLandingProc<string Name> : ProcModel<Name, HaswellModel,
KNLFeatures.Value, [
- ProcIntelKNL,
FeatureSlowTwoMemOps,
FeatureFastPartialYMMorZMMWrite,
- FeatureHasFastGather
+ FeatureHasFastGather,
+ FeatureSlowPMADDWD
]>;
def : KnightsLandingProc<"knl">;
class KnightsMillProc<string Name> : ProcModel<Name, HaswellModel,
KNLFeatures.Value, [
- ProcIntelKNL,
FeatureSlowTwoMemOps,
FeatureFastPartialYMMorZMMWrite,
FeatureHasFastGather,
+ FeatureSlowPMADDWD,
FeatureVPOPCNTDQ
]>;
def : KnightsMillProc<"knm">; // TODO Add AVX5124FMAPS/AVX5124VNNIW features
Modified: llvm/trunk/lib/Target/X86/X86ISelLowering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ISelLowering.cpp?rev=345286&r1=345285&r2=345286&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86ISelLowering.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86ISelLowering.cpp Thu Oct 25 10:29:00 2018
@@ -34361,7 +34361,7 @@ static SDValue combineMulToPMADDWD(SDNod
if (!Subtarget.hasSSE2())
return SDValue();
- if (Subtarget.getProcFamily() == X86Subtarget::IntelKNL)
+ if (Subtarget.isPMADDWDSlow())
return SDValue();
EVT VT = N->getValueType(0);
Modified: llvm/trunk/lib/Target/X86/X86Subtarget.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86Subtarget.h?rev=345286&r1=345285&r2=345286&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86Subtarget.h (original)
+++ llvm/trunk/lib/Target/X86/X86Subtarget.h Thu Oct 25 10:29:00 2018
@@ -60,8 +60,7 @@ public:
IntelSLM,
IntelGLM,
IntelGLP,
- IntelTRM,
- IntelKNL,
+ IntelTRM
};
protected:
@@ -224,6 +223,9 @@ protected:
// PMULUDQ.
bool IsPMULLDSlow = false;
+ /// True if the PMADDWD instruction is slow compared to PMULLD.
+ bool IsPMADDWDSlow = false;
+
/// True if unaligned memory accesses of 16-bytes are slow.
bool IsUAMem16Slow = false;
@@ -613,6 +615,7 @@ public:
bool hasPTWRITE() const { return HasPTWRITE; }
bool isSHLDSlow() const { return IsSHLDSlow; }
bool isPMULLDSlow() const { return IsPMULLDSlow; }
+ bool isPMADDWDSlow() const { return IsPMADDWDSlow; }
bool isUnalignedMem16Slow() const { return IsUAMem16Slow; }
bool isUnalignedMem32Slow() const { return IsUAMem32Slow; }
int getGatherOverhead() const { return GatherOverhead; }
More information about the llvm-commits
mailing list