]> git.ipfire.org Git - thirdparty/gcc.git/commit
arm: Use LDMIA/STMIA for thumb1 DI/DF loads/stores
authorSiarhei Volkau <lis8215@gmail.com>
Thu, 20 Jun 2024 07:24:31 +0000 (10:24 +0300)
committerRichard Earnshaw <rearnsha@arm.com>
Thu, 4 Jul 2024 09:40:23 +0000 (10:40 +0100)
commit236d6fef2479654b3011f8208e1bd7f078700109
tree055695afba9d22ca3423d59f2226f86bab034af6
parent11049cdf204bc96bc407e5dd44ed3b8a492f405a
arm: Use LDMIA/STMIA for thumb1 DI/DF loads/stores

If the address register is dead after load/store operation it looks
beneficial to use LDMIA/STMIA instead of pair of LDR/STR instructions,
at least if optimizing for size.

gcc/ChangeLog:

* config/arm/arm.cc (thumb_load_double_from_address): Emit ldmia
when address reg rewritten by load.
* config/arm/thumb1.md (peephole2 to rewrite DI/DF load): New.
(peephole2 to rewrite DI/DF store): New.
* config/arm/iterators.md (DIDF): New.

gcc/testsuite:

* gcc.target/arm/thumb1-load-store-64bit.c: Add new test.

Signed-off-by: Siarhei Volkau <lis8215@gmail.com>
gcc/config/arm/arm.cc
gcc/config/arm/iterators.md
gcc/config/arm/thumb1.md
gcc/testsuite/gcc.target/arm/thumb1-load-store-64bit.c [new file with mode: 0644]