[all-commits] [llvm/llvm-project] 384a5b: [LAA] Use MaxStride instead of CommonStride to cal...

vaibhav via All-commits all-commits at lists.llvm.org
Wed May 7 13:02:42 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 384a5b00a7c8fffa72f7fe7021863d00da842a19
      https://github.com/llvm/llvm-project/commit/384a5b00a7c8fffa72f7fe7021863d00da842a19
  Author: vaibhav <73255802+mrdaybird at users.noreply.github.com>
  Date:   2025-05-07 (Wed, 07 May 2025)

  Changed paths:
    M llvm/lib/Analysis/LoopAccessAnalysis.cpp
    A llvm/test/Analysis/LoopAccessAnalysis/different_strides.ll

  Log Message:
  -----------
  [LAA] Use MaxStride instead of CommonStride to calculate MaxVF (#98142)

We bail out from MaxVF calculation if the strides are not the same.
Instead, we are dependent on runtime checks, though not yet implemented.
We could instead use the MaxStride to conservatively use an upper bound.

This handles cases like the following:
```c
#define LEN 256 * 256
float a[LEN];

void gather() {
  for (int i = 0; i < LEN - 1024 - 255; i++) {
  #pragma clang loop interleave(disable)
  #pragma clang loop unroll(disable)
    for (int j = 0; j < 256; j++)
      a[i + j + 1024] += a[j * 4 + i];
  }
}
```

---------

Co-authored-by: Florian Hahn <flo at fhahn.com>



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list