[llvm] [LV] Add initial legality checks for loops with unbound loads. (PR #152422)

via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 18 04:04:22 PDT 2025


Guo-yyds wrote:

I'm not entirely clear about the purpose of the following code. 
```
getPotentiallyFaultingLoads() const {
    return PotentiallyFaultingLoads;
}
```
I would like to know why the vectorization of PotentiallyFaultingLoads was directly rejected. I think this is unreasonable. After all, the following code
```
void bar(float *A, float* B, float K, int start, int end) {
  for (int i = start; i < end; ++i)
    A[i] *= B[i] + K;
}
```
The "load" operation is not necessarily valid, but it can also be vectorized.

https://github.com/llvm/llvm-project/pull/152422


More information about the llvm-commits mailing list