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: 19 Oct 2003 05:18:43 -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-19 05:18 -------
Subject: Re: [3.3/3.4 regression] Incorrect comparison code generated for Alpha
"falk dot hueffner at student dot uni-tuebingen dot de" <gcc-bugzilla@gcc.gnu.org> writes:
/* Whee. Compare and branch against 0 directly. */
if (op1 == const0_rtx)
cmp_code = NIL, branch_code = code;
Previously, they were executed also with eg. LE. It doesn't change the
generated code, though, because this is optimized away somewhere else.
To me, it seems like a bad idea to intensionally generate redundant
insns with the hope they will be optimized away later.
How about this patch, which does the same as yours but seems clearer:
You comment is better, and surely moving the CONST_INT test
into the main if() is clearer. But I would argue that my minimalist
change should go in as the fix for this PR.
Any cleanup should be checked in separately, and only on main and
3.4 branches.