[AArch64] Add register constraints to add<mode>3_pluslong
authorJames Greenhalgh <james.greenhalgh@arm.com>
Fri, 4 Dec 2015 20:02:56 +0000 (20:02 +0000)
committerJames Greenhalgh <jgreenhalgh@gcc.gnu.org>
Fri, 4 Dec 2015 20:02:56 +0000 (20:02 +0000)
gcc/

2015-12-04  James Greenhalgh  <james.greenhalgh@arm.com>

* config/aarch64/aarch64.md (add<mode>3_pluslong): Add register
constraints.

gcc/testsuite/

2015-12-04  James Greenhalgh  <james.greenhalgh@arm.com>

* gcc.c-torture/compile/20151204.c: New.

From-SVN: r231304

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

index 81eb73fb893da300f2cd51e51a387f2b5825794c..06e0d7b6b649cff88210032d639cea7e7e2970b0 100644 (file)
@@ -1,3 +1,8 @@
+2015-12-04  James Greenhalgh  <james.greenhalgh@arm.com>
+
+       * config/aarch64/aarch64.md (add<mode>3_pluslong): Add register
+       constraints.
+
 2015-12-04  Vladimir Makarov  <vmakarov@redhat.com>
 
        PR rtl-optimization/68349
index dee757b820774c75ec814f743a071d3abcb58955..28936d0485ce4004be135feb3af6f795b3ebb2cf 100644 (file)
 
 (define_insn_and_split "*add<mode>3_pluslong"
   [(set
-    (match_operand:GPI 0 "register_operand" "")
-    (plus:GPI (match_operand:GPI 1 "register_operand" "")
-             (match_operand:GPI 2 "aarch64_pluslong_operand" "")))]
+    (match_operand:GPI 0 "register_operand" "=r")
+    (plus:GPI (match_operand:GPI 1 "register_operand" "r")
+             (match_operand:GPI 2 "aarch64_pluslong_immediate" "i")))]
   "!aarch64_plus_operand (operands[2], VOIDmode)
    && !aarch64_move_imm (INTVAL (operands[2]), <MODE>mode)"
   "#"
index ce36ec7a23d84759477f6cacb0a1784184a1e35f..ebeab6b423c48070a79ea17230790ed9342c3850 100644 (file)
@@ -1,3 +1,7 @@
+2015-12-04  James Greenhalgh  <james.greenhalgh@arm.com>
+
+       * gcc.c-torture/compile/20151204.c: New.
+
 2015-12-04  Nathan Sidwell  <nathan@acm.org>
 
        * gcc.dg/vla-24.c: Requires alloca.
diff --git a/gcc/testsuite/gcc.c-torture/compile/20151204.c b/gcc/testsuite/gcc.c-torture/compile/20151204.c
new file mode 100644 (file)
index 0000000..036316c
--- /dev/null
@@ -0,0 +1,19 @@
+typedef __SIZE_TYPE__ size_t;
+
+int strcmp (const char*, const char*);
+void *memchr (const void *, int, size_t);
+char* strncpy (char *, const char *, size_t);
+
+int
+main (int argc, char** argv)
+{
+  char target[32753] = "A";
+  char buffer[32753];
+  char *x;
+  x = buffer;
+
+  if (strcmp (target, "A")
+      || memchr (target, 'A', 0) != ((void *) 0))
+    if (strncpy (x, "", 4) != x);
+  return 0;
+}