[committed] PR target/94530 (was [PATCH] PR target/48240)

Message ID gkrwo6pvxxu.fsf_-_@arm.com
State New
Headers show
Series
  • [committed] PR target/94530 (was [PATCH] PR target/48240)
Related show

Commit Message

Andrea Corallo April 9, 2020, 8:57 a.m.
Hi all,

Second version of the patch for PR94530 (pr num fixed) addressing 
comments.

Bootstrapped on aarch64-unknown-linux-gnu.

Committed.

Andrea

gcc/ChangeLog

2020-04-09  Andrea Corallo  <andrea.corallo@arm.com>

	PR target/pr94530
	* config/aarch64/falkor-tag-collision-avoidance.c
	(valid_src_p): Fix missing rtx type check.

gcc/testsuite/ChangeLog

2020-04-09  Andrea Corallo  <andrea.corallo@arm.com>

	* gcc.target/aarch64/pr94530.c: New test.

Comments

Harald Anlauf via Gcc-patches April 10, 2020, 8:05 p.m. | #1
Hi,

On Thu, 9 Apr 2020 at 10:57, Andrea Corallo <andrea.corallo@arm.com> wrote:
>

> Hi all,

>

> Second version of the patch for PR94530 (pr num fixed) addressing

> comments.

>

> Bootstrapped on aarch64-unknown-linux-gnu.

>

> Committed.

>


The new test causes an ICE:

FAIL: gcc.target/aarch64/pr94530.c (internal compiler error)
FAIL: gcc.target/aarch64/pr94530.c (test for excess errors)
Excess errors:
during RTL pass: tag_collision_avoidance
/gcc/testsuite/gcc.target/aarch64/pr94530.c:9:1: internal compiler
error: Segmentation fault
0xd58bcf crash_signal
        /gcc/toplev.c:328
0x11d47f3 valid_src_p
        /gcc/config/aarch64/falkor-tag-collision-avoidance.c:541
0x11d47f3 get_load_info
        /gcc/config/aarch64/falkor-tag-collision-avoidance.c:644
0x11d58c7 record_loads
        /gcc/config/aarch64/falkor-tag-collision-avoidance.c:774
0x11d58c7 execute_tag_collision_avoidance()
        /gcc/config/aarch64/falkor-tag-collision-avoidance.c:827
0x11d6588 pass_tag_collision_avoidance::execute(function*)
        /gcc/config/aarch64/falkor-tag-collision-avoidance.c:874

Can you check?

Thanks,

Christophe

> Andrea

>

> gcc/ChangeLog

>

> 2020-04-09  Andrea Corallo  <andrea.corallo@arm.com>

>

>         PR target/pr94530

>         * config/aarch64/falkor-tag-collision-avoidance.c

>         (valid_src_p): Fix missing rtx type check.

>

> gcc/testsuite/ChangeLog

>

> 2020-04-09  Andrea Corallo  <andrea.corallo@arm.com>

>

>         * gcc.target/aarch64/pr94530.c: New test.

>

Patch

From 6136519229b43ad7a9d0d304fd42280a6757493c Mon Sep 17 00:00:00 2001
From: Andrea Corallo <andrea.corallo@arm.com>
Date: Wed, 8 Apr 2020 13:38:28 +0100
Subject: [PATCH] pr94530

---
 gcc/config/aarch64/falkor-tag-collision-avoidance.c | 3 +++
 gcc/testsuite/gcc.target/aarch64/pr94530.c          | 9 +++++++++
 2 files changed, 12 insertions(+)
 create mode 100644 gcc/testsuite/gcc.target/aarch64/pr94530.c

diff --git a/gcc/config/aarch64/falkor-tag-collision-avoidance.c b/gcc/config/aarch64/falkor-tag-collision-avoidance.c
index 719df484ee61..f850153fae02 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/gcc.target/aarch64/pr94530.c b/gcc/testsuite/gcc.target/aarch64/pr94530.c
new file mode 100644
index 000000000000..1f98201c50a8
--- /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("");
+}
-- 
2.17.1