Page MenuHomePhabricator

[SingleSource/Vectorizer] Add unit tests for index-select pattern.
AcceptedPublic

Authored by fhahn on Feb 6 2023, 3:13 AM.

Details

Summary

Dedicated unit tests for loops which select the index of the minimum
value.

This adds runtime test coverage for D132063.

Depends on D143377.

Event Timeline

fhahn created this revision.Feb 6 2023, 3:13 AM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 6 2023, 3:13 AM
fhahn requested review of this revision.Feb 6 2023, 3:13 AM
This revision is now accepted and ready to land.Feb 6 2023, 5:59 AM

Overall good, but I recommend adding a test case for MinIdx = -1.

Meinersbur accepted this revision.Tue, Feb 21, 10:00 PM

LGTM, but some description of what is tested would be useful. I would not expect people to search for the initial commit, find D132063 in the comment, and hope that Phabricator is still up.

SingleSource/UnitTests/Vectorizer/index-select.cpp
31

Could you add a comment on what the point of running on sorted data over random data is? Isn't it pointwise anyway?

99

Some description of what is being tested would be useful. min_index_select_u32_u32_start_0 isn't very descriptive.