This is an archive of the discontinued LLVM Phabricator instance.

Fix tests that used CHECK-NEXT-NOT and CHECK-DAG-NOT
ClosedPublic

Authored by probinson on Feb 24 2016, 5:54 PM.

Details

Summary

FileCheck doesn't actually support combo suffixes; in D17587 I made it complain, and these are the test that failed.

Diff Detail

Repository
rL LLVM

Event Timeline

probinson updated this revision to Diff 48998.Feb 24 2016, 5:54 PM
probinson retitled this revision from to Fix tests that used CHECK-NEXT-NOT and CHECK-DAG-NOT.
probinson updated this object.
probinson added reviewers: jyknight, dexonsmith.
probinson added a subscriber: llvm-commits.
mcrosier added inline comments.
test/Transforms/LoopVectorize/PowerPC/large-loop-rdx.ll
17 ↗(On Diff #48998)

Why is the CHECK-SAME needed here?

test/Transforms/LoopVectorize/PowerPC/small-loop-rdx.ll
17 ↗(On Diff #48998)

And here?

probinson added inline comments.Feb 25 2016, 9:00 AM
test/Transforms/LoopVectorize/PowerPC/large-loop-rdx.ll
17 ↗(On Diff #48998)

Using CHECK-SAME documents that the = and > are expected to be on the same line, thus achieving the effect that 'fadd' is also not on that line, i.e. that the sequence of 'fadd' instructions has ended. Given how IR syntax works this could be a CHECK rather than CHECK-SAME and it would have the same effect. I just think it's clearer with CHECK-SAME. If you disagree I can change it.

test/Transforms/LoopVectorize/PowerPC/small-loop-rdx.ll
17 ↗(On Diff #48998)

See above.

mcrosier added inline comments.Feb 25 2016, 9:27 AM
test/Transforms/LoopVectorize/PowerPC/large-loop-rdx.ll
17 ↗(On Diff #48998)

AFAICT, the test is just checking that we generate exactly 12 fadd instructions. Given that I think you could just replace

CHECK-NEXT-NOT: fadd

with

CHECK-NOT: fadd
CHECK: ret

IMO, that's a bit easier to understand. What do you think, Paul?

test/Transforms/LoopVectorize/PowerPC/small-loop-rdx.ll
17 ↗(On Diff #48998)

See above. :)

probinson added inline comments.Feb 25 2016, 10:49 AM
test/Transforms/LoopVectorize/PowerPC/large-loop-rdx.ll
17 ↗(On Diff #48998)

I tried that first, and it didn't work, because the test actually is not checking that there are exactly 12 fadd instructions. It is checking that the first fadd instruction begins a sequence of exactly 12 fadd instructions. There are other fadd instructions later on, after some other intervening stuff.

Now, if the intent of the test is that there are *only* 12 fadd instructions, that's different, but that's not how it was written originally.

mcrosier accepted this revision.Feb 25 2016, 11:27 AM
mcrosier added a reviewer: mcrosier.

LGTM.

test/Transforms/LoopVectorize/PowerPC/large-loop-rdx.ll
17 ↗(On Diff #48998)

Thanks for the clarification.

This revision is now accepted and ready to land.Feb 25 2016, 11:27 AM
This revision was automatically updated to reflect the committed changes.