From e7a59e04e7811b62b3a347c80350bc6125b1748e Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Wed, 17 Nov 1999 16:52:07 -0800 Subject: [PATCH] cse.c (delete_trivially_dead_insns): Identify no-op insns containing subregs too. * cse.c (delete_trivially_dead_insns): Identify no-op insns containing subregs too. From-SVN: r30563 --- gcc/ChangeLog | 5 +++++ gcc/cse.c | 11 +++++++---- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index fe499641b45..1694b728746 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +Wed Nov 17 16:51:23 1999 Richard Henderson + + * cse.c (delete_trivially_dead_insns): Identify no-op insns + containing subregs too. + Wed Nov 17 17:39:48 MST 1999 Diego Novillo * invoke.texi: Add documentation for -muninit-const-in-rodata. diff --git a/gcc/cse.c b/gcc/cse.c index 0736cd967e8..979069c3618 100644 --- a/gcc/cse.c +++ b/gcc/cse.c @@ -7176,8 +7176,10 @@ delete_trivially_dead_insns (insns, nreg) live_insn = ! dead_libcall; else if (GET_CODE (PATTERN (insn)) == SET) { - if (GET_CODE (SET_DEST (PATTERN (insn))) == REG - && SET_DEST (PATTERN (insn)) == SET_SRC (PATTERN (insn))) + if ((GET_CODE (SET_DEST (PATTERN (insn))) == REG + || GET_CODE (SET_DEST (PATTERN (insn))) == SUBREG) + && rtx_equal_p (SET_DEST (PATTERN (insn)), + SET_SRC (PATTERN (insn)))) ; #ifdef HAVE_cc0 @@ -7207,8 +7209,9 @@ delete_trivially_dead_insns (insns, nreg) if (GET_CODE (elt) == SET) { - if (GET_CODE (SET_DEST (elt)) == REG - && SET_DEST (elt) == SET_SRC (elt)) + if ((GET_CODE (SET_DEST (elt)) == REG + || GET_CODE (SET_DEST (elt)) == SUBREG) + && rtx_equal_p (SET_DEST (elt), SET_SRC (elt))) ; #ifdef HAVE_cc0