This is an archive of the discontinued LLVM Phabricator instance.

[RISCV] Add test for experimental.vector.reverse
ClosedPublic

Authored by Miss_Grape on May 18 2022, 2:51 AM.

Details

Summary
void vector_reverse_i64(int *A, int *B, int n) {
  #pragma clang loop vectorize_width(4, scalable)
  for (int i = n-1; i >= 0; i--)
    A[i] = B[i] + 1;
}

When option: scalable-vectorization is on(or set #pragma clang loop vectorize_width(elements, scalable) ),Reverse Iterators can't loop vectorization as <vscale x elements x elementType>

Diff Detail

Event Timeline

Miss_Grape created this revision.May 18 2022, 2:51 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 18 2022, 2:51 AM
Miss_Grape requested review of this revision.May 18 2022, 2:51 AM
Miss_Grape edited the summary of this revision. (Show Details)May 18 2022, 3:08 AM
This revision is now accepted and ready to land.May 25 2022, 9:17 AM
benshi001 added inline comments.May 25 2022, 6:49 PM
llvm/test/Transforms/LoopVectorize/RISCV/riscv-vector-reverse.ll
93

Are these lines necessary ?

Miss_Grape added inline comments.May 25 2022, 8:14 PM
llvm/test/Transforms/LoopVectorize/RISCV/riscv-vector-reverse.ll
93

yes, need set the vectorize_width

This revision was landed with ongoing or failed builds.May 26 2022, 11:30 PM
This revision was automatically updated to reflect the committed changes.