+2019-01-17 Jakub Jelinek <jakub@redhat.com>
+
+ PR rtl-optimization/88870
+ * dce.c (deletable_insn_p): Never delete const/pure calls that can
+ throw if we can't alter the cfg or delete dead exceptions.
+ (mark_insn): Don't call find_call_stack_args for such calls.
+
2019-01-17 Kewen Lin <linkw@gcc.gnu.org>
* doc/extend.texi: Add four new prototypes for vec_ld and seven new
/* We can delete dead const or pure calls as long as they do not
infinite loop. */
&& (RTL_CONST_OR_PURE_CALL_P (insn)
- && !RTL_LOOPING_CONST_OR_PURE_CALL_P (insn)))
+ && !RTL_LOOPING_CONST_OR_PURE_CALL_P (insn))
+ /* Don't delete calls that may throw if we cannot do so. */
+ && ((cfun->can_delete_dead_exceptions && can_alter_cfg)
+ || insn_nothrow_p (insn)))
return find_call_stack_args (as_a <rtx_call_insn *> (insn), false,
fast, arg_stores);
&& !df_in_progress
&& !SIBLING_CALL_P (insn)
&& (RTL_CONST_OR_PURE_CALL_P (insn)
- && !RTL_LOOPING_CONST_OR_PURE_CALL_P (insn)))
+ && !RTL_LOOPING_CONST_OR_PURE_CALL_P (insn))
+ && ((cfun->can_delete_dead_exceptions && can_alter_cfg)
+ || insn_nothrow_p (insn)))
find_call_stack_args (as_a <rtx_call_insn *> (insn), true, fast, NULL);
}
}
+2019-01-17 Jakub Jelinek <jakub@redhat.com>
+
+ PR rtl-optimization/88870
+ * gcc.dg/pr88870.c: New test.
+
2019-01-17 Kewen Lin <linkw@gcc.gnu.org>
* gcc.target/powerpc/altivec_vld_vst_addr.c: New test.