>Number: 9831 >Category: target >Synopsis: ARM: Peephole for multiple load/store could be more effective. >Confidential: no >Severity: non-critical >Priority: medium >Responsible: unassigned >State: open >Class: pessimizes-code >Submitter-Id: net >Arrival-Date: Mon Feb 24 15:26:00 UTC 2003 >Closed-Date: >Last-Modified: >Originator: Tamás Gergely >Release: gcc version 3.3 20030217 (prerelease) >Organization: >Environment: BUILD & HOST: Linux 2.4.20 i686 unknown TARGET: arm-unknown-elf >Description: In the case of subsequent loads from subsequent memory locations, if the base address is not loaded into a register (e.g. the loads use a label, that will be converted to pc relative loads), the corresponding peephole patterns will not optimize. The pattern will match, but multiple load instruction will not be generated. The same apply to stores. In the attached modified assembly code the 4 load instructions are replaced by an address computation and a multiple load (note that no additional register is required). >How-To-Repeat: gcc -S -Os 01.i // 01.i # 1 "01.c" # 1 "" # 1 "" # 1 "01.c" int f(int, int, int, int); void foo () { f(12345,238764,2345234, 83746556); } >Fix: >Release-Note: >Audit-Trail: >Unformatted: ----gnatsweb-attachment---- Content-Type: application/x-gzip; name="multiple-load-store.tar.gz" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="multiple-load-store.tar.gz" H4sIAIc1Wj4AA+2VXWvbMBSGcyv/ioNLIWGukSx/hOyDQS96U3a366DEshGzrSDLXbvS/z7Jdrrt YtvFSAbteSD2ee0jRZzwvqEsVosTQxmleU4XlFJWZKm/U5ZOd0/CsgUt8iRPecJz7vvTlC+Anvpg nqG3wgAsammsbn/fJxq5P8d5zswFMAgpi/dhMJbvdoNq7JXqPhwf7HXbiq6ERnXy+HBaoDoL1dJd I/jlsnobBHdalVBpDctV8BiA62MJT7Mo4esiTyNfu08Ea16keZblbs1T8L+H8Qpxv2R/+u/4s//z onj2f5IVo/8L9P9ZIHGlGklmR5O4l3urdEdiK+9t7AwcheI+jC4PRtc7ZXvXIhpVdyRxVd3onWiI 63LCPhykLyO4rIZu3CVwchOQjyBM3cN7oBEcjLTSpckoKiNa6UvfM4ptJ2Up59dDL/ut6HT30OrB VfMmvtmF0Rcwsla9lQZ6cSdBNqpVnbCyjAPSlIYYt0V8m8yCjeJNOstkkutZ8kmyZNzcwHyMSht3 Yt3oepAB2ZEqiG/55qcZuEVeftWmJGPAHcWUcz/UGHdHeQw9P2/1bZ5afDXNUZWysyS8ub7ewPLm 0+cV8JhDQil3f5QFLN0EjWyk6OUq/PfEpGzb6lJVyo3tVEHwV//n7Nn/WZq7/sQV6P9z8EL9L8py 9P9hH8EFGzOgVWJ89OgvPg58Bhj+9NocjyAIgiAIgiAIgiAIgiAIgiAIgiDIS+U7K3pjCQAoAAA=