AMDGPU: Fix assembler subtarget predicate for gfx9

This was accepting GFX9 instructions on VI.

llvm-svn: 295557
This commit is contained in:
Matt Arsenault 2017-02-18 19:12:26 +00:00
parent eb952fd93b
commit 2021f08080
3 changed files with 13 additions and 1 deletions

View File

@ -166,6 +166,12 @@ def FeatureCIInsts : SubtargetFeature<"ci-insts",
"Additional intstructions for CI+"
>;
def FeatureGFX9Insts : SubtargetFeature<"gfx9-insts",
"GFX9Insts",
"true",
"Additional intstructions for GFX9+"
>;
def FeatureSMemRealTime : SubtargetFeature<"s-memrealtime",
"HasSMemRealTime",
"true",
@ -388,7 +394,7 @@ def FeatureGFX9 : SubtargetFeatureGeneration<"GFX9",
FeatureWavefrontSize64, FeatureFlatAddressSpace, FeatureGCN,
FeatureGCN3Encoding, FeatureCIInsts, Feature16BitInsts,
FeatureSMemRealTime, FeatureScalarStores, FeatureInv2PiInlineImm,
FeatureApertureRegs
FeatureApertureRegs, FeatureGFX9Insts
]
>;
@ -552,6 +558,10 @@ def isVI : Predicate <
"Subtarget->getGeneration() >= AMDGPUSubtarget::VOLCANIC_ISLANDS">,
AssemblerPredicate<"FeatureGCN3Encoding">;
def isGFX9 : Predicate <
"Subtarget->getGeneration() >= AMDGPUSubtarget::GFX9">,
AssemblerPredicate<"FeatureGFX9Insts">;
// TODO: Either the name to be changed or we simply use IsCI!
def isCIVI : Predicate <
"Subtarget->getGeneration() >= AMDGPUSubtarget::SEA_ISLANDS">,

View File

@ -112,6 +112,7 @@ AMDGPUSubtarget::AMDGPUSubtarget(const Triple &TT, StringRef GPU, StringRef FS,
GCN1Encoding(false),
GCN3Encoding(false),
CIInsts(false),
GFX9Insts(false),
SGPRInitBug(false),
HasSMemRealTime(false),
Has16BitInsts(false),

View File

@ -127,6 +127,7 @@ protected:
bool GCN1Encoding;
bool GCN3Encoding;
bool CIInsts;
bool GFX9Insts;
bool SGPRInitBug;
bool HasSMemRealTime;
bool Has16BitInsts;