PR rtl-optimization/71779
* emit-rtl.c (set_reg_attrs_from_value): Only propagate REG_POINTER,
if the value was sign-extended according to POINTERS_EXTEND_UNSIGNED
or if it was truncated.
From-SVN: r239123
2016-08-04 Bernd Edlinger <bernd.edlinger@hotmail.de>
+ PR rtl-optimization/71779
+ * emit-rtl.c (set_reg_attrs_from_value): Only propagate REG_POINTER,
+ if the value was sign-extended according to POINTERS_EXTEND_UNSIGNED
+ or if it was truncated.
+
PR rtl-optimization/70903
* cse.c (cse_insn): If DEST is a paradoxical SUBREG, don't record DEST.
{
#if defined(POINTERS_EXTEND_UNSIGNED)
if (((GET_CODE (x) == SIGN_EXTEND && POINTERS_EXTEND_UNSIGNED)
- || (GET_CODE (x) != SIGN_EXTEND && ! POINTERS_EXTEND_UNSIGNED))
+ || (GET_CODE (x) == ZERO_EXTEND && ! POINTERS_EXTEND_UNSIGNED)
+ || (paradoxical_subreg_p (x)
+ && ! (SUBREG_PROMOTED_VAR_P (x)
+ && SUBREG_CHECK_PROMOTED_SIGN (x,
+ POINTERS_EXTEND_UNSIGNED))))
&& !targetm.have_ptr_extend ())
can_be_reg_pointer = false;
#endif