]> granicus.if.org Git - llvm/commit
[ValueTracking] Improve pointer offset computation for cases of same base
authorRong Xu <xur@google.com>
Thu, 10 Oct 2019 21:30:43 +0000 (21:30 +0000)
committerRong Xu <xur@google.com>
Thu, 10 Oct 2019 21:30:43 +0000 (21:30 +0000)
commit670284f15ef7c87ebb436a83a4f85da00d0eee98
treeced7c8f0a74f88e2ef757b90584c32fea9947ab9
parent08eff296482f1ac1f12780684b851ad38644248d
[ValueTracking] Improve pointer offset computation for cases of same base

This patch improves the handling of pointer offset in GEP expressions where
one argument is the base pointer. isPointerOffset() is being used by memcpyopt
where current code synthesizes consecutive 32 bytes stores to one store and
two memset intrinsic calls. With this patch, we convert the stores to one
memset intrinsic.

Differential Revision: https://reviews.llvm.org/D67989

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@374454 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Analysis/ValueTracking.cpp
test/Transforms/MemCpyOpt/store-to-memset.ll [new file with mode: 0644]