[llvm-commits] [llvm] r151620 - in /llvm/trunk: lib/Transforms/Scalar/DeadStoreElimination.cpp test/Transforms/DeadStoreElimination/OverwriteStoreStart.ll

Chris Lattner clattner at apple.com
Tue Feb 28 08:41:32 PST 2012


On Feb 27, 2012, at 8:43 PM, Chandler Carruth wrote:

> On Mon, Feb 27, 2012 at 8:27 PM, Pete Cooper <peter_cooper at apple.com> wrote:
> DSE: Shorten memset when a later store overwrites the start of it
> 
> Not 100% sure I understand the comments, but this won't shorten the memset if its address has favorable alignment constraints, or this would make a vector store become a scalar store? It would be good to have some test cases to clearly demonstrate where this should and shouldn't fire there... It might be that I've misread them, but I only see fairly limited testing of the negative cases here. (Perhaps just comments on what the test cases are actually checking would help...)

FWIW, it's important that we don't sacrifice alignment to save a few bytes stored.  When we get something like this:
http://nondot.org/sabre/LLVMNotes/BetterStructureCopyOptimization.txt

it will be straight-forward to model this properly without breaking alignment (by saying that the first few bytes are undefined).

-Chris

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20120228/9b4d9f59/attachment.html>


More information about the llvm-commits mailing list