[all-commits] [llvm/llvm-project] 50a1ab: [LAA] Don't assume libcalls with output/input poin...

Benjamin Maxwell via All-commits all-commits at lists.llvm.org
Mon Sep 23 08:06:18 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 50a1ab12abbe948e6d3f8418f11bfa1951c8d19e
      https://github.com/llvm/llvm-project/commit/50a1ab12abbe948e6d3f8418f11bfa1951c8d19e
  Author: Benjamin Maxwell <benjamin.maxwell at arm.com>
  Date:   2024-09-23 (Mon, 23 Sep 2024)

  Changed paths:
    M llvm/lib/Analysis/LoopAccessAnalysis.cpp
    M llvm/test/Transforms/LoopVectorize/AArch64/scalable-call.ll
    M llvm/test/Transforms/LoopVectorize/AArch64/veclib-function-calls.ll
    M llvm/test/Transforms/LoopVectorize/AArch64/vector-call-linear-args.ll

  Log Message:
  -----------
  [LAA] Don't assume libcalls with output/input pointers can be vectorized (#108980)

LoopAccessAnalysis currently does not check/track aliasing from the
output pointers, but assumes vectorizing library calls with a mapping is
safe.

This can result in incorrect codegen if something like the following is
vectorized:

```
for(int i=0; i<N; i++) {
  // No aliasing between input and output pointers detected.
  sincos(cos_out[0], sin_out+i, cos_out+i);
}
```

Where for VF >= 2 `cos_out[1]` to `cos_out[VF-1]` is the cosine of the
original value of `cos_out[0]` not the updated value.



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