This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Fix PR 54362 (COND_EXPR not understood by ITM)


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.

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.

Attachment: fixitmcondexpr.diff.txt
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]