[Bug target/12654] [3.3/3.4 regression] Incorrect comparison code generated for Alpha
tg at swox dot com
gcc-bugzilla@gcc.gnu.org
Sun Oct 19 07:08:00 GMT 2003
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.
More information about the Gcc-bugs
mailing list