[PATCH] D118578: [RISCV] Make Zfhmin in march imply F.
Craig Topper via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sun Jan 30 20:37:14 PST 2022
craig.topper created this revision.
craig.topper added reviewers: asb, achieveartificialintelligence, luismarques, kito-cheng.
Herald added subscribers: VincentWu, luke957, StephenFan, vkmr, frasercrmck, evandro, apazos, sameer.abuasal, s.egerton, Jim, benna, psnobl, jocewei, PkmX, the_o, brucehoult, MartinMosbeck, rogfer01, edward-jones, zzheng, jrtc27, niosHD, sabuasal, simoncook, johnrusso, rbar, hiraditya.
craig.topper requested review of this revision.
Herald added subscribers: cfe-commits, pcwang-thead, eopXD, MaskRay.
Herald added projects: clang, LLVM.
Zfhmin should imply F just like Zfh.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D118578
Files:
clang/test/Preprocessor/riscv-target-features.c
llvm/lib/Support/RISCVISAInfo.cpp
Index: llvm/lib/Support/RISCVISAInfo.cpp
===================================================================
--- llvm/lib/Support/RISCVISAInfo.cpp
+++ llvm/lib/Support/RISCVISAInfo.cpp
@@ -737,6 +737,7 @@
}
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 @@
static constexpr ImpliedExtsEntry ImpliedExts[] = {
{{"v"}, {ImpliedExtsV}},
{{"zfh"}, {ImpliedExtsZfh}},
+ {{"zfhmin"}, {ImpliedExtsZfhmin}},
{{"zk"}, {ImpliedExtsZk}},
{{"zkn"}, {ImpliedExtsZkn}},
{{"zks"}, {ImpliedExtsZks}},
Index: clang/test/Preprocessor/riscv-target-features.c
===================================================================
--- clang/test/Preprocessor/riscv-target-features.c
+++ 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 \
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D118578.404419.patch
Type: text/x-patch
Size: 1637 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220131/1e3d6f0b/attachment.bin>
More information about the cfe-commits
mailing list