SuperWord: Vectorization in opposite direction traversal cases (shuffle)

XMLWordPrintable

      Given this loop:

          for (int i = 0; i < DST.length; i++) {
              DST[i] = SRC1[i] + SRC2[DST.length - 1 - i];
          }

      C2 should be able to vectorize this loop by reversing the elements after loading from SRC2. Similarly, a reduction loop like this should also be vectorized:

          int sum = 0;
          for (int i = 0; i < DST.length; i++) {
              sum += SRC1[i] + SRC2[DST.length - 1 - i];
          }

            Assignee:
            Unassigned
            Reporter:
            Quan Anh Mai
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: