Skip to content

Commit 845e65a

Browse files
committed
improved commentary
1 parent 0efffe4 commit 845e65a

File tree

4 files changed

+3
-5
lines changed

4 files changed

+3
-5
lines changed

llvm/test/tools/UpdateTestChecks/update_llc_test_checks/Inputs/x86_asm_mir_same_prefix.ll

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
21
; RUN: llc -mtriple=x86_64 < %s | FileCheck %s --check-prefix=CHECK
32
; RUN: llc -mtriple=x86_64 -stop-after=finalize-isel < %s | FileCheck %s --check-prefix=CHECK
43

@@ -12,5 +11,3 @@ define i32 @sub(i32 %a, i32 %b) {
1211
ret i32 %diff
1312
}
1413

15-
;; NOTE: These prefixes are unused and the list is autogenerated. Do not add tests below this line:
16-
; CHECK: {{.*}}

llvm/test/tools/UpdateTestChecks/update_llc_test_checks/x86-asm-mir-mixed.test

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
# RUN: cp -f %S/Inputs/x86_asm_mir_mixed.ll %t.ll && %update_llc_test_checks %t.ll
55
# RUN: diff -u %S/Inputs/x86_asm_mir_mixed.ll.expected %t.ll
6+
67
## Verify that running the script again on an already updated file doesn't add duplicate checks
78
# RUN: %update_llc_test_checks %t.ll
89
# RUN: diff -u %S/Inputs/x86_asm_mir_mixed.ll.expected %t.ll

llvm/test/tools/UpdateTestChecks/update_llc_test_checks/x86-asm-mir-same-prefix.test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
## Test that using the same prefix for both ASM and MIR outputs generates a warning
2-
## and only produces ASM checks (not MIR checks).
2+
## and doesn't produce any checks.
33

44
# RUN: cp -f %S/Inputs/x86_asm_mir_same_prefix.ll %t.ll && %update_llc_test_checks %t.ll 2>&1 | FileCheck %s --check-prefix=WARNING
55
# RUN: diff -u %S/Inputs/x86_asm_mir_same_prefix.ll.expected %t.ll

llvm/utils/UpdateTestChecks/mir.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,7 @@ def add_mir_checks_for_function(
170170
for prefix in run[0]:
171171
if prefix in printed_prefixes:
172172
break
173+
# func_info can be empty if there was a prefix conflict.
173174
if not func_dict[prefix].get(func_name):
174175
continue
175176
if printed_prefixes:
@@ -223,7 +224,6 @@ def add_mir_check_lines(
223224
first_line = func_body[0]
224225
indent = len(first_line) - len(first_line.lstrip(" "))
225226
# A check comment, indented the appropriate amount
226-
# If check_indent is provided, use it; otherwise, auto-detect from MIR body
227227
if check_indent is not None:
228228
check = "{}; {}".format(check_indent, prefix)
229229
else:

0 commit comments

Comments
 (0)