+2019-01-24 Uroš Bizjak <ubizjak@gmail.com>
+
+ PR target/88948
+ * rtl.h (prepare_copy_insn): New prototype.
+ * gcse.c (prepare_copy_insn): New function, split out from
+ process_insert_insn.
+ (process_insert_insn): Use prepare_copy_insn.
+ * store-motion.c (replace_store_insn): Use prepare_copy_insn
+ instead of gen_move_insn.
+
2019-01-24 Jakub Jelinek <jakub@redhat.com>
PR debug/89006
return rval;
}
\f
-/* Generate RTL to copy an EXPR to its `reaching_reg' and return it. */
+/* Generate RTL to copy an EXP to REG and return it. */
-static rtx_insn *
-process_insert_insn (struct gcse_expr *expr)
+rtx_insn *
+prepare_copy_insn (rtx reg, rtx exp)
{
- rtx reg = expr->reaching_reg;
- /* Copy the expression to make sure we don't have any sharing issues. */
- rtx exp = copy_rtx (expr->expr);
rtx_insn *pat;
start_sequence ();
return pat;
}
+/* Generate RTL to copy an EXPR to its `reaching_reg' and return it. */
+
+static rtx_insn *
+process_insert_insn (struct gcse_expr *expr)
+{
+ rtx reg = expr->reaching_reg;
+ /* Copy the expression to make sure we don't have any sharing issues. */
+ rtx exp = copy_rtx (expr->expr);
+
+ return prepare_copy_insn (reg, exp);
+}
+
/* Add EXPR to the end of basic block BB.
This is used by both the PRE and code hoisting. */
/* In gcse.c */
extern bool can_copy_p (machine_mode);
extern bool can_assign_to_reg_without_clobbers_p (rtx, machine_mode);
+extern rtx_insn *prepare_copy_insn (rtx, rtx);
+
+/* In cprop.c */
extern rtx fis_get_condition (rtx_insn *);
/* In ira.c */
rtx_insn *insn;
rtx mem, note, set;
- mem = smexpr->pattern;
- insn = gen_move_insn (reg, SET_SRC (single_set (del)));
+ insn = prepare_copy_insn (reg, SET_SRC (single_set (del)));
unsigned int i;
rtx_insn *temp;
/* Now we must handle REG_EQUAL notes whose contents is equal to the mem;
they are no longer accurate provided that they are reached by this
definition, so drop them. */
+ mem = smexpr->pattern;
for (; insn != NEXT_INSN (BB_END (bb)); insn = NEXT_INSN (insn))
if (NONDEBUG_INSN_P (insn))
{
+2019-01-24 Uroš Bizjak <ubizjak@gmail.com>
+
+ PR target/88948
+ * gcc.target/i386/pr88948.c: New test.
+
2019-01-24 Jakub Jelinek <jakub@redhat.com>
PR debug/89006
--- /dev/null
+/* PR rtl-optimization/88948 */
+/* { dg-do compile } */
+/* { dg-options "-O2 -fgcse-sm -msse3 -mfpmath=387" } */
+
+#include "../../gcc.c-torture/execute/stdarg-3.c"