+2018-11-21 H.J. Lu <hongjiu.lu@intel.com>
+
+ * read-rtl.c (apply_subst_iterator): Handle define_split and
+ define_insn_and_split.
+
2018-11-21 Jakub Jelinek <jakub@redhat.com>
PR rtl-optimization/87817
rtx new_attr;
rtvec attrs_vec, new_attrs_vec;
int i;
- if (value == 1)
+ /* define_split has no attributes. */
+ if (value == 1 || GET_CODE (rt) == DEFINE_SPLIT)
return;
gcc_assert (GET_CODE (rt) == DEFINE_INSN
+ || GET_CODE (rt) == DEFINE_INSN_AND_SPLIT
|| GET_CODE (rt) == DEFINE_EXPAND);
- attrs_vec = XVEC (rt, 4);
+ int attrs = GET_CODE (rt) == DEFINE_INSN_AND_SPLIT ? 7 : 4;
+ attrs_vec = XVEC (rt, attrs);
/* If we've already added attribute 'current_iterator_name', then we
have nothing to do now. */
GET_NUM_ELEM (attrs_vec) * sizeof (rtx));
new_attrs_vec->elem[GET_NUM_ELEM (attrs_vec)] = new_attr;
}
- XVEC (rt, 4) = new_attrs_vec;
+ XVEC (rt, attrs) = new_attrs_vec;
}
/* Map subst-attribute ATTR to subst iterator ITER. */