diff options
author | Bernd Edlinger <bernd.edlinger@hotmail.de> | 2016-08-04 13:23:36 +0000 |
---|---|---|
committer | Bernd Edlinger <edlinger@gcc.gnu.org> | 2016-08-04 13:23:36 +0000 |
commit | 8d8e740c1cfb53908ad2a6af6ddbbae5c611c941 (patch) | |
tree | 373b21aed6744d1186c6db90a6e983e157047698 /gcc/emit-rtl.c | |
parent | 086ad22e0e7bbff4329d0dcbdc1b4be04ba4a868 (diff) | |
download | gcc-8d8e740c1cfb53908ad2a6af6ddbbae5c611c941.zip gcc-8d8e740c1cfb53908ad2a6af6ddbbae5c611c941.tar.gz gcc-8d8e740c1cfb53908ad2a6af6ddbbae5c611c941.tar.bz2 |
016-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.
From-SVN: r239123
Diffstat (limited to 'gcc/emit-rtl.c')
-rw-r--r-- | gcc/emit-rtl.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/gcc/emit-rtl.c b/gcc/emit-rtl.c index 055cee9..99f052d 100644 --- a/gcc/emit-rtl.c +++ b/gcc/emit-rtl.c @@ -1156,7 +1156,11 @@ set_reg_attrs_from_value (rtx reg, rtx x) { #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 |