+2019-04-23 Eric Botcazou <ebotcazou@adacore.com>
+
+ PR tree-optimization/94717
+ * gimple-ssa-store-merging.c (try_coalesce_bswap): Return false if one
+ of the stores doesn't have the same landing pad number as the first.
+ (coalesce_immediate_stores): Do not try to coalesce the store using
+ bswap if it doesn't have the same landing pad number as the first.
+
2020-04-23 Bill Schmidt <wschmidt@linux.ibm.com>
* gcc/doc/extend.texi (PowerPC AltiVec/VSX Built-in Functions):
for (unsigned int i = first + 1; i < len; ++i)
{
if (m_store_info[i]->bitpos != m_store_info[first]->bitpos + width
+ || m_store_info[i]->lp_nr != merged_store->lp_nr
|| m_store_info[i]->ins_stmt == NULL)
return false;
width += m_store_info[i]->bitsize;
if (info->bitpos == merged_store->start + merged_store->width
&& merged_store->stores.length () == 1
&& merged_store->stores[0]->ins_stmt != NULL
+ && info->lp_nr == merged_store->lp_nr
&& info->ins_stmt != NULL)
{
unsigned int try_size;
+2019-04-23 Eric Botcazou <ebotcazou@adacore.com>
+
+ * g++.dg/opt/store-merging-4.C: New test.
+
2020-04-23 Iain Sandoe <iain@sandoe.co.uk>
PR c++/94288
--- /dev/null
+// PR tree-optimization/94717
+// Reported by Zdenek Sojka <zsojka@seznam.cz>
+
+// { dg-do compile }
+// { dg-options "-O2 -fnon-call-exceptions -ftracer" }
+
+int abs (int);
+
+static inline void
+bar (int d)
+{
+ d && abs (d);
+}
+
+struct S
+{
+ int a;
+ int b;
+ int c;
+ S (unsigned a, unsigned b) : a (a), b (b) { }
+};
+
+void
+foo (S *x)
+{
+ bar (x->c);
+ new S (x->a, x->b);
+ bar (0);
+}