]> granicus.if.org Git - llvm/commit
[UpdateTestChecks][PowerPC] Avoid empty string when scrubbing loop comments
authorJinsong Ji <jji@us.ibm.com>
Mon, 1 Jul 2019 14:37:48 +0000 (14:37 +0000)
committerJinsong Ji <jji@us.ibm.com>
Mon, 1 Jul 2019 14:37:48 +0000 (14:37 +0000)
commitda6a17a7a12a089863aba4356c6f9d54747c6316
tree0038e6e0a0f3186952be188ee084994902c0253f
parent385068017f7a5351f86a0772dd2c55ae54a649e6
[UpdateTestChecks][PowerPC] Avoid empty string when scrubbing loop comments

Summary:
SCRUB_LOOP_COMMENT_RE was introduced in https://reviews.llvm.org/D31285
This works for some loops.

However, we may generate lines with loop comments only.
And since we don't scrub leading white spaces, this will leave an empty
line there, and FileCheck will complain it.

eg: llvm/test/CodeGen/PowerPC/PR35812-neg-cmpxchg.ll:27:15:
error: found empty check string with prefix 'CHECK:'
; CHECK-NEXT:

This prevented us from using the `update_llc_test_checks.py` for quite some cases.

We should still keep the comment token there, so that we can safely
scrub the loop comment without breaking FileCheck.

Reviewers: timshen, hfinkel, lebedev.ri, RKSimon

Subscribers: nemanjai, jfb, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D63957

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@364775 91177308-0d34-0410-b5e6-96231b3b80d8
test/CodeGen/PowerPC/PR35812-neg-cmpxchg.ll
utils/UpdateTestChecks/asm.py