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 for better support of LEA in HI/QI mode arithmetic.




  In message <19990416112816.41462@atrey.karlin.mff.cuni.cz>you write:
  > > Despite the fact that combine is trying to be clever, this is incorrect.
  > > You are lying to the compiler and it's a fact as sure as tomorrow that
  > > this will at some point do the wrong thing.
  > What wrong think?
Consider if the user really wanted to "ior" the bits and the low bits were
not already zero.  If you emit an lea, then you will get the wrong result.

  > > Otherwise sched2 will not know how to allow for AGI stall time.
  > Well, I am not sure if I understand what do you wnat to say. Why this is
  > so incorrect?
What I think Richard is trying to say is that you're trading one problem
for another.

One of the problems with the x86 port is the patterns which emit code do
a lot of things behind the back of the compiler (like converting shifts and
adds to lea instructions).  When the patterns do this at assembly output time
it makes it more difficult for us to describe these actions to the scheduler.

In some cases we can get the same behavior by splitting the insn during the
second scheduling pass to get the opts you want without losing scheduling
information.

Of course, I'm as guilty as everyone else in doing this.

jeff



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