[llvm] [utils][UpdateTestChecks] update_llc_test_checks.py - armv7-apple-darwin triple no longer working (PR #150906)

via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 28 02:07:41 PDT 2025


https://github.com/woruyu created https://github.com/llvm/llvm-project/pull/150906

### Summary
This PR resolves https://github.com/llvm/llvm-project/issues/150207

>From ef59258c60a8fe55e04ffda06819fb8122a8c547 Mon Sep 17 00:00:00 2001
From: woruyu <1214539920 at qq.com>
Date: Mon, 28 Jul 2025 17:06:43 +0800
Subject: [PATCH] [utils][UpdateTestChecks] update_llc_test_checks.py -
 armv7-apple-darwin triple no longer working

---
 llvm/test/CodeGen/ARM/fcopysign.ll | 1 +
 llvm/utils/UpdateTestChecks/asm.py | 8 +++-----
 2 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/llvm/test/CodeGen/ARM/fcopysign.ll b/llvm/test/CodeGen/ARM/fcopysign.ll
index b183418ca74f7..dbebe44740bbc 100644
--- a/llvm/test/CodeGen/ARM/fcopysign.ll
+++ b/llvm/test/CodeGen/ARM/fcopysign.ll
@@ -85,6 +85,7 @@ define float @test4() nounwind {
 ; SOFT-NEXT:    vadd.f32 d0, d0, d16
 ; SOFT-NEXT:    vmov r0, s0
 ; SOFT-NEXT:    pop {lr}
+; SOFT-NEXT:    bx lr
 ;
 ; HARD-LABEL: test4:
 ; HARD:       @ %bb.0: @ %entry
diff --git a/llvm/utils/UpdateTestChecks/asm.py b/llvm/utils/UpdateTestChecks/asm.py
index c2829c1fed0ae..98b4b5da8a3df 100644
--- a/llvm/utils/UpdateTestChecks/asm.py
+++ b/llvm/utils/UpdateTestChecks/asm.py
@@ -165,12 +165,10 @@ class string:
 )
 
 ASM_FUNCTION_ARM_DARWIN_RE = re.compile(
-    r"@[ \t]--[ \t]Begin[ \t]function[ \t](?P<func>[^ \t]+?)\n"
-    r"^[ \t]*\.globl[ \t]*_(?P=func)[ \t]*"
+    r"^[ \t]*\.globl[ \t]*_(?P<func>[^ \t]+)[ \t]*\@[ \t]*--[ \t]Begin[ \t]function[ \t](?P=func)\n"
     r"(?P<directives>.*?)"
-    r"^_(?P=func):\n[ \t]*"
-    r"(?P<body>.*?)"
-    r"^[ \t]*@[ \t]--[ \t]End[ \t]function",
+    r"^_(?P=func):.*?\n"
+    r"(?P<body>.*?)(?=^[ \t]*@[ \t]--[ \t]End[ \t]function)",
     flags=(re.M | re.S),
 )
 



More information about the llvm-commits mailing list