[llvm] [LICM] Remove unnecessary check during store hoisting (PR #187529)
Sebastian Pop via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 10 10:07:41 PDT 2026
sebpop wrote:
> I think this check was added because MemorySSA had trouble with
loop-carried dependencies in the past (like in https://github.com/llvm/llvm-project/issues/54682), but this
should no longer be a problem.
The change looks good to me: it is removing a limitation.
However the above 2 loops are going against the correct use of MSSA.
MSSA was created exactly to avoid walking through all memory accesses.
One needs to follow use/def chains of memory accesses that are known to be clobbered.
A better fix is to remove the surrounding 2 loops in hoist like this: https://github.com/llvm/llvm-project/pull/191468
and the symmetric patch to sink: https://github.com/llvm/llvm-project/pull/191469
https://github.com/llvm/llvm-project/pull/187529
More information about the llvm-commits
mailing list