[AArch64] PR target/78362: Make sure to only take REGNO of a register
authorKyrylo Tkachov <kyrylo.tkachov@arm.com>
Wed, 30 Nov 2016 12:18:47 +0000 (12:18 +0000)
committerKyrylo Tkachov <ktkachov@gcc.gnu.org>
Wed, 30 Nov 2016 12:18:47 +0000 (12:18 +0000)
commit35323bd8654c0223a0f1513099da11beb94b3360
tree2896564ef0731191a193d5c73aa9ca146071e73e
parentac02e9a821bcd09c6dd1294760756f18af5e06ba
[AArch64] PR target/78362: Make sure to only take REGNO of a register

PR target/78362
* config/aarch64/aarch64.md (add<mode>3): Extract inner expression
from a subreg in operands[1] and don't call REGNO on a non-reg
expression when deciding to force operands[2] into a reg.

* gcc.c-torture/compile/pr78362.c: New test.

From-SVN: r243011
gcc/ChangeLog
gcc/config/aarch64/aarch64.md
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.c-torture/compile/pr78362.c [new file with mode: 0644]