From: James Greenhalgh Date: Fri, 4 Dec 2015 20:02:56 +0000 (+0000) Subject: [AArch64] Add register constraints to add3_pluslong X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=bdf5848047f719389f64bcd2a6dda081adafa9aa;p=gcc.git [AArch64] Add register constraints to add3_pluslong gcc/ 2015-12-04 James Greenhalgh * config/aarch64/aarch64.md (add3_pluslong): Add register constraints. gcc/testsuite/ 2015-12-04 James Greenhalgh * gcc.c-torture/compile/20151204.c: New. From-SVN: r231304 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 81eb73fb893..06e0d7b6b64 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2015-12-04 James Greenhalgh + + * config/aarch64/aarch64.md (add3_pluslong): Add register + constraints. + 2015-12-04 Vladimir Makarov PR rtl-optimization/68349 diff --git a/gcc/config/aarch64/aarch64.md b/gcc/config/aarch64/aarch64.md index dee757b8207..28936d0485c 100644 --- a/gcc/config/aarch64/aarch64.md +++ b/gcc/config/aarch64/aarch64.md @@ -1615,9 +1615,9 @@ (define_insn_and_split "*add3_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)" "#" diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index ce36ec7a23d..ebeab6b423c 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2015-12-04 James Greenhalgh + + * gcc.c-torture/compile/20151204.c: New. + 2015-12-04 Nathan Sidwell * 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 index 00000000000..036316ced95 --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/compile/20151204.c @@ -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; +}