diff options
author | Alexandre Oliva <aoliva@redhat.com> | 2003-07-18 18:23:30 +0000 |
---|---|---|
committer | Alexandre Oliva <aoliva@gcc.gnu.org> | 2003-07-18 18:23:30 +0000 |
commit | 0595d388a4b11459dc47c0bebf7b8895f8e9d331 (patch) | |
tree | feec71e702f270e1b94e01a67abece176fd46c1f /gcc/combine.c | |
parent | d54b59573446dc2a9fab992eeea664c76bb735ce (diff) | |
download | gcc-0595d388a4b11459dc47c0bebf7b8895f8e9d331.zip gcc-0595d388a4b11459dc47c0bebf7b8895f8e9d331.tar.gz gcc-0595d388a4b11459dc47c0bebf7b8895f8e9d331.tar.bz2 |
combine.c (combinable_i3pat): Don't forbid occurrences of i2dest or i1dest in inner_dest if inner_dest is a mem.
* combine.c (combinable_i3pat): Don't forbid occurrences of
i2dest or i1dest in inner_dest if inner_dest is a mem.
From-SVN: r69566
Diffstat (limited to 'gcc/combine.c')
-rw-r--r-- | gcc/combine.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/gcc/combine.c b/gcc/combine.c index 5a75201..883f504 100644 --- a/gcc/combine.c +++ b/gcc/combine.c @@ -1301,9 +1301,14 @@ combinable_i3pat (rtx i3, rtx *loc, rtx i2dest, rtx i1dest, || GET_CODE (inner_dest) == ZERO_EXTRACT) inner_dest = XEXP (inner_dest, 0); - /* Check for the case where I3 modifies its output, as - discussed above. */ - if ((inner_dest != dest + /* Check for the case where I3 modifies its output, as discussed + above. We don't want to prevent pseudos from being combined + into the address of a MEM, so only prevent the combination if + i1 or i2 set the same MEM. */ + if ((inner_dest != dest && + (GET_CODE (inner_dest) != MEM + || rtx_equal_p (i2dest, inner_dest) + || (i1dest && rtx_equal_p (i1dest, inner_dest))) && (reg_overlap_mentioned_p (i2dest, inner_dest) || (i1dest && reg_overlap_mentioned_p (i1dest, inner_dest)))) |