This is the mail archive of the gcc@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: minor code-quality regression vs. 2.95


On Sun, Apr 23, 2000 at 01:40:20PM -0600, Jeffrey A Law wrote:
> 
>   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.

This one?

Tue Apr 18 14:16:47 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>

        * expmed.c (emit_store_flag): If comparing two-word integer
        with zero, can optimize NE, EQ, GE, and LT.

I think he was trying to fix a related problem on Alphas.  i386.md has
a cmpdi expander, and duplicates (nearly) the expmed.c code to synthesize
DImode comparisons in ix86_expand_branch.  We never go anywhere near
this part of the code.

zw

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