Resolve a long-standing FIXME in memcpyopt.
authorOwen Anderson <resistor@mac.com>
Fri, 23 Dec 2022 04:24:49 +0000 (21:24 -0700)
committerOwen Anderson <resistor@mac.com>
Fri, 23 Dec 2022 23:15:24 +0000 (16:15 -0700)
commit8256ddf78cc558fa24070feb966075aa0c26589e
tree87638d1d8bd1dca496b4c477a0278893872a0796
parent387c1573f89117687f4b964ae3a90ea7c91a4f90
Resolve a long-standing FIXME in memcpyopt.

Inspecting the downstream use of the cpyAlign, it is clear that
`performCallSlotOptzn` is expecting it to represent the alignment
of the copy destination, not the minimum of the src and dest
alignments. This patch renames the parameter to make this more
obvious.

I believe this change is NFC, because the downstream code has
alignment checks such that it all works out in the end. I have not
been able to construct a test case that actually triggers a change
in output.

Reviewed By: nikic

Differential Revision: https://reviews.llvm.org/D140603
llvm/lib/Transforms/Scalar/MemCpyOptimizer.cpp
llvm/test/Transforms/MemCpyOpt/callslot.ll