forked from OSchip/llvm-project
AMDGPU: Fix assembler subtarget predicate for gfx9
This was accepting GFX9 instructions on VI. llvm-svn: 295557
This commit is contained in:
parent
eb952fd93b
commit
2021f08080
|
@ -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">,
|
||||
|
|
|
@ -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),
|
||||
|
|
|
@ -127,6 +127,7 @@ protected:
|
|||
bool GCN1Encoding;
|
||||
bool GCN3Encoding;
|
||||
bool CIInsts;
|
||||
bool GFX9Insts;
|
||||
bool SGPRInitBug;
|
||||
bool HasSMemRealTime;
|
||||
bool Has16BitInsts;
|
||||
|
|
Loading…
Reference in New Issue