When possibly expanding a hash-map avoid keeping a reference to an
entry.
2020-02-27 Richard Biener <rguenther@suse.de>
PR tree-optimization/93953
* tree-vect-slp.c (slp_copy_subtree): Avoid keeping a reference
to the hash-map entry.
* gcc.dg/pr93953.c: New testcase.
+2020-02-27 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/93953
+ * tree-vect-slp.c (slp_copy_subtree): Avoid keeping a reference
+ to the hash-map entry.
+
2020-02-27 Andrew Stubbs <ams@codesourcery.com>
* config/gcn/gcn.md (mov<mode>): Add transformations for BI subregs.
+2020-02-27 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/93953
+ * gcc.dg/pr93953.c: New testcase.
+
2020-02-27 Jakub Jelinek <jakub@redhat.com>
PR c/93949
--- /dev/null
+/* PR tree-optimization/93953 */
+/* { dg-do compile } */
+/* { dg-options "-O3 --param=ggc-min-expand=0 --param=ggc-min-heapsize=0" } */
+
+int *b, c, e;
+float d, g, f;
+
+void
+foo (int l)
+{
+ for (; l; ++l)
+ {
+ float a = g > l;
+ d += a * b[4 * (l + c * e)];
+ f += a * b[4 * (l + c * e) + 1];
+ }
+}
unsigned i;
bool existed_p;
- slp_tree © = map.get_or_insert (node, &existed_p);
+ slp_tree ©_ref = map.get_or_insert (node, &existed_p);
if (existed_p)
- return copy;
+ return copy_ref;
- copy = XNEW (_slp_tree);
+ copy_ref = XNEW (_slp_tree);
+ slp_tree copy = copy_ref;
memcpy (copy, node, sizeof (_slp_tree));
if (SLP_TREE_SCALAR_STMTS (node).exists ())
{