[llvm] [AMDGPU][test]added remove duplicate options for update_mc_test_check script (PR #111769)

Brox Chen via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 16 17:56:29 PDT 2024


================
@@ -298,23 +316,58 @@ def main():
                     else:
                         gen_prefix += getStdCheckLine(prefix, o, mc_mode)
 
-            generated_prefixes.append(gen_prefix.rstrip("\n"))
+            generated_prefixes[input_line] = gen_prefix.rstrip("\n")
 
         # write output
-        prefix_id = 0
+        written_lines = set()
         for input_info in ti.iterlines(output_lines):
             input_line = input_info.line
-            if isTestLine(input_line, mc_mode):
+            if input_line in testlines:
+                if ti.args.remove_duplicate:
+                    if input_line in written_lines:
----------------
broxigarchen wrote:

added.

duplicated comment should not be dropped

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


More information about the llvm-commits mailing list