This fixes pr29105. The issue is that lifetime marks creates new
aliasing pointers to the original ones, but AA
was not used in performMemCpyToMemSetOptzn.
Details
- Reviewers
chandlerc ab echristo jlebar iteratee - Commits
- rG3ad8b43cc279: [MemCpy] Add comments for r279769
rGa3dbead2d66a: [MemCpy] Check for alias in performMemCpyToMemSetOptzn, instead of the identity…
rL279778: [MemCpy] Add comments for r279769
rL279769: [MemCpy] Check for alias in performMemCpyToMemSetOptzn, instead of the…
Diff Detail
- Repository
- rL LLVM
Event Timeline
Yes, the comment in AliasAnalysis.h says so:
/// The two locations precisely alias each other. MustAlias,
llvm/trunk/lib/Transforms/Scalar/MemCpyOptimizer.cpp | ||
---|---|---|
1111 | If you are talking about: if (LookupAliasAnalysis().isMustAlias(...)) , then for consistency with other call sites, I like to keep it as is (I searched for "LookupAliasAnalysis()." and found nothing). If you are talking about: if (auto &AA = LoopupAliasAnalysis(); AA.isMustAlias(...)) It's a C++17 feature and we are not quite there yet! :) |
llvm/trunk/lib/Transforms/Scalar/MemCpyOptimizer.cpp | ||
---|---|---|
1111 | Feel free to fix up the other single uses at the same time? :) That said, I don't feel that strongly here either way. |
Can probably fold this into the conditional since this is the only place it's used.