This is an archive of the discontinued LLVM Phabricator instance.

[NFC][LoopVectorize] Change trip counts for some tests to guarantee a scalar tail

Authored by david-arm on Mar 16 2023, 4:57 AM.



Quite a few vectoriser tests were using a trip count of 1024,
which meant:

  1. For fixed-length VFs we would never actually tail-fold, e.g. see Transforms/LoopVectorize/RISCV/uniform-load-store.ll. This is because we can prove at compile-time there will never be a scalar tail.
  2. As of D146199 the same optimisation mentioned above will also apply to scalable VFs too.

I've changed all such trip counts to be 1025 instead.

Diff Detail

Event Timeline

david-arm created this revision.Mar 16 2023, 4:57 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 16 2023, 4:57 AM
david-arm requested review of this revision.Mar 16 2023, 4:57 AM
reames accepted this revision.Mar 16 2023, 8:14 AM


This revision is now accepted and ready to land.Mar 16 2023, 8:14 AM
fhahn accepted this revision.Mar 16 2023, 8:28 AM

LGTM, thanks for splitting this off!