[arm] Perform early splitting of adddi3.
authorRichard Earnshaw <rearnsha@arm.com>
Fri, 18 Oct 2019 19:01:49 +0000 (19:01 +0000)
committerRichard Earnshaw <rearnsha@gcc.gnu.org>
Fri, 18 Oct 2019 19:01:49 +0000 (19:01 +0000)
commit0406dccda5c9adfaf65e132fda5b8c0fbc5ce1d5
treec5af2c341d3df8179000e0ece11be36b74e123c5
parent1769e3f3ac65d8d59bd8cc73aebd93af588388d2
[arm] Perform early splitting of adddi3.

This patch causes the expansion of adddi3 to split the operation
immediately for Arm and Thumb-2.  This is desirable as it frees up the
register allocator to pick what ever combination of registers suits
best and reduces the number of auxiliary patterns that we need in the
back-end.  Three of the testcases that we disabled earlier are already
fixed by this patch.  Finally, we add a new pattern to match the
canonicalization of add-with-carry when using an immediate of zero.

gcc:
* config/arm/arm-protos.h (arm_decompose_di_binop): New prototype.
* config/arm/arm.c (arm_decompose_di_binop): New function.
* config/arm/arm.md (adddi3): Also accept any const_int for op2.
If not generating Thumb-1 code, decompose the operation into 32-bit
pieces.
* add0si_carryin_<optab>: New pattern.

testsuite:
* gcc.target/arm/pr53447-1.c: Remove XFAIL.
* gcc.target/arm/pr53447-3.c: Remove XFAIL.
* gcc.target/arm/pr53447-4.c: Remove XFAIL.

From-SVN: r277165
gcc/ChangeLog
gcc/config/arm/arm-protos.h
gcc/config/arm/arm.c
gcc/config/arm/arm.md
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/arm/pr53447-1.c
gcc/testsuite/gcc.target/arm/pr53447-3.c
gcc/testsuite/gcc.target/arm/pr53447-4.c