From: Andrea Corallo Date: Wed, 8 Apr 2020 12:38:28 +0000 (+0100) Subject: PR target/94530 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=af19e4d0e23e5f61fc15e44a58bfa3b047854b1e;p=gcc.git PR target/94530 gcc/ChangeLog 2020-04-09 Andrea Corallo PR target/94530 * config/aarch64/falkor-tag-collision-avoidance.c (valid_src_p): Fix missing rtx type check. gcc/testsuite/ChangeLog 2020-04-09 Andrea Corallo * gcc.target/aarch64/pr94530.c: New test. --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index d45d272704c..80492ef4163 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2020-04-09 Andrea Corallo + + PR target/94530 + * config/aarch64/falkor-tag-collision-avoidance.c + (valid_src_p): Fix missing rtx type check. + 2020-04-09 Bin Cheng Richard Biener diff --git a/gcc/config/aarch64/falkor-tag-collision-avoidance.c b/gcc/config/aarch64/falkor-tag-collision-avoidance.c index 719df484ee6..f850153fae0 100644 --- a/gcc/config/aarch64/falkor-tag-collision-avoidance.c +++ b/gcc/config/aarch64/falkor-tag-collision-avoidance.c @@ -538,6 +538,9 @@ valid_src_p (rtx src, rtx_insn *insn, struct loop *loop, bool *pre_post, if (!aarch64_classify_address (&addr, XEXP (x, 0), mode, true)) return false; + if (!REG_P (addr.base)) + return false; + unsigned regno = REGNO (addr.base); if (global_regs[regno] || fixed_regs[regno]) return false; diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 960eae47308..fde4e0fa4a7 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2020-04-09 Andrea Corallo + + * gcc.target/aarch64/pr94530.c: New test. + 2020-04-09 Bin Cheng PR tree-optimization/93674 diff --git a/gcc/testsuite/gcc.target/aarch64/pr94530.c b/gcc/testsuite/gcc.target/aarch64/pr94530.c new file mode 100644 index 00000000000..1f98201c50a --- /dev/null +++ b/gcc/testsuite/gcc.target/aarch64/pr94530.c @@ -0,0 +1,9 @@ +/* { dg-do compile } */ +/* { dg-options "-Os -mcpu=falkor -mpc-relative-literal-loads -mcmodel=large" } */ + +extern void bar(const char *); + +void foo(void) { + for (;;) + bar(""); +}