aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJim Wilson <wilson@gcc.gnu.org>1994-05-11 14:44:22 -0700
committerJim Wilson <wilson@gcc.gnu.org>1994-05-11 14:44:22 -0700
commit7b3ab05e789445ae6b21463ec01cc2d77bd21171 (patch)
treecf1f4b11159275483d2a2fe3f218a8208b571a71 /gcc
parentc5bd3be879186eb78b92f12050e928391d8e874d (diff)
downloadgcc-7b3ab05e789445ae6b21463ec01cc2d77bd21171.zip
gcc-7b3ab05e789445ae6b21463ec01cc2d77bd21171.tar.gz
gcc-7b3ab05e789445ae6b21463ec01cc2d77bd21171.tar.bz2
(cse_insn): Set src_eqv if the dest is a STRICT_LOW_PART.
From-SVN: r7278
Diffstat (limited to 'gcc')
-rw-r--r--gcc/cse.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/gcc/cse.c b/gcc/cse.c
index 8845403..926f06b 100644
--- a/gcc/cse.c
+++ b/gcc/cse.c
@@ -6044,10 +6044,14 @@ cse_insn (insn, in_libcall_block)
fold_rtx (x, insn);
}
- /* Store the equivalent value in SRC_EQV, if different. */
+ /* Store the equivalent value in SRC_EQV, if different, or if the DEST
+ is a STRICT_LOW_PART. The latter condition is necessary because SRC_EQV
+ is handled specially for this case, and if it isn't set, then there will
+ be no equivalence for the destinatation. */
if (n_sets == 1 && REG_NOTES (insn) != 0
&& (tem = find_reg_note (insn, REG_EQUAL, NULL_RTX)) != 0
- && ! rtx_equal_p (XEXP (tem, 0), SET_SRC (sets[0].rtl)))
+ && (! rtx_equal_p (XEXP (tem, 0), SET_SRC (sets[0].rtl))
+ || GET_CODE (SET_DEST (sets[0].rtl)) == STRICT_LOW_PART))
src_eqv = canon_reg (XEXP (tem, 0), NULL_RTX);
/* Canonicalize sources and addresses of destinations.