[PATCH] D150595: [InstCombine] Simplify MemTransferInst with type inference

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 16 01:12:32 PDT 2023


nikic added a comment.

Also, there are a number of correctness issues in your implementation: a) You don't check that the alloca type has the same size as the memcpy, so you might end up copying e.g. more bytes here. b) The alloca type might have interior padding. E.g. a load/store of `{ i8, i32 }` is not the same as a memcpy of 8 bytes.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D150595



More information about the llvm-commits mailing list