[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:09:14 PDT 2023
nikic requested changes to this revision.
nikic added a reviewer: nlopes.
nikic added a comment.
This revision now requires changes to proceed.
There are regressions in tests. To avoid them you probably need to restrict this to the case where the alloca type is a simple type rather than an aggregate. Currently you end up introducing a load of `[2 x i32]` type in the swap example, which is something we're not good at handling.
Could you explain what the larger context for this change is, possibly with a phase ordering test? We will not be able to reliably "guess" the type here, and I'm not sure special-casing the alloca case makes sense. The general expectation is that if the chosen type is "incorrect", we'll optimize away introduced bitcasts when that becomes evident.
The long term plan here is that this will make use of the `byte` type, because other choices are generally incorrect due to either poison-propagation or provenance issues. The introduction of the byte type is somewhat stuck right now though.
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