[clang] [clang][test] Add `%clang_cc1_arm64_neon` substitution (PR #188547)

Aaron Ballman via cfe-commits cfe-commits at lists.llvm.org
Wed Apr 8 06:17:13 PDT 2026


================
@@ -0,0 +1,13 @@
+import re
+from lit.llvm import llvm_config
+
+# Retrieve the substitution for %clang_cc1
+target = "%clang_cc1"
+clang_cc1 = next(
+    (value for pattern, value in config.substitutions if re.search(pattern, target)),
+    None
+)
+
+# Standard `clang -cc1` invocaiton for code-gen/lowering tests for
+# Aarch64/arm64. 
+config.substitutions.append(("%clang_cc1_cg_arm64_neon", clang_cc1 + " -triple arm64-none-linux-gnu -target-feature +neon -o -"))
----------------
AaronBallman wrote:

I think the `-o -` is a bit surprising because there's no command line options in the substitution that output (e.g., someone could pass `-fsyntax-only` and then what does `-o -` do?). However, I *think* it's harmless to leave it, more just a surprise.

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


More information about the cfe-commits mailing list