Skip to content

Commit 686ff8e

Browse files
committed
Rename predicates
1 parent e5deeeb commit 686ff8e

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

llvm/lib/Target/AMDGPU/AMDGPU.td

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2344,12 +2344,14 @@ def isGFX8GFX9NotGFX90A :
23442344
" Subtarget->getGeneration() == AMDGPUSubtarget::GFX9)">,
23452345
AssemblerPredicate<(all_of FeatureGFX8Insts, FeatureGCN3Encoding, (not FeatureGFX90AInsts))>;
23462346

2347-
def isGFX9NotGFX90A :
2347+
// Pre-90A GFX9s allow the NV bit in FLAT instructions.
2348+
def isNVAllowedInFlat :
23482349
Predicate<"!Subtarget->hasGFX90AInsts() &&"
23492350
" Subtarget->getGeneration() == AMDGPUSubtarget::GFX9)">,
23502351
AssemblerPredicate<(all_of FeatureGFX9Insts, (not FeatureGFX90AInsts), (not FeatureGFX10Insts))>;
23512352

2352-
def isGFX8orGFX9After908 :
2353+
// GFX8 or GFX90A+ do not allow the NV bit in FLAT instructions.
2354+
def isNVNotAllowedInFlat :
23532355
Predicate<"(Subtarget->getGeneration() == AMDGPUSubtarget::VOLCANIC_ISLANDS) ||"
23542356
" ((Subtarget->getGeneration() == AMDGPUSubtarget::GFX9) && Subtarget->hasGFX90AInsts())">,
23552357
AssemblerPredicate <(any_of FeatureVolcanicIslands, FeatureGFX90AInsts)>;

llvm/lib/Target/AMDGPU/FLATInstructions.td

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2695,12 +2695,12 @@ class FLAT_Real_vi <bits<7> op, FLAT_Pseudo ps, bit has_sccb = ps.has_sccb> :
26952695

26962696
class FLAT_Real_vi_ex_gfx9 <bits<7> op, FLAT_Pseudo ps, bit has_sccb = ps.has_sccb> :
26972697
FLAT_Real_vi <op, ps, has_sccb> {
2698-
let AssemblerPredicate = isGFX8orGFX9After908;
2698+
let AssemblerPredicate = isNVNotAllowedInFlat;
26992699
}
27002700

27012701
class FLAT_Real_gfx9 <bits<7> op, FLAT_Pseudo ps, bit has_sccb = ps.has_sccb> :
27022702
FLAT_Real_vi <op, ps, has_sccb> {
2703-
let AssemblerPredicate = isGFX9NotGFX90A;
2703+
let AssemblerPredicate = isNVAllowedInFlat;
27042704
let Subtarget = SIEncodingFamily.GFX9;
27052705
let DecoderNamespace = "GFX9";
27062706
let Inst{55} = cpol{CPolBit.NV}; // nv - GFX9 (pre-90A) uses bit 55 as the non-volatile bit.

0 commit comments

Comments
 (0)