[Bug tree-optimization/57567] New: Missed optimsation : compare + or
john@bass-software.com
gcc-bugzilla@gcc.gnu.org
Sat Jun 8 15:42:00 GMT 2013
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57567
Bug ID: 57567
Summary: Missed optimsation : compare + or
Product: gcc
Version: 4.9.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: tree-optimization
Assignee: unassigned at gcc dot gnu.org
Reporter: john@bass-software.com
Using 4.9.0 20130608 (experimental) [trunk revision 199851], target
arm-unknown-eabi.
The following case produces suboptimal code:
unsigned
test (unsigned t)
{
if (t != (unsigned)-1)
t |= 3;
return t;
}
Result:
cmn r0, #1
orrne r0, r0, #3
A simple:
orr r0, r0, #3
would be enough.
More information about the Gcc-bugs
mailing list