[llvm] [utils][UpdateTestChecks] Warn about possible target triple mismatch (PR #149645)

Tomer Shafir via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 28 08:46:14 PDT 2025


================
@@ -142,7 +142,12 @@ def update_test(ti: common.TestInfo):
             triple = common.get_triple_from_march(march_in_cmd)
 
         scrubber, function_re = output_type.get_run_handler(triple)
-        builder.process_run_line(function_re, scrubber, raw_tool_output, prefixes)
+        if not builder.process_run_line(
+            function_re, scrubber, raw_tool_output, prefixes
+        ):
+            common.warn(
+                "Couldn't match any function. Possibly the wrong target triple has been provided"
----------------
tomershafir wrote:

No, this is the inherent issue this warning tries to warn about. `get_run_handler` can match a prefix, which can be wrong. For example `-mtriple=arm64-apple-darwin` would map to `arm64` and result in wrong assembly regex generating garbage. I assumed the prefix match is there for a reason.

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


More information about the llvm-commits mailing list