From mboxrd@z Thu Jan 1 00:00:00 1970 From: segher@chello.nl To: gcc-gnats@gcc.gnu.org Subject: optimization/3978: arm peephole for loading two consecutive memory locations generates suboptimal code (on arm7tdmi) Date: Thu, 09 Aug 2001 12:56:00 -0000 Message-id: <20010809194640.3740.qmail@sourceware.cygnus.com> X-SW-Source: 2001-08/msg00143.html List-Id: >Number: 3978 >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:56:00 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: