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

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 16 11:06:52 PDT 2023


nikic added a comment.

In D150595#4346984 <https://reviews.llvm.org/D150595#4346984>, @gandhi21299 wrote:

> @nikic @nlopes Is there a way to reliably infer the type of `alloca` then? The purpose is to enable certain optimizations like merging multiple stores into a phi, etc.

The general way to handle this is to support mismatched types in relevant optimizations by inserting bitcasts. See D147348 <https://reviews.llvm.org/D147348> for an example of how to do that.


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