[Bug rtl-optimization/30967] New: Extra sign/zero extend with word comparison result
pinskia at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Mon Feb 26 11:42:00 GMT 2007
Testcase:
int f1(int a, int b)
{
return a == b;
}
------
We produce right now:
_f1:
xor r4,r3,r4
cntlzw r4,r4 <--- sign never 1
srwi r4,r4,5 <--- upper bits defined as 0
extsw r3,r4
blr
The sign extend is incorrect as r4's sign will never be 1 and all the upper
bits will always be zero because of srwi.
we have the same issue if the return value is unsigned int also in that there
is an extra zero extend.
This is even with -fsee.
--
Summary: Extra sign/zero extend with word comparison result
Product: gcc
Version: 4.3.0
Status: UNCONFIRMED
Keywords: missed-optimization
Severity: normal
Priority: P3
Component: rtl-optimization
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: pinskia at gcc dot gnu dot org
GCC target triplet: powerpc64-apple-darwin
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30967
More information about the Gcc-bugs
mailing list