[llvm-commits] [llvm] r111665 - in /llvm/trunk: lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp test/Transforms/InstCombine/2010-08-19-StoreNarrowing.ll
clattner at apple.com
Wed Sep 1 12:29:32 PDT 2010
On Sep 1, 2010, at 10:16 AM, Dan Gohman wrote:
>>> Good catch. Is this even reasonably fixable within the context of instcombine? It looks like we'd want to use something like memdep to guarantee that there are no intervening writes to P.
>> This is best done in dag combine, where the chains tell you this. Please revert your instcombine change.
> Hi Chris, is the memory dependence issue the only reason to prefer to use
> dagcombine here instead of instcombine?
No, I also don't like that it narrows the load/store operations, which introduces type unsafety, and discourages GVN and other mid-level optimizations.
> Narrowing stores and eliminating loads can open up a variety of optimization
> opportunities. This suggests that instcombine is a better place for this
It discourages load GVN.
More information about the llvm-commits