[all-commits] [llvm/llvm-project] de3185: [LoopVectorize][SVE] Add tests for vectorising con...

david-arm via All-commits all-commits at lists.llvm.org
Mon Mar 8 01:13:21 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: de3185647d937260dc4e3bdbce857cb1416110d9
      https://github.com/llvm/llvm-project/commit/de3185647d937260dc4e3bdbce857cb1416110d9
  Author: David Sherwood <david.sherwood at arm.com>
  Date:   2021-03-08 (Mon, 08 Mar 2021)

  Changed paths:
    A llvm/test/Transforms/LoopVectorize/AArch64/sve-cond-inv-loads.ll

  Log Message:
  -----------
  [LoopVectorize][SVE] Add tests for vectorising conditional loads of invariant addresses

For loops of the form:

 void foo(int *a, int *cond, short *inv, long long n) {
   for (long long i=0; i<n; ++i) {
     if (cond[i])
       a[i] = *inv;
   }
 }

we can vectorise for SVE using masked gather loads where the array
of pointers is simply a vector splat of 'inv' and the mask comes
from the condition 'cond[i] != 0'.

This patch simply adds tests upstream to defend this capability.

Differential Revision: https://reviews.llvm.org/D98043




More information about the All-commits mailing list