This is an archive of the discontinued LLVM Phabricator instance.

[LV] Test case to show the problem with forced vec and rt-checks. NFC.
AcceptedPublic

Authored by nikolaypanchenko on Jan 23 2023, 9:51 AM.

Details

Summary

The changeset contains a test that highlights the problem with forced vectorization and when number of required runtime checks exceeds some limit.
In the case of vec_foced it can be see that no overlap runtime checks were generated, which results to invalid vector code.

Diff Detail

Event Timeline

Herald added a project: Restricted Project. · View Herald TranscriptJan 23 2023, 9:51 AM
This comment was removed by nikolaypanchenko.
nikolaypanchenko edited the summary of this revision. (Show Details)Jan 23 2023, 9:58 AM
nikolaypanchenko published this revision for review.Jan 23 2023, 10:52 AM
fhahn accepted this revision.Jan 23 2023, 2:01 PM

LGTM, thanks! I still think it would be slightly preferable to not rely on debug output in the test and run it unconditionally, but don't have strong feelings about it.

llvm/test/Transforms/LoopVectorize/memcheck_threashold_vec_forced.ll
53

nit: IMO it would be slightly more readable to put this at the end of the function and rename it to exit. (same below)

109

Looks like the custom check lines cause this warning by the script. Perhaps remove the lines?

This revision is now accepted and ready to land.Jan 23 2023, 2:01 PM