Skip to content

Commit ee6d07f

Browse files
committed
[Target][RISCV] Update SubtargetFeature definition for RV32/RV64 (NFCI).
This is done for consistency with other Predicate/Subtargetfeature pairs, where the second parameter of the SubtargetFeature correspond to the NAME of the def of the Predicate associated to the SubtargetFeature. Differential Revision: https://reviews.llvm.org/D146129
1 parent dc9c7f5 commit ee6d07f

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

llvm/lib/Target/RISCV/RISCVFeatures.td

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -576,9 +576,9 @@ def HasVendorXTHeadVdot : Predicate<"Subtarget->hasVendorXTHeadVdot()">,
576576
// Feature32Bit exists to mark CPUs that support RV32 to distinquish them from
577577
// tuning CPU names.
578578
def Feature32Bit
579-
: SubtargetFeature<"32bit", "HasRV32", "true", "Implements RV32">;
579+
: SubtargetFeature<"32bit", "IsRV32", "true", "Implements RV32">;
580580
def Feature64Bit
581-
: SubtargetFeature<"64bit", "HasRV64", "true", "Implements RV64">;
581+
: SubtargetFeature<"64bit", "IsRV64", "true", "Implements RV64">;
582582
def IsRV64 : Predicate<"Subtarget->is64Bit()">,
583583
AssemblerPredicate<(all_of Feature64Bit),
584584
"RV64I Base Instruction Set">;

llvm/lib/Target/RISCV/RISCVSubtarget.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ class RISCVSubtarget : public RISCVGenSubtargetInfo {
114114
bool hasStdExtCOrZca() const { return HasStdExtC || HasStdExtZca; }
115115
bool hasStdExtZvl() const { return ZvlLen != 0; }
116116
bool hasStdExtZfhOrZfhmin() const { return HasStdExtZfh || HasStdExtZfhmin; }
117-
bool is64Bit() const { return HasRV64; }
117+
bool is64Bit() const { return IsRV64; }
118118
MVT getXLenVT() const { return XLenVT; }
119119
unsigned getXLen() const { return XLen; }
120120
unsigned getFLen() const {

0 commit comments

Comments
 (0)