[PATCH] D145809: [RISCV] Error if F and Zfinx extensions are specified together.
Craig Topper via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 10 11:26:25 PST 2023
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG2800d57e124a: [RISCV] Error if F and Zfinx extensions are specified together. (authored by craig.topper).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D145809/new/
https://reviews.llvm.org/D145809
Files:
clang/test/Driver/riscv-arch.c
llvm/lib/Support/RISCVISAInfo.cpp
Index: llvm/lib/Support/RISCVISAInfo.cpp
===================================================================
--- llvm/lib/Support/RISCVISAInfo.cpp
+++ llvm/lib/Support/RISCVISAInfo.cpp
@@ -839,6 +839,10 @@
errc::invalid_argument,
"standard user-level extension 'e' requires 'rv32'");
+ if (HasF && HasZfinx)
+ return createStringError(errc::invalid_argument,
+ "'f' and 'zfinx' extensions are incompatible");
+
if (HasZve32f && !HasF && !HasZfinx)
return createStringError(
errc::invalid_argument,
Index: clang/test/Driver/riscv-arch.c
===================================================================
--- clang/test/Driver/riscv-arch.c
+++ clang/test/Driver/riscv-arch.c
@@ -583,3 +583,13 @@
// RUN: %clang -target riscv32-unknown-elf -march=rv32i_zmmul1p0 -### %s \
// RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV32-ZMMUL-GOODVERS %s
// RV32-ZMMUL-GOODVERS: "-target-feature" "+zmmul"
+
+// RUN: %clang --target=riscv32-unknown-elf -march=rv32ifzfinx -### %s \
+// RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV32-F-ZFINX-ER %s
+// RV32-F-ZFINX-ER: error: invalid arch name 'rv32ifzfinx',
+// RV32-F-ZFINX-ER: 'f' and 'zfinx' extensions are incompatible
+
+// RUN: %clang --target=riscv32-unknown-elf -march=rv32idzdinx -### %s \
+// RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV32-D-ZDINX-ER %s
+// RV32-D-ZDINX-ER: error: invalid arch name 'rv32idzdinx',
+// RV32-D-ZFINX-ER: 'f' and 'zfinx' extensions are incompatible
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D145809.504227.patch
Type: text/x-patch
Size: 1519 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230310/b07b448b/attachment.bin>
More information about the llvm-commits
mailing list