This is an archive of the discontinued LLVM Phabricator instance.

[NFC][LoopVectorize] Add test for tail-folding loop with conditional uniform load
ClosedPublic

Authored by david-arm on Oct 27 2021, 6:30 AM.

Details

Summary

I've added a test for a loop containing a conditional uniform load for
a target that supports masked loads. The test just ensures that we
correctly use gather instructions and have the correct mask.

Diff Detail

Event Timeline

david-arm requested review of this revision.Oct 27 2021, 6:30 AM
david-arm created this revision.
Herald added a project: Restricted Project. · View Herald TranscriptOct 27 2021, 6:30 AM
peterwaller-arm accepted this revision.Oct 28 2021, 7:48 AM

Seems reasonable to me. Might have liked to see a pseudo-C implementation in the comment above to shorten the first-pass brain parse of the test's intent, but it was not too bad without (and it follows fairly obviously from the title).

This revision is now accepted and ready to land.Oct 28 2021, 7:48 AM
fhahn added inline comments.Oct 31 2021, 1:03 PM
llvm/test/Transforms/LoopVectorize/AArch64/tail-fold-uniform-memops.ll
2

you are not checking any debug output, right? So there should be no need for 2>&1.

david-arm added inline comments.Nov 1 2021, 2:59 AM
llvm/test/Transforms/LoopVectorize/AArch64/tail-fold-uniform-memops.ll
2

Hi @fhahn, good point! I'll remove it before I merge if that's ok?

fhahn added inline comments.Nov 1 2021, 3:13 AM
llvm/test/Transforms/LoopVectorize/AArch64/tail-fold-uniform-memops.ll
2

Sure. Shouldn’t this patch also include @ uniform_load so the diff in the follow up patch only shows the changes?

david-arm updated this revision to Diff 383766.Nov 1 2021, 4:12 AM
david-arm marked 2 inline comments as done.

I've added the other test too now @fhahn and @sdesmalen

fhahn accepted this revision.Nov 3 2021, 1:37 AM

LGTM, thanks!

This revision was landed with ongoing or failed builds.Nov 3 2021, 2:51 AM
This revision was automatically updated to reflect the committed changes.