This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/12654] [3.3/3.4 regression] Incorrect comparison code generated for Alpha
- From: "tg at swox dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 18 Oct 2003 14:25:39 -0000
- Subject: [Bug target/12654] [3.3/3.4 regression] Incorrect comparison code generated for Alpha
- References: <20031017020801.12654.tg at swox dot com>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
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.