* trans-mem.c (tm_log_add): Use create_tmp_var_reg.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@182588
138bc75d-0d04-0410-961f-
82ee72b054a4
+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.
--- /dev/null
+/* { 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;
+ }
+}
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;