[clang] [LoongArch] Enable 128-bits vector by default (PR #100056)

Fangrui Song via cfe-commits cfe-commits at lists.llvm.org
Mon Jul 22 21:14:29 PDT 2024


================
@@ -127,6 +127,11 @@ void loongarch::getLoongArchTargetFeatures(const Driver &D,
                                            const llvm::Triple &Triple,
                                            const ArgList &Args,
                                            std::vector<StringRef> &Features) {
+  // Enable the `lsx` feature on 64-bit LoongArch by default.
+  if (Triple.isLoongArch64() &&
+      (!Args.hasArg(clang::driver::options::OPT_march_EQ)))
----------------
MaskRay wrote:

Prefer `hasArgNoClaim` to have a single place to claim the option.
Unclaimed options will lead to an unused argument warning.

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


More information about the cfe-commits mailing list