[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)
commitee6539341bfcc63a6b57fd7c108a0357cb2a4c2e
tree2e37017cdb50f3f616d35d95251432ca843d18d7
parent4f769361e359cd6bcf9bc735006411f7ca0410c6
[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

llvm-svn: 364775
llvm/test/CodeGen/PowerPC/PR35812-neg-cmpxchg.ll
llvm/utils/UpdateTestChecks/asm.py