Page MenuHomePhabricator

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

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



SCRUB_LOOP_COMMENT_RE was introduced in
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:'

This prevented us from using the 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


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
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.