[PATCH] D100717: [InstCombine] Transform memcpy to ptr load/stores if TBAA says so

Jeroen Dobbelaere via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 26 23:03:10 PDT 2021


jeroen.dobbelaere added a comment.

In D100717#2718366 <https://reviews.llvm.org/D100717#2718366>, @aqjune wrote:

> In D100717#2716900 <https://reviews.llvm.org/D100717#2716900>, @fhahn wrote:
>
>> But my suggestion/question is the other way around: check if a pointer is used to load a pointer instead of checking if `tbaa` claims it should be treated as pointer.
>
> Well, actually this sounds like a great idea... Let me check whether it works.

At least one case where this won't work is when the `llvm.memcpy` is expanded first, before the containing function is inlined in another one, where the access types are exposed.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D100717/new/

https://reviews.llvm.org/D100717



More information about the llvm-commits mailing list