]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
[AArch64] PR target/68363 Check that argument is real INSN in aarch64_madd_needs_nop
authorKyrylo Tkachov <kyrylo.tkachov@arm.com>
Mon, 23 Nov 2015 15:25:36 +0000 (15:25 +0000)
committerKyrylo Tkachov <ktkachov@gcc.gnu.org>
Mon, 23 Nov 2015 15:25:36 +0000 (15:25 +0000)
Backport from mainline
2015-11-23  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>

PR target/68363
* config/aarch64/aarch64.c (aarch64_madd_needs_nop): Reject arguments
that are not INSN_P.

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

From-SVN: r230765

gcc/ChangeLog
gcc/config/aarch64/aarch64.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/aarch64/pr68363_1.c [new file with mode: 0644]

index 15d77ee61e7bf7444ef1aea5d78dee2fdf63b716..33584acf3515fb53d5d26189126ec381cf98bf25 100644 (file)
@@ -1,3 +1,12 @@
+2015-11-23  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
+
+       Backport from mainline
+       2015-11-23  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
+
+       PR target/68363
+       * config/aarch64/aarch64.c (aarch64_madd_needs_nop): Reject arguments
+       that are not INSN_P.
+
 2015-11-19  Matthias Klose  <doko@ubuntu.com>
 
        Backport from the gcc-5-branch
index 752df4ef7aef2ca520c8ed9cfebd58871f8eb5f9..81539975e3c8f26db30a9e0438233d4f9c0c33ac 100644 (file)
@@ -6564,7 +6564,7 @@ aarch64_madd_needs_nop (rtx insn)
   if (!aarch64_fix_a53_err835769)
     return false;
 
-  if (recog_memoized (insn) < 0)
+  if (!INSN_P (insn) || recog_memoized (insn) < 0)
     return false;
 
   attr_type = get_attr_type (insn);
index 0072132c0b0af603e67cbb60bbc99083781500b3..08984f016cd06c3df4a438a5be1a8a60257633c6 100644 (file)
@@ -1,3 +1,11 @@
+2015-11-23  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
+
+       Backport from mainline
+       2015-11-23  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
+
+       PR target/68363
+       * gcc.target/aarch64/pr68363_1.c: New test.
+
 2015-11-12  Eric Botcazou  <ebotcazou@adacore.com>
 
        * gcc.target/i386/pr67265-2.c: New test.
diff --git a/gcc/testsuite/gcc.target/aarch64/pr68363_1.c b/gcc/testsuite/gcc.target/aarch64/pr68363_1.c
new file mode 100644 (file)
index 0000000..bb294b5
--- /dev/null
@@ -0,0 +1,19 @@
+/* { dg-do compile } */
+/* { dg-options "-mfix-cortex-a53-835769" } */
+
+int
+foo (int i)
+{
+  switch (i)
+    {
+    case 0:
+    case 2:
+    case 5:
+      return 0;
+    case 7:
+    case 11:
+    case 13:
+      return 1;
+    }
+  return -1;
+}