[llvm] [SystemZ] Improve handling of memmoves. (PR #196285)
Jonas Paulsson via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 25 06:06:34 PDT 2026
JonPsson1 wrote:
> > Does the extension of MemOp to distinguish a Memmove from a Memcpy look ok?
>
> We already have an `AllowOverlap` flag in `MemOp`. I know it's not used to make this distinction today but from the name ("overlap") I've always assumed that was probably one of the originally planned use cases for the field.
>
> Is it possible to reuse that field?
I don't think so - it is used by TargetLowering::findOptimalMemOpLowering() in cases where the loads and stores could overlap, e.g. a 14 byte memcpy implemented with two 8 byte loads/stores, with the last one at Base + 6.
I agree this is confusing - maybe a comment or a name change here would make sense.
https://github.com/llvm/llvm-project/pull/196285
More information about the llvm-commits
mailing list