[LoopIdiom] Preserve alias information for memset_pattern
authorWilliam S. Moses <gh@wsmoses.com>
Wed, 14 Jun 2023 16:23:44 +0000 (12:23 -0400)
committerWilliam S. Moses <gh@wsmoses.com>
Wed, 14 Jun 2023 20:14:53 +0000 (16:14 -0400)
commit3eb6fefb9721a2b4513163f4baf53d45e9665d75
treed711e1d48b2952f90a99ca25a2f6e28f3e181678
parente0d57295bf6a3c04f2901d9c70f529d570f48b65
[LoopIdiom] Preserve alias information for memset_pattern

TBAA/NoAlias/AliasScope and other information is currently preserved
when upgrading to a memcpy/memset. However, this is missing when upgrading to
the macOS memset_pattern function. This adds the same alias information preservation
to memset_pattern

Reviewed By: efriedma

Differential Revision: https://reviews.llvm.org/D152934
llvm/lib/Transforms/Scalar/LoopIdiomRecognize.cpp
llvm/test/Transforms/LoopIdiom/memset-pattern-tbaa.ll [new file with mode: 0644]