This is the mail archive of the gcc-regression@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

flow.c:verify_local_live_at_start patch (Was: 1 GCC regressions, 1 new, with your patch on 2000-11-02T22:05:00Z)


> With your recent patch, GCC has some regression test failures, which
> used to pass.  There are 1 new failures, and 0
> failures that existed before and after that patch; 0 failures
> have been fixed.
> 
> The new failures are:
> gcc.sum gcc.c-torture/compile/920909-1.c,

This is a actually a flow bug.

The combiner has combined two insn that use / set hard registers:

Breakpoint 12, try_combine (i3=0x401628a0, i2=0x40162760, i1=0x0, 
    new_direct_jump_p=0xbffff0b8) at /s/fsf/egcs/gcc/combine.c:1488
1488      int insn_code_number, i2_code_number = 0, other_code_number = 0;
(gdb) call debug_rtx(i3)
(insn 17 15 18 (set (reg:SI 5 r5)
        (subreg:SI (reg/v:DI 83) 1)) 282 {*movsi_internal1} (insn_list 6 (nil))
    (expr_list:REG_DEAD (reg/v:DI 83)
        (nil)))
(gdb) call debug_rtx(i2)

(insn 6 30 7 (set (reg/v:DI 83)
        (reg:DI 5 r5)) 293 {*movdi_internal32} (nil)
    (expr_list:REG_DEAD (reg:DI 5 r5)
        (nil)))

Thus making r5 dead:

(gdb) call debug_rtx(i3)

(insn 17 15 18 (set (reg:SI 5 r5)
        (reg:SI 6 r6)) 282 {*movsi_internal1} (nil)
    (nil))
(gdb) call debug_rtx(i2)

(note 6 30 7 ("-") 293 0)

Appended is a patch that makes gcc accept these combinations:

Fri Nov  3 03:13:08 2000  J"orn Rennecke <amylaar@redhat.com>

	* flow.c (verify_local_live_at_start): Allow hard regs to die.

Index: flow.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/flow.c,v
retrieving revision 1.345
diff -p -r1.345 flow.c
*** flow.c	2000/10/18 10:10:38	1.345
--- flow.c	2000/11/03 03:13:04
*************** verify_local_live_at_start (new_live_at_
*** 2888,2898 ****
  
        EXECUTE_IF_SET_IN_REG_SET (new_live_at_start, 0, i,
  	{
!           /* No registers should die.  */
  	  if (REGNO_REG_SET_P (bb->global_live_at_start, i))
! 	    abort ();
!           /* Verify that the now-live register is wider than word_mode.  */
! 	  verify_wide_reg (i, bb->head, bb->end);
  	});
      }
  }
--- 2888,2911 ----
  
        EXECUTE_IF_SET_IN_REG_SET (new_live_at_start, 0, i,
  	{
!           /* No pseudo registers should die.  */
  	  if (REGNO_REG_SET_P (bb->global_live_at_start, i))
! 	    {
! 	      /* But hard regs can reasonably die, e.g. when we combine
! 		 (insn 6 30 7 (set (reg/v:DI 83)
! 				   (reg:DI 5 r5)) (nil)
! 		     (expr_list:REG_DEAD (reg:DI 5 r5) (nil)))
! 		 ... and ...
! 		 (insn 17 15 18 (set (reg:SI 5 r5)
! 				(subreg:SI (reg/v:DI 83) 1)) (insn_list 6 (nil))
! 		     (expr_list:REG_DEAD (reg/v:DI 83) (nil))) .  */
! 
! 	      if (i >= FIRST_PSEUDO_REGISTER)
! 		abort ();
! 	    }
! 	  else
! 	    /* Verify that the now-live register is wider than word_mode.  */
! 	    verify_wide_reg (i, bb->head, bb->end);
  	});
      }
  }

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]