The memory location an invariant load is using can never be clobbered by
any store, so it's safe to move the load ahead of the store.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
Comment Actions
Would it be difficult to preserve the invariant if both loads are?
test/Transforms/LoadStoreVectorizer/AMDGPU/invariant-load.ll | ||
---|---|---|
5 ↗ | (On Diff #143739) | -LABEL for the function. Should also check that the load is not marked invariant since it's merged with a non-invariant load. |