[llvm] [DAGCombiner] ignore loads when finding store in store forwarding optimization (PR #87465)

Chen Zheng via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 11 01:32:30 PDT 2024


chenzheng1030 wrote:

> Will this not affect other targets?

I assume there should be some compile-time improvement with trunk code, because now the store forward opportunity may be performed earlier before the chains of the loads are optimized in `FindBetterChain()`. 

If we set `getGatherAllAliasesMaxDepth()` called in `GatherAllAliases` to 0, means we don't optimize the chain for the load instructions, I see some code gen diff with/without this patch on some targets.

https://github.com/llvm/llvm-project/pull/87465


More information about the llvm-commits mailing list