aboutsummaryrefslogtreecommitdiff
path: root/gcc/combine.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2002-03-30 19:50:34 +0100
committerJakub Jelinek <jakub@gcc.gnu.org>2002-03-30 19:50:34 +0100
commit30984c5791c043900dbda277852231a3c4bb452c (patch)
treef1d7d7d312ea6cc3e66eac4ca950d27d1a62d1de /gcc/combine.c
parent1540f9ebc44746587921098f337cfac4916aa285 (diff)
downloadgcc-30984c5791c043900dbda277852231a3c4bb452c.zip
gcc-30984c5791c043900dbda277852231a3c4bb452c.tar.gz
gcc-30984c5791c043900dbda277852231a3c4bb452c.tar.bz2
re PR rtl-optimization/6086 (Reload misoptimizes DImode PREINC on PPC)
PR optimization/6086 * combine.c (combine_simplify_rtx): If simplify_rtx failed because of SUBREG of volatile MEM or because the MEM was mode dependent, return CLOBBER instead of unmodified SUBREG. From-SVN: r51606
Diffstat (limited to 'gcc/combine.c')
-rw-r--r--gcc/combine.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/combine.c b/gcc/combine.c
index 3e97a1a..de3bcef 100644
--- a/gcc/combine.c
+++ b/gcc/combine.c
@@ -3875,6 +3875,13 @@ combine_simplify_rtx (x, op0_mode, last, in_dest)
return temp;
}
+ /* Don't change the mode of the MEM if that would change the meaning
+ of the address. */
+ if (GET_CODE (SUBREG_REG (x)) == MEM
+ && (MEM_VOLATILE_P (SUBREG_REG (x))
+ || mode_dependent_address_p (XEXP (SUBREG_REG (x), 0))))
+ return gen_rtx_CLOBBER (mode, const0_rtx);
+
/* Note that we cannot do any narrowing for non-constants since
we might have been counting on using the fact that some bits were
zero. We now do this in the SET. */