[PATCH] D155824: [LoongArch] Support -march=native and -mtune=
Fangrui Song via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Aug 8 17:48:24 PDT 2023
MaskRay accepted this revision.
MaskRay added a comment.
Some test suggestions
================
Comment at: clang/lib/Basic/Targets/LoongArch.cpp:203
+ StringRef ArchName = getCPU();
+ Builder.defineMacro("__loongarch_arch", Twine("\"") + ArchName + Twine("\""));
+
----------------
Use the `Twine(char)` constructor.
================
Comment at: clang/test/Driver/loongarch-mtune-error.c:1
+// RUN: not %clang --target=loongarch64 -mtune=invalidcpu -fsyntax-only %s 2>&1 | FileCheck %s
+// RUN: not %clang --target=loongarch64 -mtune=generic -fsyntax-only %s 2>&1 | FileCheck %s
----------------
Use `-###` to test the driver. Consider merging this test into the `loongarch-mtune.c`.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D155824/new/
https://reviews.llvm.org/D155824
More information about the cfe-commits
mailing list