[Bug target/56315] New: ARM: Improve use of 64-bit constants in logical operations
josh.m.conner at gmail dot com
gcc-bugzilla@gcc.gnu.org
Thu Feb 14 01:59:00 GMT 2013
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56315
Bug #: 56315
Summary: ARM: Improve use of 64-bit constants in logical
operations
Classification: Unclassified
Product: gcc
Version: 4.8.0
Status: UNCONFIRMED
Severity: enhancement
Priority: P3
Component: target
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: josh.m.conner@gmail.com
In the ARM backend, support was added for recognizing addition with 64-bit
constants that could be split up into two 32-bit literals that could be handled
with immediates in the adds/adc operations. However, this support is still not
present for the logical operations. For example, compiling this code with -O2:
unsigned long long or64 (unsigned long long input)
{
return input | 0x200000004ULL;
}
Gives us:
mov r2, #4
mov r3, #2
orr r0, r0, r2
orr r1, r1, r3
When it could produce:
orr r0, r0, #4
orr r1, r1, #2
The same improvement could be applied to & and ^ operations as well.
More information about the Gcc-bugs
mailing list