[llvm] [InstCombine] Forward memcpy source to load instruction (PR #140249)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Sun May 25 00:53:57 PDT 2025
nikic wrote:
The general guideline is that InstCombine load forwarding should be a subset of GVN load forwarding. New capabilities should generally be added to GVN/MDA first to handle the most generic case (including the cross-block one above). Support in InstCombine exists to avoid some phase ordering issues.
(What I have in mind here is not to replace the load from dst with a load from src, but with the available value of the load from src if one exists. But this is probably not easy, because we don't really have a good way to handle pointer offsets that are not materialized in IR.)
https://github.com/llvm/llvm-project/pull/140249
More information about the llvm-commits
mailing list