On Tue, Sep 4, 2012 at 12:20 AM, Andrew Pinski <pins...@gmail.com> wrote: > Hi, > The problem here is that trans-mem.c does not take into account that > COND_EXPR can happen for pointers. This patch modifies > thread_private_new_memory to handle COND_EXPR as it can handle PHI > nodes. The testcase is a modified version of memopt-12.c but with a > loop which both LIM and if-convert can change the conditional to a > COND_EXPR. > > I found this problem when I was producing a pass which does a full > if-convert before expanding (well changing the last phi-opt pass) and > it produces COND_EXPRs and memopt-12.c started to fail. > > OK? Bootstrapped and tested on x86_64-linux-gnu with no regressions.
Applied after approval from RTH offline. Thanks, Andrew > > Thanks, > Andrew Pinski > > ChangeLog: > * trans-mem.c (thread_private_new_memory): Handle COND_EXPR also. > > testsuite/ChangeLog: > * gcc.dg/tm/memopt-16.c: New testcase.