This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
combine bugfix for i3_subst_into_i2 != 0, GET_CODE (PATTERN (i2)) != PARALLEL
- To: kenner at vlsi1 dot ultra dot nyu dot edu
- Subject: combine bugfix for i3_subst_into_i2 != 0, GET_CODE (PATTERN (i2)) != PARALLEL
- From: Joern Rennecke <amylaar at cygnus dot co dot uk>
- Date: Wed, 1 Dec 1999 23:27:30 +0000 (GMT)
- Cc: gcc-patches at gcc dot gnu dot org, amylaar at cygnus dot co dot uk
With the current development sources, I see an x86 compile failure for
execute/961213-1.c -O3 -fomit-frame-pointer -funroll-loops. At the
start of try_combine, we have:
(gdb) call debug_rtx(i3)
(insn 108 107 109 (set (subreg:SI (reg:DI 42) 1)
(const_int 0 [0x0])) 37 {*movsi_1} (insn_list 106 (nil))
(nil))
(gdb) call debug_rtx(i2)
(insn 106 199 107 (set (reg:DI 42)
(const_int 0 [0x0])) 64 {*movdi_2} (nil)
(expr_list:REG_EQUAL (const_int 0 [0x0])
(nil)))
and i1 is 0. i3_subst_into_i2 is set in the new code that you added on the
27th November.
/* If I2 is setting a double-word pseudo to a constant and I3 is setting
one of those words to another constant, merge them by making a new
constant. */
Before your change, i3_subst_into_i2 implied
GET_CODE (PATTERN (i2)) == PARALLEL. That is no longer true.
Wed Dec 1 23:26:24 1999 J"orn Rennecke <amylaar@cygnus.co.uk>
* combine.c (try_combine): Before fixing up LOG_LINKS for the
i3_subst_into_i2 case, check that GET_CODE (PATTERN (i2)) == PARALLEL.
Index: combine.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/combine.c,v
retrieving revision 1.95
diff -p -r1.95 combine.c
*** combine.c 1999/11/30 23:19:06 1.95
--- combine.c 1999/12/01 23:25:01
*************** try_combine (i3, i2, i1)
*** 2448,2466 ****
if (i3_subst_into_i2)
{
! for (i = 0; i < XVECLEN (PATTERN (i2), 0); i++)
! if (GET_CODE (SET_DEST (XVECEXP (PATTERN (i2), 0, i))) == REG
! && SET_DEST (XVECEXP (PATTERN (i2), 0, i)) != i2dest
! && ! find_reg_note (i2, REG_UNUSED,
! SET_DEST (XVECEXP (PATTERN (i2), 0, i))))
! for (temp = NEXT_INSN (i2);
! temp && (this_basic_block == n_basic_blocks - 1
! || BLOCK_HEAD (this_basic_block) != temp);
! temp = NEXT_INSN (temp))
! if (temp != i3 && GET_RTX_CLASS (GET_CODE (temp)) == 'i')
! for (link = LOG_LINKS (temp); link; link = XEXP (link, 1))
! if (XEXP (link, 0) == i2)
! XEXP (link, 0) = i3;
if (i3notes)
{
--- 2448,2469 ----
if (i3_subst_into_i2)
{
! if (GET_CODE (PATTERN (i2)) == PARALLEL)
! {
! for (i = 0; i < XVECLEN (PATTERN (i2), 0); i++)
! if (GET_CODE (SET_DEST (XVECEXP (PATTERN (i2), 0, i))) == REG
! && SET_DEST (XVECEXP (PATTERN (i2), 0, i)) != i2dest
! && ! find_reg_note (i2, REG_UNUSED,
! SET_DEST (XVECEXP (PATTERN (i2), 0, i))))
! for (temp = NEXT_INSN (i2);
! temp && (this_basic_block == n_basic_blocks - 1
! || BLOCK_HEAD (this_basic_block) != temp);
! temp = NEXT_INSN (temp))
! if (temp != i3 && GET_RTX_CLASS (GET_CODE (temp)) == 'i')
! for (link = LOG_LINKS (temp); link; link = XEXP (link, 1))
! if (XEXP (link, 0) == i2)
! XEXP (link, 0) = i3;
! }
if (i3notes)
{