diff --git a/clang/test/Preprocessor/riscv-target-features.c b/clang/test/Preprocessor/riscv-target-features.c --- 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 --- a/llvm/lib/Support/RISCVISAInfo.cpp +++ b/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}},