This is an archive of the discontinued LLVM Phabricator instance.

[UpdateTestChecks][PowerPC] Avoid empty string when scrubbing loop comments
ClosedPublic

Authored by jsji on Jun 28 2019, 2:30 PM.

Details

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.

Diff Detail

Repository
rL LLVM

Event Timeline

jsji created this revision.Jun 28 2019, 2:30 PM
Herald added a project: Restricted Project. · View Herald TranscriptJun 28 2019, 2:30 PM
Herald added subscribers: jfb, nemanjai. · View Herald Transcript
jsji edited the summary of this revision. (Show Details)Jun 28 2019, 2:33 PM
lebedev.ri added inline comments.Jun 29 2019, 7:53 AM
llvm/utils/UpdateTestChecks/asm.py
218 ↗(On Diff #207145)

Does the comment need updating?

jsji updated this revision to Diff 207299.Jul 1 2019, 7:26 AM

Update the comments.

lebedev.ri accepted this revision.Jul 1 2019, 7:31 AM

Makes sense

This revision is now accepted and ready to land.Jul 1 2019, 7:31 AM
This revision was automatically updated to reflect the committed changes.