[PATCH] D67989: [ValueTracking] Improve pointer offset computation for cases of same base

Rong Xu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 24 14:56:55 PDT 2019


xur created this revision.
xur added reviewers: davidxl, evghenii.
Herald added a subscriber: hiraditya.
Herald added a project: LLVM.

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.


https://reviews.llvm.org/D67989

Files:
  llvm/lib/Analysis/ValueTracking.cpp
  llvm/test/Transforms/MemCpyOpt/store-to-memset.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D67989.221603.patch
Type: text/x-patch
Size: 5318 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190924/ab52b32d/attachment.bin>


More information about the llvm-commits mailing list