mirror of
https://github.com/intel/llvm.git
synced 2026-01-26 12:26:52 +08:00
memref.copy gets lowered to a function call sometimes, this function is passed the element size of the memref in bytes as an argument. The element size passed to the copyMemRef() function call can be miscalculated if the LLVM IR uses aligned access to the memory. This can be fixed by using llvm.getelementptr to calculate the element size natively. This is also done in the other lowering path that lowers to an intrinsic. Fix https://github.com/llvm/llvm-project/issues/64072 Reviewed By: ftynse Differential Revision: https://reviews.llvm.org/D156126