* trans-mem.c (expand_block_edges): Do not skip the first
statement when resetting the BB.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@188190
138bc75d-0d04-0410-961f-
82ee72b054a4
+2012-06-04 Aldy Hernandez <aldyh@redhat.com>
+
+ PR middle-end/47530
+ * trans-mem.c (expand_block_edges): Do not skip the first
+ statement when resetting the BB.
+
2012-06-04 Richard Guenther <rguenther@suse.de>
* tree-data-ref.c (stores_from_loop): Remove.
--- /dev/null
+// { dg-do compile }
+// { dg-options "-fgnu-tm -O2 -fno-inline -fdump-tree-tmedge" }
+
+class RBTree
+{
+ struct RBNode
+ {
+ RBNode* next;
+ };
+
+ public:
+ RBNode* sentinel;
+ __attribute__((transaction_safe)) bool lookup();
+};
+
+bool RBTree::lookup()
+{
+ RBNode* x = sentinel;
+ while (x)
+ x = x->next;
+ return false;
+}
+
+
+RBTree* SET;
+
+void bench_test()
+{
+ __transaction_atomic {
+ SET->lookup();
+ }
+}
+
+// { dg-final { scan-tree-dump-times "ITM_commitTransaction.*tail call" 0 "tmedge" } }
+// { dg-final { cleanup-tree-dump "tmedge" } }
for (gsi = gsi_start_bb (bb); !gsi_end_p (gsi); )
{
+ bool do_next = true;
gimple stmt = gsi_stmt (gsi);
/* ??? TM_COMMIT (and any other tm builtin function) in a nested
make_tm_edge (stmt, bb, region);
bb = e->dest;
gsi = gsi_start_bb (bb);
+ do_next = false;
}
/* Delete any tail-call annotation that may have been added.
gimple_call_set_tail (stmt, false);
}
- gsi_next (&gsi);
+ if (do_next)
+ gsi_next (&gsi);
}
}