[llvm-commits] [llvm] r54133 - in /llvm/trunk: lib/Transforms/Scalar/DeadStoreElimination.cpp test/Transforms/DeadStoreElimination/2008-07-28-load-store.ll

Chris Lattner clattner at apple.com
Mon Jul 28 13:29:24 PDT 2008


On Jul 28, 2008, at 9:14 AM, Owen Anderson wrote:
> Log:
> Add support for eliminating stores that store the same value that  
> was just loaded.
> This fixes PR2599.

nice.

> +        if (S->getParent() == L->getParent() &&

Why do you need this?  Why not allow any case where L dominates S?

>
> +            S->getPointerOperand() == L->getPointerOperand() &&

Please check to see if the pointers mustalias instead of being exactly  
equal.  If you do this, make sure the loaded and stored value have the  
same type though.

Thanks for adding this Owen,

-Chris



More information about the llvm-commits mailing list