This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
delete_trivially_dead_insns tweek
- To: gcc-patches at gcc dot gnu dot org
- Subject: delete_trivially_dead_insns tweek
- From: Richard Henderson <rth at cygnus dot com>
- Date: Wed, 17 Nov 1999 16:51:18 -0800
Identifies and removes no-op patterns of the form
(set (subreg:SI (reg:DI 99) 1))
(subreg:SI (reg:DI 99) 1)))
and has the mildly disconcerting property of curing a regression
on gcc.c-torture/execute/920501-6.c with -O -funroll-all-loops.
I'm undecided on whether I will at this time continue persuing the
unrolling bug that is no doubt still in there.
r~
* cse.c (delete_trivially_dead_insns): Identify no-op insns
containing subregs too.
Index: cse.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/cse.c,v
retrieving revision 1.112
diff -c -p -d -r1.112 cse.c
*** cse.c 1999/11/14 11:45:55 1.112
--- cse.c 1999/11/18 00:20:23
*************** delete_trivially_dead_insns (insns, nreg
*** 7176,7183 ****
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)))
;
#ifdef HAVE_cc0
--- 7176,7185 ----
live_insn = ! dead_libcall;
else if (GET_CODE (PATTERN (insn)) == SET)
{
! 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
*************** delete_trivially_dead_insns (insns, nreg
*** 7207,7214 ****
if (GET_CODE (elt) == SET)
{
! if (GET_CODE (SET_DEST (elt)) == REG
! && SET_DEST (elt) == SET_SRC (elt))
;
#ifdef HAVE_cc0
--- 7209,7217 ----
if (GET_CODE (elt) == SET)
{
! 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