This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: minor code-quality regression vs. 2.95
- To: Zack Weinberg <zack at wolery dot cumb dot org>
- Subject: Re: minor code-quality regression vs. 2.95
- From: Jeffrey A Law <law at cygnus dot com>
- Date: Sun, 23 Apr 2000 13:40:20 -0600
- cc: Clinton Popetz <cpopetz at cygnus dot com>, gcc at gcc dot gnu dot org
- Reply-To: law at cygnus dot com
In message <20000413232918.J9184@wolery.cumb.org>you write:
> 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_bran
> ch.
> > > 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?
I believe Richard Kenner checked in a case to optimize this stuff a couple
days ago, possibly even based on your change.
jeff