AArch64: Vectorize operations with loop induction variable

XMLWordPrintable

    • 19
    • b21
    • aarch64
    • generic

      AArch64 has SVE instruction of populating incrementing indices to vectors. With this we can vectorize some loop expressions with the induction variable in C2 superword optimization.

      Below are typical vectorizable loop cases on AArch64 SVE
      i)
              for (int i = 0; i < count; i++) {
                  idx[i] = i;
              }
      ii)
              for (int i = 0; i < count; i++) {
                  dst[i] = src[i] * (i & 7);
              }
      iii)
              for (int i = 0; i < count; i++) {
                  f[i] = i * i + 100;
              }

            Assignee:
            Pengfei Li
            Reporter:
            Pengfei Li
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: