[clang] [llvm] [RISCV] CodeGen of RVE and ilp32e/lp64e ABIs (PR #76777)

Wang Pengcheng via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 9 19:45:05 PST 2024


================
@@ -17,6 +17,13 @@ def HasStdExtZicsr : Predicate<"Subtarget->hasStdExtZicsr()">,
                                 AssemblerPredicate<(all_of FeatureStdExtZicsr),
                                 "'Zicsr' (CSRs)">;
 
+def FeatureStdExtI
+    : SubtargetFeature<"i", "HasStdExtI", "true",
+                       "'I' (Base Integer Instruction Set)">;
+def HasStdExtI : Predicate<"Subtarget->hasStdExtI()">,
+                           AssemblerPredicate<(all_of FeatureStdExtI),
+                           "'I' (Base Integer Instruction Set)">;
+
----------------
wangpc-pp wrote:

For `RVE`, we will have some command lines like `-target-feature -i` in clang driver, which will cause error as we don't have `i` extension in backend. This fixes this error.

https://github.com/llvm/llvm-project/pull/76777


More information about the llvm-commits mailing list