Skip to content

Conversation

@tomershafir
Copy link
Contributor

Adds arm64-apple-darwin support to asm.py matching and removes now invalidated target-triple-mismatch test (I dont have another triple supported by llc but not the autogenerator that make this test useful).

Adds `arm64-apple-darwin` support to `asm.py` matching and removes now invalidated `target-triple-mismatch` test (I dont have another triple supported by llc but not the autogenerator that make this test useful).
@tomershafir tomershafir marked this pull request as ready for review October 25, 2025 16:09
@llvmbot
Copy link
Member

llvmbot commented Oct 25, 2025

@llvm/pr-subscribers-testing-tools

Author: Tomer Shafir (tomershafir)

Changes

Adds arm64-apple-darwin support to asm.py matching and removes now invalidated target-triple-mismatch test (I dont have another triple supported by llc but not the autogenerator that make this test useful).


Full diff: https://github.com/llvm/llvm-project/pull/165092.diff

3 Files Affected:

  • (removed) llvm/test/tools/UpdateTestChecks/update_llc_test_checks/Inputs/target-triple-mismatch.ll (-7)
  • (removed) llvm/test/tools/UpdateTestChecks/update_llc_test_checks/target-triple-mismatch.test (-11)
  • (modified) llvm/utils/UpdateTestChecks/asm.py (+1)
diff --git a/llvm/test/tools/UpdateTestChecks/update_llc_test_checks/Inputs/target-triple-mismatch.ll b/llvm/test/tools/UpdateTestChecks/update_llc_test_checks/Inputs/target-triple-mismatch.ll
deleted file mode 100644
index 3da27cbacd172..0000000000000
--- a/llvm/test/tools/UpdateTestChecks/update_llc_test_checks/Inputs/target-triple-mismatch.ll
+++ /dev/null
@@ -1,7 +0,0 @@
-; RUN: llc < %s -mtriple=arm64-apple-darwin | FileCheck %s
-
-define i64 @foo(i64 %a) {
-entry:
-  %b = add i64 %a, 1
-  ret i64 %b
-}
diff --git a/llvm/test/tools/UpdateTestChecks/update_llc_test_checks/target-triple-mismatch.test b/llvm/test/tools/UpdateTestChecks/update_llc_test_checks/target-triple-mismatch.test
deleted file mode 100644
index 3bbf14d469d4b..0000000000000
--- a/llvm/test/tools/UpdateTestChecks/update_llc_test_checks/target-triple-mismatch.test
+++ /dev/null
@@ -1,11 +0,0 @@
-# REQUIRES: aarch64-registered-target
-## Check that arm64-apple-darwin target triple is wrongly captured as arm64 (non-Apple)
-
-# RUN: cp -f %S/Inputs/target-triple-mismatch.ll %t.ll
-# RUN: %update_llc_test_checks %t.ll 2>&1 | FileCheck %s --check-prefix=LOG
-# RUN: FileCheck --input-file=%t.ll %s --check-prefix=AUTOGEN
-
-# LOG: WARNING: Couldn't match any function. Possibly the wrong target triple has been provided
-
-# AUTOGEN: ;; NOTE: These prefixes are unused and the list is autogenerated. Do not add tests below this line:
-# AUTOGEN-NEXT: ; CHECK: {{.*}}
diff --git a/llvm/utils/UpdateTestChecks/asm.py b/llvm/utils/UpdateTestChecks/asm.py
index 457b23f4a5f59..469e27facedb0 100644
--- a/llvm/utils/UpdateTestChecks/asm.py
+++ b/llvm/utils/UpdateTestChecks/asm.py
@@ -570,6 +570,7 @@ def get_run_handler(triple):
         "arm64": (scrub_asm_arm_eabi, ASM_FUNCTION_AARCH64_RE),
         "arm64e": (scrub_asm_arm_eabi, ASM_FUNCTION_AARCH64_DARWIN_RE),
         "arm64ec": (scrub_asm_arm_eabi, ASM_FUNCTION_AARCH64_RE),
+        "arm64-apple-darwin": (scrub_asm_arm_eabi, ASM_FUNCTION_AARCH64_DARWIN_RE),
         "arm64-apple-ios": (scrub_asm_arm_eabi, ASM_FUNCTION_AARCH64_DARWIN_RE),
         "arm64-apple-macosx": (scrub_asm_arm_eabi, ASM_FUNCTION_AARCH64_DARWIN_RE),
         "armv7-apple-ios": (scrub_asm_arm_eabi, ASM_FUNCTION_ARM_IOS_RE),

@tomershafir tomershafir merged commit 9abae17 into llvm:main Oct 27, 2025
14 checks passed
@tomershafir tomershafir deleted the update-llc-test-checks-support-arm64-darwin branch October 27, 2025 19:22
dvbuka pushed a commit to dvbuka/llvm-project that referenced this pull request Oct 27, 2025
Adds `arm64-apple-darwin` support to `asm.py` matching and removes now
invalidated `target-triple-mismatch` test (I dont have another triple
supported by llc but not the autogenerator that make this test useful).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants