[llvm] [FileCheck] Create test to highlight the "more than 9 back-references" issue. (PR #173501)

via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 24 10:04:31 PST 2025


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-testing-tools

Author: Thomas Symalla (tsymalla)

<details>
<summary>Changes</summary>

When back-referencing more than 9 variables in a CHECK line, FileCheck will fail.

I intend to fix this issue in a later PR by adjusting FileCheck.

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


1 Files Affected:

- (added) llvm/test/FileCheck/capture-limit.txt (+7) 


``````````diff
diff --git a/llvm/test/FileCheck/capture-limit.txt b/llvm/test/FileCheck/capture-limit.txt
new file mode 100644
index 0000000000000..8965c7fea7445
--- /dev/null
+++ b/llvm/test/FileCheck/capture-limit.txt
@@ -0,0 +1,7 @@
+; RUN: not FileCheck -input-file %s %s
+
+; Trying to back-reference more than 9 variables is intended to fail.
+
+r0 r1 r2 r3 r4 r5 r6 r7 r8 r9 r9
+
+; CHECK: [[REG1:r0]] [[REG2:r1]] [[REG3:r2]] [[REG4:r3]] [[REG5:r4]] [[REG6:r5]] [[REG7:r6]] [[REG8:r7]] [[REG9:r8]] [[REG10:r9]] [[REG10]]
\ No newline at end of file

``````````

</details>


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


More information about the llvm-commits mailing list