This is the mail archive of the gcc-bugs@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]
Other format: [Raw text]

[Bug target/12654] [3.3/3.4 regression] Incorrect comparison code generated for Alpha


PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12654



------- Additional Comments From tg at swox dot com  2003-10-18 14:25 -------
Subject: Re:  [3.3/3.4 regression] Incorrect comparison code generated for Alpha

  Can you please explain this optimization to me? I have trouble
  seeing how this transformation would ever enable the bypass.
  
For (a != IMMEDIATE) and (a == IMMEDIATE) when IMMEDIATE doesn't fit
in a cmpeq but does fit into an lda, we want to generate

        lda     tmp,-IMMEDIATE(a)
        bne/beq ...

instead of

        lda     tmp, IMMEDIATE(r31)
        cmpeq   a, tmp
        beq/bne

I don't understand what you mean with "bypass" in this context.

  Also, your patch skips the "Compare and branch against 0 directly"
  for unsigned compares; since it doesn't seem to have any effect on
  the generated code, it should probably be removed altogether.

I don't understand.

What do you mean by "Compare and branch against 0 directly"?

My change doesn't change the behaviour for unsigned compares, it
merely disables an invalid optimization for signed compares, while the
optimization is left unchanged for EQ/NE compares.


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