[PATCH] D26619: `update_test_checks.py` incorrectly truncates IR body
bryant via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 14 10:07:32 PST 2016
bryant created this revision.
bryant added reviewers: chandlerc, spatel.
bryant added a subscriber: llvm-commits.
bryant set the repository for this revision to rL LLVM.
For instance, for this IR output:
define void @test1(i8* %P, i8* %Q) #1 {
%i = call {}* @llvm.invariant.start.p0i8(i64 32, i8* %P)
call void @llvm.memmove.p0i8.p0i8.i32(i8* %Q, i8* %P, i32 32, i32 16, i1 false)
ret void
}
the util generates these checks:
; CHECK-LABEL: @test1(
; CHECK-NEXT: [[I:%.*]] = call {
This is pretty bad, since it creates room for llvm-lit to pass when it should
not.
The patch assumes that the received input is (1) prettified output that (2)
comes from `opt -S`.
Repository:
rL LLVM
https://reviews.llvm.org/D26619
Files:
utils/update_test_checks.py
Index: utils/update_test_checks.py
===================================================================
--- utils/update_test_checks.py
+++ utils/update_test_checks.py
@@ -64,7 +64,7 @@
flags=(re.M | re.S))
OPT_FUNCTION_RE = re.compile(
r'^\s*define\s+(?:internal\s+)?[^@]*@(?P<func>[\w-]+?)\s*\('
- r'(\s+)?[^{]*\{\n(?P<body>.*?)\}',
+ r'(\s+)?[^{]*\{\n(?P<body>.*?)\}$',
flags=(re.M | re.S))
CHECK_PREFIX_RE = re.compile('--check-prefix=(\S+)')
CHECK_RE = re.compile(r'^\s*;\s*([^:]+?)(?:-NEXT|-NOT|-DAG|-LABEL)?:')
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D26619.77831.patch
Type: text/x-patch
Size: 541 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161114/eb4879c6/attachment.bin>
More information about the llvm-commits
mailing list