optimization/3977: arm peephole for loading two consecutive memory locations generates suboptimal code (on arm7tdmi)
segher@chello.nl
segher@chello.nl
Thu Aug 9 12:46:00 GMT 2001
>Number: 3977
>Category: optimization
>Synopsis: arm peephole for loading two consecutive memory locations generates suboptimal code (on arm7tdmi)
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: unassigned
>State: open
>Class: pessimizes-code
>Submitter-Id: net
>Arrival-Date: Thu Aug 09 12:46:01 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator: segher@chello.nl
>Release: 3.0
>Organization:
>Environment:
>Description:
I often see generated code like
add temp, pointer, #offset
ldmia temp, {regA, regB}
(after which temp is dead)
which is slower than just
ldr regA, [pointer, #offset]
ldr regB, [pointer, #offset+4]
and wastes a register as well
>How-To-Repeat:
a lot of code will do this
>Fix:
change the peephole, i think
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the Gcc-bugs
mailing list