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

Johannes Doerfert via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 19 08:17:32 PDT 2021


jdoerfert added a comment.

First thought: Why is there no test in which we generate no `int2ptr` with the patch but do without?

> @fhahn: I don't see how this use of TBAA metadata is within the specification of the metadata.

I read through the code and I'm not sure if this is even a semantic change. I mean, can't we pick any
type to do the memory transfer expansion? If so, TBAA metadata as a heuristic should be totally fine.
We could also look at uses of the source and target pointers, for example. That said, we should write
in the lang ref that we do use the TBAA names for heuristics and they should be chosen to match the code/intent.


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