+2017-06-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
+
+ rtl-optimizatoin/79286
+ * ira.c (update_equiv_regs): Revert to using may_trap_or_fault_p again.
+ * rtlanal.c (rtx_addr_can_trap_p_1): SYMBOL_REF_FUNCTION_P can never
+ trap. PIC register plus a const unspec without offset can never trap.
+
2017-06-23 Marc Glisse <marc.glisse@inria.fr>
* tree.h (builtin_structptr_type): New type.
if (DF_REG_DEF_COUNT (regno) == 1
&& note
&& !rtx_varies_p (XEXP (note, 0), 0)
- && def_dominates_uses (regno))
+ && (!may_trap_or_fault_p (XEXP (note, 0))
+ || def_dominates_uses (regno)))
{
rtx note_value = XEXP (note, 0);
remove_note (insn, note);
case SYMBOL_REF:
if (SYMBOL_REF_WEAK (x))
return 1;
- if (!CONSTANT_POOL_ADDRESS_P (x))
+ if (!CONSTANT_POOL_ADDRESS_P (x) && !SYMBOL_REF_FUNCTION_P (x))
{
tree decl;
HOST_WIDE_INT decl_size;
case PLUS:
/* An address is assumed not to trap if:
- - it is the pic register plus a constant. */
- if (XEXP (x, 0) == pic_offset_table_rtx && CONSTANT_P (XEXP (x, 1)))
+ - it is the pic register plus a const unspec without offset. */
+ if (XEXP (x, 0) == pic_offset_table_rtx
+ && GET_CODE (XEXP (x, 1)) == CONST
+ && GET_CODE (XEXP (XEXP (x, 1), 0)) == UNSPEC
+ && offset == 0)
return 0;
/* - or it is an address that can't trap plus a constant integer. */