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

Joerg Sonnenberger joerg at britannica.bec.de
Mon Nov 28 11:39:32 PST 2011

On Wed, Nov 09, 2011 at 11:07:35PM -0000, Pete Cooper wrote:
> Author: pete
> Date: Wed Nov  9 17:07:35 2011
> New Revision: 144239
> URL: http://llvm.org/viewvc/llvm-project?rev=144239&view=rev
> Log:
> DeadStoreElimination can now trim the size of a store if the end of the store is dead.

This doesn't work correctly. Attached is a minimised test case.
With this change, the memcpy is effectively dropped, even if it is not a
dead store.

-------------- next part --------------
typedef unsigned long int __uint64_t;

struct trapframe {
    __uint64_t tf_rdi;
     __uint64_t tf_trapno;

cpu_lwp_fork(struct trapframe *md_regs, __uint64_t pcb_rsp0)
 struct trapframe *tf;

 tf = (struct trapframe *)pcb_rsp0 -1;
 __builtin_memcpy(tf, md_regs, sizeof(struct trapframe));
 tf->tf_trapno = 3;

More information about the llvm-commits mailing list