PR rtl-optimization/88478
* cselib.c (cselib_record_sets): Move sets[i].src_elt tests
after REG_P (dest) test.
* g++.dg/opt/pr88478.C: New test.
From-SVN: r267159
+2018-12-15 Jakub Jelinek <jakub@redhat.com>
+
+ PR rtl-optimization/88478
+ * cselib.c (cselib_record_sets): Move sets[i].src_elt tests
+ after REG_P (dest) test.
+
2018-12-14 Martin Sebor <msebor@redhat.com>
PR tree-optimization/88372
preserves the upper bits that di:SI=zero_extend(flags:CCNO<=0). */
scalar_int_mode mode;
if (dest != orig
- && sets[i].src_elt
&& cselib_record_sets_hook
&& REG_P (dest)
&& HARD_REGISTER_P (dest)
+ && sets[i].src_elt
&& is_a <scalar_int_mode> (GET_MODE (dest), &mode)
&& n_sets + n_strict_low_parts < MAX_SETS)
{
+2018-12-15 Jakub Jelinek <jakub@redhat.com>
+
+ PR rtl-optimization/88478
+ * g++.dg/opt/pr88478.C: New test.
+
2018-12-14 Martin Sebor <msebor@redhat.com>
PR tree-optimization/88372
--- /dev/null
+// PR rtl-optimization/88478
+// { dg-do compile }
+// { dg-options "-O2" }
+
+struct A {
+ bool b;
+ int s;
+ template <typename T, typename U>
+ A (T, U) {}
+};
+enum F {} f;
+
+A
+foo ()
+{
+ return A (false, f);
+}