minor code-quality regression vs. 2.95

Zack Weinberg zack@wolery.cumb.org
Fri Apr 14 15:15:00 GMT 2000


On Thu, Apr 13, 2000 at 11:29:18PM -0700, Zack Weinberg wrote:
> On Thu, Apr 13, 2000 at 04:16:47PM -0500, Clinton Popetz wrote:
> > On Wed, Apr 12, 2000 at 03:08:38PM -0700, Zack Weinberg wrote:
> >  
> > > I also can't figure out how we get from 'val / 512' to ix86_expand_branch.
> > > There's no divdi pattern, and the ashrdi patterns don't generate the
> > > branch and addition.  It must be hiding somewhere in the machine
> > > independent code, but I don't know where.
> > 
> > expand_divmod does this when branches are cheap.  
> 
> Hmm... expand_divmod calls do_cmp_and_jump, which looks like it would
> be the appropriate place to teach GCC that DImode < 0 or >= 0 can be
> done by looking only at the high word.  But when I do that (see patch
> below), it doesn't help, because i386 has a cmpdi pattern.  This
> seems silly to me... why not let the generic code synthesize it?
> 
> With the patch below _and_ cmpdi commented out of i386.md, I get the
> same assembly as 2.95 produced.  (The patch is overly long due to
> indentation changes.)

... but stage1 miscompiles cpp and we die horribly while trying to
build libstdc++.  Bugger.

zw



More information about the Gcc mailing list