re PR middle-end/51472 (ICE: verify_gimple failed: invalid rhs for gimple memory store with -fgnu-tm --param tm-max-aggregate-size=32)

PR middle-end/51472
        * trans-mem.c (tm_log_add): Use create_tmp_var_reg.

From-SVN: r182588
This commit is contained in:
Aldy Hernandez 2011-12-21 14:30:07 +00:00 committed by Aldy Hernandez
parent 539fcb458b
commit 2091795abd
3 changed files with 23 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2011-12-21 Aldy Hernandez <aldyh@redhat.com>
PR middle-end/51472
* trans-mem.c (tm_log_add): Use create_tmp_var_reg.
2011-12-21 Martin Jambor <mjambor@suse.cz>
* tree-into-ssa.c (rewrite_update_stmt): Do not dump extra newlines.

View File

@ -0,0 +1,17 @@
/* { dg-do compile } */
/* { dg-options "-fgnu-tm -O --param tm-max-aggregate-size=32" } */
typedef int __attribute__ ((vector_size (16))) vectype;
vectype v;
void
foo (int c)
{
vectype *p = __builtin_malloc (sizeof (vectype));
__transaction_atomic
{
*p = v;
if (c)
__transaction_cancel;
}
}

View File

@ -1003,7 +1003,7 @@ tm_log_add (basic_block entry_block, tree addr, gimple stmt)
special constructors and the like. */
&& !TREE_ADDRESSABLE (type))
{
lp->save_var = create_tmp_var (TREE_TYPE (lp->addr), "tm_save");
lp->save_var = create_tmp_reg (TREE_TYPE (lp->addr), "tm_save");
add_referenced_var (lp->save_var);
lp->stmts = NULL;
lp->entry_block = entry_block;