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 wrote earlier:
> 
> > 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)?
> >
> ...
> > 
> > I will submit another patch shortly which addresses the other
> > cases as well.
> 
> Here is the revised patch. It fixes the original problem and passes
> "make bootstrap" on i686-linux (Red Hat 7.0).
> 

Here is my second revised patch. It passes bootstrap on i686-linux as well.

Wed Mar  7 10:23:49 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 17:56:17 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,6556 ----
  	 
        if (op_mode != GET_MODE (x) || op0 != XEXP (x, 0) || op1 != XEXP (x, 1))
  	x = gen_binary (code, op_mode, op0, op1);
+ 
        break;
  
      case ASHIFT:
***************
*** 6796,6801 ****
--- 6801,6811 ----
      default:
        break;
      }
+ 
+   /* 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(mode, x, gen_rtx_CONST_INT(VOIDmode, orig_mask));
  
    /* Ensure we return a value of the proper mode.  */
    return gen_lowpart_for_combine (mode, x);


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