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]

Re: New testcase [v3.0.4 ICE on alpha]



Hi Richard,
> On Fri, Mar 08, 2002 at 12:01:56AM -0700, Roger Sayle wrote:
> > 20020308-1.c:10: Unrecognizable insn:
> > (insn 42 41 43 (set (reg:DF 73)
> >         (ge:DF (reg/v:DF 69)
> >             (const_double:DF (cc0) 0 [0x0] 0 [0x0] 0 [0x0])))
>
> IIRC, this was fixed by either
>
> 2001-07-28  Richard Henderson  <rth@redhat.com>
>
>         * varasm.c (immed_real_const_1): Don't elide special cases for
>         nested functions.
>         (clear_const_double_mem): Clear const_tiny_rtx too.
>
> or
>
>
> Sat Nov  3 10:37:56 2001  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
>
>         * cselib.c (cselib_subst_to_values, case CONST_DOUBLE): Remove
>         reference to CONST_DOUBLE_MEM in comment.
> 	...
>
> Certainly the failure is familiar.

I think you know as well as I do that neither of those patches had
anything to do with this ICE :>  But you did get me to do the leg
work...

The problem should be familiar, it was fixed by your patch:

2001-07-25  Richard Henderson  <rth@redhat.com>

        * config/alpha/alpha.c (alpha_emit_conditional_move): Always
        swap GE/GT if it is an fp comparison.


Mysteriously, I can't seem to find a posting on gcc-patches that
describes the patch or its motivation, and it didn't include a
testcase of its own.

Applying the critical hunk of that patch fixes this ICE on the 3.0
branch on alphaev67-dec-osf5.1 without any new regressions.  I've
provided the diff below against 3.0.4, in case its considered critical
enough for an unlikely 3.0.5.  I still think the previously posted
testcase should be added to the mainline testsuite to prevent the
problem reappearing in the future.

Patch ok for 3.0 branch?  New testcase ok everywhere?



*** gcc-3.0.4/gcc/config/alpha/alpha.c	Tue Jan 29 01:18:17 2002
--- patch/gcc/config/alpha/alpha.c	Sat Mar  9 21:16:00 2002
*************** alpha_emit_setcc (code)
*** 1831,1837 ****
        break;

      case GE:  case GT: case GEU:  case GTU:
!       /* These are normally need swapping, but for integer zero we have
  	 special patterns that recognize swapped operands.  */
        if (!fp_p && op1 == const0_rtx)
  	break;
--- 1831,1837 ----
        break;

      case GE:  case GT: case GEU:  case GTU:
!       /* These normally need swapping, but for integer zero we have
  	 special patterns that recognize swapped operands.  */
        if (!fp_p && op1 == const0_rtx)
  	break;
*************** alpha_emit_conditional_move (cmp, mode)
*** 1922,1929 ****
  	  break;

  	case GE: case GT: case GEU: case GTU:
! 	  /* These must be swapped.  */
! 	  if (op1 == CONST0_RTX (cmp_mode))
  	    cmp_code = code, code = NE;
  	  else
  	    {
--- 1922,1930 ----
  	  break;

  	case GE: case GT: case GEU: case GTU:
! 	  /* These normally need swapping, but for integer zero we have
!              special patterns that recognize swapped operands.  */
! 	  if (!fp_p && op1 == CONST0_RTX (cmp_mode))
  	    cmp_code = code, code = NE;
  	  else
  	    {

Roger
--
Roger Sayle,                         E-mail: roger@eyesopen.com
OpenEye Scientific Software,         WWW: http://www.eyesopen.com/
Suite 1107, 3600 Cerrillos Road,     Tel: (+1) 505-473-7385
Santa Fe, New Mexico, 87507.         Fax: (+1) 505-473-0833


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