Skip to content

Commit 54e8cfe

Browse files
committed
[RISCV] Simplify some predicate functions in RISCVSubtarget.h. NFC
Remove some redundancy. HasStdExtZve32f implies HasStdExtF HasStdExtZve64d implies HasStdExtD HasStdExtZvfbfwma implies HasStdExtZvfbfmin
1 parent f5974e8 commit 54e8cfe

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

llvm/lib/Target/RISCV/RISCVSubtarget.h

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ class RISCVSubtarget : public RISCVGenSubtargetInfo {
124124
return hasStdExtZfhOrZfhmin() || hasStdExtZhinxOrZhinxmin();
125125
}
126126
bool hasHalfFPLoadStoreMove() const {
127-
return HasStdExtZfh || HasStdExtZfhmin || HasStdExtZfbfmin;
127+
return hasStdExtZfhOrZfhmin() || HasStdExtZfbfmin;
128128
}
129129
bool is64Bit() const { return IsRV64; }
130130
MVT getXLenVT() const { return XLenVT; }
@@ -167,13 +167,9 @@ class RISCVSubtarget : public RISCVGenSubtargetInfo {
167167
bool hasVInstructions() const { return HasStdExtZve32x; }
168168
bool hasVInstructionsI64() const { return HasStdExtZve64x; }
169169
bool hasVInstructionsF16() const { return HasStdExtZvfh; }
170-
bool hasVInstructionsBF16() const {
171-
return HasStdExtZvfbfmin || HasStdExtZvfbfwma;
172-
}
173-
// FIXME: Consider Zfinx in the future
174-
bool hasVInstructionsF32() const { return HasStdExtZve32f && HasStdExtF; }
175-
// FIXME: Consider Zdinx in the future
176-
bool hasVInstructionsF64() const { return HasStdExtZve64d && HasStdExtD; }
170+
bool hasVInstructionsBF16() const { return HasStdExtZvfbfmin; }
171+
bool hasVInstructionsF32() const { return HasStdExtZve32f; }
172+
bool hasVInstructionsF64() const { return HasStdExtZve64d; }
177173
// F16 and F64 both require F32.
178174
bool hasVInstructionsAnyF() const { return hasVInstructionsF32(); }
179175
bool hasVInstructionsFullMultiply() const { return HasStdExtV; }

0 commit comments

Comments
 (0)