[PATCH] D39219: AMDGPU: Add max-mix-insts subtarget feature
Matt Arsenault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 23 17:54:25 PDT 2017
arsenm created this revision.
Herald added subscribers: t-tye, tpr, dstuttard, yaxunl, nhaehnle, wdng.
https://reviews.llvm.org/D39219
Files:
lib/Target/AMDGPU/AMDGPU.td
lib/Target/AMDGPU/AMDGPUSubtarget.cpp
lib/Target/AMDGPU/AMDGPUSubtarget.h
Index: lib/Target/AMDGPU/AMDGPUSubtarget.h
===================================================================
--- lib/Target/AMDGPU/AMDGPUSubtarget.h
+++ lib/Target/AMDGPU/AMDGPUSubtarget.h
@@ -148,6 +148,7 @@
bool Has16BitInsts;
bool HasIntClamp;
bool HasVOP3PInsts;
+ bool HasMadMixInsts;
bool HasMovrel;
bool HasVGPRIndexMode;
bool HasScalarStores;
@@ -319,7 +320,7 @@
}
bool hasMadMixInsts() const {
- return getGeneration() >= GFX9;
+ return HasMadMixInsts;
}
bool hasCARRY() const {
Index: lib/Target/AMDGPU/AMDGPUSubtarget.cpp
===================================================================
--- lib/Target/AMDGPU/AMDGPUSubtarget.cpp
+++ lib/Target/AMDGPU/AMDGPUSubtarget.cpp
@@ -138,6 +138,7 @@
Has16BitInsts(false),
HasIntClamp(false),
HasVOP3PInsts(false),
+ HasMadMixInsts(false),
HasMovrel(false),
HasVGPRIndexMode(false),
HasScalarStores(false),
Index: lib/Target/AMDGPU/AMDGPU.td
===================================================================
--- lib/Target/AMDGPU/AMDGPU.td
+++ lib/Target/AMDGPU/AMDGPU.td
@@ -109,6 +109,12 @@
"Has Memory Aperture Base and Size Registers"
>;
+def FeatureMadMixInsts : SubtargetFeature<"mad-mix-insts",
+ "HasMadMixInsts",
+ "true",
+ "Has v_mad_mix_f32, v_mad_mixlo_f16, v_mad_mixhi_f16 instructions"
+>;
+
// XNACK is disabled if SH_MEM_CONFIG.ADDRESS_MODE = GPUVM on chips that support
// XNACK. The current default kernel driver setting is:
// - graphics ring: XNACK disabled
@@ -553,19 +559,25 @@
def FeatureISAVersion9_0_0 : SubtargetFeatureISAVersion <9,0,0,
[FeatureGFX9,
- FeatureLDSBankCount32]>;
+ FeatureMadMixInsts
+ FeatureLDSBankCount32
+ ]>;
def FeatureISAVersion9_0_1 : SubtargetFeatureISAVersion <9,0,1,
[FeatureGFX9,
+ FeatureMadMixInsts,
FeatureLDSBankCount32,
FeatureXNACK]>;
def FeatureISAVersion9_0_2 : SubtargetFeatureISAVersion <9,0,2,
[FeatureGFX9,
- FeatureLDSBankCount32]>;
+ FeatureMadMixInsts,
+ FeatureLDSBankCount32,
+ ]>;
def FeatureISAVersion9_0_3 : SubtargetFeatureISAVersion <9,0,3,
[FeatureGFX9,
+ FeatureMadMixInsts,
FeatureLDSBankCount32,
FeatureXNACK]>;
@@ -729,7 +741,7 @@
AssemblerPredicate<"FeatureIntClamp">;
def HasMadMix : Predicate<"Subtarget->hasMadMixInsts()">,
- AssemblerPredicate<"FeatureGFX9Insts">;
+ AssemblerPredicate<"FeatureMadMixInsts">;
def EnableLateCFGStructurize : Predicate<
"EnableLateStructurizeCFG">;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D39219.119980.patch
Type: text/x-patch
Size: 2487 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20171024/3bcb4f6c/attachment.bin>
More information about the llvm-commits
mailing list