[clang] 20875fe - [RISCV] Make Zfhmin in march imply F.
Craig Topper via cfe-commits
cfe-commits at lists.llvm.org
Mon Jan 31 09:07:46 PST 2022
Author: Craig Topper
Date: 2022-01-31T09:06:43-08:00
New Revision: 20875fe8a5b18b403a6b1a54b6e15afec3694c77
URL: https://github.com/llvm/llvm-project/commit/20875fe8a5b18b403a6b1a54b6e15afec3694c77
DIFF: https://github.com/llvm/llvm-project/commit/20875fe8a5b18b403a6b1a54b6e15afec3694c77.diff
LOG: [RISCV] Make Zfhmin in march imply F.
Zfhmin should imply F just like Zfh.
Reviewed By: achieveartificialintelligence
Differential Revision: https://reviews.llvm.org/D118578
Added:
Modified:
clang/test/Preprocessor/riscv-target-features.c
llvm/lib/Support/RISCVISAInfo.cpp
Removed:
################################################################################
diff --git a/clang/test/Preprocessor/riscv-target-features.c b/clang/test/Preprocessor/riscv-target-features.c
index 73cb0b1a71c6f..24f2bd1a4d0b3 100644
--- a/clang/test/Preprocessor/riscv-target-features.c
+++ b/clang/test/Preprocessor/riscv-target-features.c
@@ -226,6 +226,7 @@
// RUN: %clang -target riscv64-unknown-linux-gnu \
// RUN: -march=rv64izfhmin1p0 -x c -E -dM %s \
// RUN: -o - | FileCheck --check-prefix=CHECK-ZFHMIN-EXT %s
+// CHECK-ZFHMIN-EXT: __riscv_f 2000000{{$}}
// CHECK-ZFHMIN-EXT: __riscv_zfhmin 1000000{{$}}
// RUN: %clang -target riscv32-unknown-linux-gnu \
@@ -234,6 +235,7 @@
// RUN: %clang -target riscv64-unknown-linux-gnu \
// RUN: -march=rv64izfh1p0 -x c -E -dM %s \
// RUN: -o - | FileCheck --check-prefix=CHECK-ZFH-EXT %s
+// CHECK-ZFH-EXT: __riscv_f 2000000{{$}}
// CHECK-ZFH-EXT: __riscv_zfh 1000000{{$}}
// RUN: %clang -target riscv32-unknown-linux-gnu \
diff --git a/llvm/lib/Support/RISCVISAInfo.cpp b/llvm/lib/Support/RISCVISAInfo.cpp
index 9c1b579dae115..bb4042e1b60f4 100644
--- a/llvm/lib/Support/RISCVISAInfo.cpp
+++ b/llvm/lib/Support/RISCVISAInfo.cpp
@@ -737,6 +737,7 @@ Error RISCVISAInfo::checkDependency() {
}
static const char *ImpliedExtsV[] = {"zvl128b", "f", "d"};
+static const char *ImpliedExtsZfhmin[] = {"f"};
static const char *ImpliedExtsZfh[] = {"zfhmin"};
static const char *ImpliedExtsZve64d[] = {"zve64f"};
static const char *ImpliedExtsZve64f[] = {"zve64x", "zve32f"};
@@ -772,6 +773,7 @@ struct ImpliedExtsEntry {
static constexpr ImpliedExtsEntry ImpliedExts[] = {
{{"v"}, {ImpliedExtsV}},
{{"zfh"}, {ImpliedExtsZfh}},
+ {{"zfhmin"}, {ImpliedExtsZfhmin}},
{{"zk"}, {ImpliedExtsZk}},
{{"zkn"}, {ImpliedExtsZkn}},
{{"zks"}, {ImpliedExtsZks}},
More information about the cfe-commits
mailing list