[PATCH] D150016: [RISCV] Make Zvfh depend on Zfhmin.
Jianjian Guan via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue May 9 18:46:32 PDT 2023
This revision was automatically updated to reflect the committed changes.
Closed by commit rG7ab9478560ab: [RISCV] Make Zvfh depend on Zfhmin. (authored by jacquesguan).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D150016/new/
https://reviews.llvm.org/D150016
Files:
llvm/lib/Support/RISCVISAInfo.cpp
llvm/lib/Target/RISCV/RISCVFeatures.td
llvm/lib/Target/RISCV/RISCVSubtarget.h
Index: llvm/lib/Target/RISCV/RISCVSubtarget.h
===================================================================
--- llvm/lib/Target/RISCV/RISCVSubtarget.h
+++ llvm/lib/Target/RISCV/RISCVSubtarget.h
@@ -151,9 +151,7 @@
// Vector codegen related methods.
bool hasVInstructions() const { return HasStdExtZve32x; }
bool hasVInstructionsI64() const { return HasStdExtZve64x; }
- bool hasVInstructionsF16() const {
- return HasStdExtZvfh && hasStdExtZfhOrZfhmin();
- }
+ bool hasVInstructionsF16() const { return HasStdExtZvfh; }
// FIXME: Consider Zfinx in the future
bool hasVInstructionsF32() const { return HasStdExtZve32f && HasStdExtF; }
// FIXME: Consider Zdinx in the future
Index: llvm/lib/Target/RISCV/RISCVFeatures.td
===================================================================
--- llvm/lib/Target/RISCV/RISCVFeatures.td
+++ llvm/lib/Target/RISCV/RISCVFeatures.td
@@ -449,7 +449,7 @@
def FeatureStdExtZvfh
: SubtargetFeature<"experimental-zvfh", "HasStdExtZvfh", "true",
"'Zvfh' (Vector Half-Precision Floating-Point)",
- [FeatureStdExtZve32f]>;
+ [FeatureStdExtZve32f, FeatureStdExtZfhmin]>;
def HasStdExtZfhOrZvfh
: Predicate<"Subtarget->hasStdExtZfh() || Subtarget->hasStdExtZvfh()">,
Index: llvm/lib/Support/RISCVISAInfo.cpp
===================================================================
--- llvm/lib/Support/RISCVISAInfo.cpp
+++ llvm/lib/Support/RISCVISAInfo.cpp
@@ -866,11 +866,6 @@
return createStringError(errc::invalid_argument,
"'f' and 'zfinx' extensions are incompatible");
- if (Exts.count("zvfh") && !Exts.count("zfh") && !Exts.count("zfhmin"))
- return createStringError(
- errc::invalid_argument,
- "'zvfh' requires 'zfh' or 'zfhmin extension to also be specified");
-
if (HasZvl && !HasVector)
return createStringError(
errc::invalid_argument,
@@ -941,7 +936,7 @@
static const char *ImpliedExtsZve64d[] = {"zve64f", "d"};
static const char *ImpliedExtsZve64f[] = {"zve64x", "zve32f"};
static const char *ImpliedExtsZve64x[] = {"zve32x", "zvl64b"};
-static const char *ImpliedExtsZvfh[] = {"zve32f"};
+static const char *ImpliedExtsZvfh[] = {"zve32f", "zfhmin"};
static const char *ImpliedExtsZvkn[] = {"zvbb", "zvbc", "zvkned", "zvknhb",
"zvkt"};
static const char *ImpliedExtsZvkng[] = {"zvkg", "zvkn"};
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D150016.520884.patch
Type: text/x-patch
Size: 2466 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230510/576c9eda/attachment.bin>
More information about the llvm-commits
mailing list