This is the mail archive of the gcc-patches@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]
Other format: [Raw text]

Patch to fix simplify_subreg ICE


This is a patch to trap cases like the d10v that causes simplify_subreg
to ICE.

(ne:CC_REV (reg:CC_REV 35 f0)
    (const_int 0 [0x0]))



Bootstrapped and tested without any regressions on ppc, i686 without
any regressions.

2001-11-30 Alan Matsuoka <alanm@redhat.com>

	* combine.c (combine_simplify_rtx) : Can't simplify 
	cases that use condition codes.

Index: combine.c
===================================================================
RCS file: /cvs/cvsfiles/devo/gcc/combine.c,v
retrieving revision 1.265
diff -c -3 -p -r1.265 combine.c
*** combine.c	2001/11/26 01:11:57	1.265
--- combine.c	2001/12/11 16:32:29
*************** combine_simplify_rtx (x, op0_mode, last,
*** 3788,3801 ****
        break;
  
      case SUBREG:
!       if (op0_mode == VOIDmode)
  	op0_mode = GET_MODE (SUBREG_REG (x));
  
        /* simplify_subreg can't use gen_lowpart_for_combine.  */
        if (CONSTANT_P (SUBREG_REG (x))
  	  && subreg_lowpart_offset (mode, op0_mode) == SUBREG_BYTE (x))
  	return gen_lowpart_for_combine (mode, SUBREG_REG (x));
! 
        {
  	rtx temp;
  	temp = simplify_subreg (mode, SUBREG_REG (x), op0_mode,
--- 3788,3803 ----
        break;
  
      case SUBREG:
!       if (op0_mode == VOIDmode) 
  	op0_mode = GET_MODE (SUBREG_REG (x));
  
        /* simplify_subreg can't use gen_lowpart_for_combine.  */
        if (CONSTANT_P (SUBREG_REG (x))
  	  && subreg_lowpart_offset (mode, op0_mode) == SUBREG_BYTE (x))
  	return gen_lowpart_for_combine (mode, SUBREG_REG (x));
!       
!       if (GET_RTX_CLASS (GET_CODE (SUBREG_REG(x))) == '<')
!         break;
        {
  	rtx temp;
  	temp = simplify_subreg (mode, SUBREG_REG (x), op0_mode,
Alan Matsuoka
GCC Engineering
Red Hat Canada, Ltd
mailto:alanm@redhat.com Tel: (416) 482-2661 x250 / Fax: (416) 482-6299


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