aboutsummaryrefslogtreecommitdiff
path: root/gcc/config/arm
diff options
context:
space:
mode:
authorKyrylo Tkachov <kyrylo.tkachov@arm.com>2015-11-06 12:04:15 +0000
committerKyrylo Tkachov <ktkachov@gcc.gnu.org>2015-11-06 12:04:15 +0000
commitc9aa6b940fb8c010ffbba8a6a2eb3ce1de21389f (patch)
treeabfaa95dcf19408483ccfe4f9c380784daa56057 /gcc/config/arm
parent66c5c67baffb2fa9fd9085c01f2811b07f0f7f60 (diff)
downloadgcc-c9aa6b940fb8c010ffbba8a6a2eb3ce1de21389f.zip
gcc-c9aa6b940fb8c010ffbba8a6a2eb3ce1de21389f.tar.gz
gcc-c9aa6b940fb8c010ffbba8a6a2eb3ce1de21389f.tar.bz2
[ARM/AArch64] PR 68088: Fix RTL checking ICE due to subregs inside accumulator forwarding check
PR target/68088 * config/arm/aarch-common.c (aarch_accumulator_forwarding): Strip subregs from accumulator and make sure it's a register. * gcc.dg/pr68088_1.c: New test. From-SVN: r229845
Diffstat (limited to 'gcc/config/arm')
-rw-r--r--gcc/config/arm/aarch-common.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/config/arm/aarch-common.c b/gcc/config/arm/aarch-common.c
index a940a02..e6668d5 100644
--- a/gcc/config/arm/aarch-common.c
+++ b/gcc/config/arm/aarch-common.c
@@ -460,6 +460,12 @@ aarch_accumulator_forwarding (rtx_insn *producer, rtx_insn *consumer)
return 0;
}
+ if (GET_CODE (accumulator) == SUBREG)
+ accumulator = SUBREG_REG (accumulator);
+
+ if (!REG_P (accumulator))
+ return 0;
+
return (REGNO (dest) == REGNO (accumulator));
}