Skip to content

Commit 60315b0

Browse files
committed
update feature name
1 parent 5ed202c commit 60315b0

File tree

4 files changed

+13
-11
lines changed

4 files changed

+13
-11
lines changed

llvm/lib/Target/AMDGPU/AMDGPU.td

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -586,8 +586,8 @@ def FeatureRealTrue16Insts : SubtargetFeature<"real-true16",
586586
"Use true 16-bit registers"
587587
>;
588588

589-
def Feature16bitD16HWBug : SubtargetFeature<"d16-hw-bug",
590-
"Enable16bitD16HWBug",
589+
def FeatureD16Writes32BitVgpr : SubtargetFeature<"d16-write-vgpr32",
590+
"EnableD16Writes32BitVgpr",
591591
"true",
592592
"D16 instructions potentially have 32-bit data dependencies"
593593
>;
@@ -1941,7 +1941,7 @@ def FeatureISAVersion11_Common : FeatureSet<
19411941
FeatureVcmpxPermlaneHazard,
19421942
FeatureMemoryAtomicFAddF32DenormalSupport,
19431943
FeatureRealTrue16Insts,
1944-
Feature16bitD16HWBug,
1944+
FeatureD16Writes32BitVgpr,
19451945
]>;
19461946

19471947
// There are few workarounds that need to be
@@ -2578,10 +2578,10 @@ def UseFakeTrue16Insts : True16PredicateClass<"Subtarget->hasTrue16BitInsts() &&
25782578
// FIXME When we default to RealTrue16 instead of Fake, change the line as follows.
25792579
// AssemblerPredicate<(all_of FeatureTrue16BitInsts, (not FeatureRealTrue16Insts))>;
25802580

2581-
def Has16bitD16HWBug: Predicate<"Subtarget->has16bitD16HWBug()">,
2582-
AssemblerPredicate<(all_of FeatureTrue16BitInsts, FeatureRealTrue16Insts, Feature16bitD16HWBug)>;
2583-
def NotHas16bitD16HWBug: Predicate<"!Subtarget->has16bitD16HWBug()">,
2584-
AssemblerPredicate<(all_of FeatureTrue16BitInsts, FeatureRealTrue16Insts, (not Feature16bitD16HWBug))>;
2581+
def HasD16Writes32BitVgpr: Predicate<"Subtarget->hasD16Writes32BitVgpr()">,
2582+
AssemblerPredicate<(all_of FeatureTrue16BitInsts, FeatureRealTrue16Insts, FeatureD16Writes32BitVgpr)>;
2583+
def NotHasD16Writes32BitVgpr: Predicate<"!Subtarget->hasD16Writes32BitVgpr()">,
2584+
AssemblerPredicate<(all_of FeatureTrue16BitInsts, FeatureRealTrue16Insts, (not FeatureD16Writes32BitVgpr))>;
25852585

25862586
def HasBF16TransInsts : Predicate<"Subtarget->hasBF16TransInsts()">,
25872587
AssemblerPredicate<(all_of FeatureBF16TransInsts)>;

llvm/lib/Target/AMDGPU/AMDGPUSubtarget.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,9 @@ bool AMDGPUSubtarget::useRealTrue16Insts() const {
3838
return hasTrue16BitInsts() && EnableRealTrue16Insts;
3939
}
4040

41-
bool AMDGPUSubtarget::has16bitD16HWBug() const { return Enable16bitD16HWBug; }
41+
bool AMDGPUSubtarget::hasD16Writes32BitVgpr() const {
42+
return EnableD16Writes32BitVgpr;
43+
}
4244

4345
// Returns the maximum per-workgroup LDS allocation size (in bytes) that still
4446
// allows the given function to achieve an occupancy of NWaves waves per

llvm/lib/Target/AMDGPU/AMDGPUSubtarget.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ class AMDGPUSubtarget {
5959
bool HasCvtPkF16F32Inst = false;
6060
bool HasF32ToF16BF16ConversionSRInsts = false;
6161
bool EnableRealTrue16Insts = false;
62-
bool Enable16bitD16HWBug = false;
62+
bool EnableD16Writes32BitVgpr = false;
6363
bool HasBF16TransInsts = false;
6464
bool HasBF16ConversionInsts = false;
6565
bool HasBF16PackedInsts = false;
@@ -225,7 +225,7 @@ class AMDGPUSubtarget {
225225
// supported and the support for fake True16 instructions is removed.
226226
bool useRealTrue16Insts() const;
227227

228-
bool has16bitD16HWBug() const;
228+
bool hasD16Writes32BitVgpr() const;
229229

230230
bool hasBF16TransInsts() const { return HasBF16TransInsts; }
231231

llvm/lib/Target/AMDGPU/SIInsertWaitcnts.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -846,7 +846,7 @@ RegInterval WaitcntBrackets::getRegInterval(const MachineInstr *MI,
846846
assert(Size % 16 == 0);
847847
Result.second = Result.first + (Size / 16);
848848

849-
if (Size == 16 && Context->ST->has16bitD16HWBug()) {
849+
if (Size == 16 && Context->ST->hasD16Writes32BitVgpr()) {
850850
// Regardless of which lo16/hi16 is used, consider the full 32-bit
851851
// register used.
852852
if (AMDGPU::isHi16Reg(MCReg, *TRI))

0 commit comments

Comments
 (0)