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]

Re: Patch review - any way to expedite?



I sent this message to Geoffrey, but forgot to post to list;
so here's another copy:

Geoffrey Keating <geoffk@geoffk.org> wrote:

> Toshi Morita <tm2@best.com> writes:
> 
> > Is there any additional information I can supply to expediate the
> > acceptance of the patch I mentioned in these messages?
> > 
> > http://gcc.gnu.org/ml/gcc-bugs/2001-02/msg00658.html
> > http://gcc.gnu.org/ml/gcc-bugs/2001-02/msg00648.html
> > 
> > The patch seems fairly simple, and I'd like to see it included
> > in both gcc-2.95.3 and gcc-3.0 as it's causing severe problems
> > for some of our developers.
> 
> I've looked at this patch, and it has these problems:

...

> - I don't see why the patch is correct.  It seems that this is exactly
>   the situation where force_to_mode should be called.  Are you sure
>   the bug isn't somewhere else (like in force_to_mode, or in the next
>   line of code)?

Here is the revised patch. It fixes the original problem and passes
"make bootstrap" on i686-linux.

Please install for both 2.95.x and 3.x branches if acceptable.

Tue Mar  6 15:59:35 PST 2001  Toshiyasu Morita (toshiyasu.morita@hsa.hitachi.com)

        * combine.c (force_to_mode): When mask for child rtx is widened,
        save the original mask and apply to parent rtx.

*** combine.c.bak	Tue Mar  6 12:19:33 2001
--- combine.c	Tue Mar  6 12:29:01 2001
***************
*** 6274,6282 ****
    enum rtx_code code = GET_CODE (x);
    int next_select = just_select || code == XOR || code == NOT || code == NEG;
    enum machine_mode op_mode;
!   unsigned HOST_WIDE_INT fuller_mask, nonzero;
    rtx op0, op1, temp;
  
    /* If this is a CALL or ASM_OPERANDS, don't do anything.  Some of the
       code below will do the wrong thing since the mode of such an
       expression is VOIDmode. 
--- 6274,6286 ----
    enum rtx_code code = GET_CODE (x);
    int next_select = just_select || code == XOR || code == NOT || code == NEG;
    enum machine_mode op_mode;
!   unsigned HOST_WIDE_INT fuller_mask, orig_mask, nonzero;
    rtx op0, op1, temp;
  
+   /* Save the original mask in case we're forced to widen the mask
+      for the child rtxes.  */
+   orig_mask = mask;
+ 
    /* If this is a CALL or ASM_OPERANDS, don't do anything.  Some of the
       code below will do the wrong thing since the mode of such an
       expression is VOIDmode. 
***************
*** 6546,6551 ****
--- 6550,6561 ----
  	 
        if (op_mode != GET_MODE (x) || op0 != XEXP (x, 0) || op1 != XEXP (x, 1))
  	x = gen_binary (code, op_mode, op0, op1);
+ 
+       /* If we were forced to widen the mask for the child rtxes, then apply
+          the original mask to the entire rtx.  */
+       if (mask != orig_mask)
+         x = gen_rtx_AND(SImode, x, gen_rtx_CONST_INT(VOIDmode, orig_mask));
+ 
        break;
  
      case ASHIFT:

Toshi


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