[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:29:24 PDT 2025


Guo-yyds wrote:

But the code :
```
int find_v1(int a[], int n, int target) {
    int sum = 0;
    for (int i = 0; i < n; i++) {
        if (a[i] == target) {
            // return i;
            sum += i;
        }
    }
    return sum;
}
```

It can also be quantified, but the "load" here is not absolutely safe.

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


More information about the llvm-commits mailing list