[llvm] [GVN] Support load PRE through select addresses (incl. indexed selects) (PR #203863)
Pengcheng Wang via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 16 00:08:26 PDT 2026
wangpc-pp wrote:
> Is [a6b3d4c](https://github.com/llvm/llvm-project/commit/a6b3d4c0db224a8335dbcbe23d1ab6a9cc62a140) needed in this PR or can it be split off? Is it to prevent regressions?
It is for optimizing this case in https://github.com/llvm/llvm-project/issues/58569#issuecomment-2788365047:
```
int func(int *restrict arr, int N) {
int minloc = 0;
for (int i = 0; i < N; ++i)
if (arr[i] < arr[minloc])
minloc = i;
return minloc;
}
```
I put it in this PR just because it is related to the same issue. I can split it into another PR if it is not easy to review.
https://github.com/llvm/llvm-project/pull/203863
More information about the llvm-commits
mailing list