From: jgreenhalgh Date: Fri, 4 Dec 2015 20:02:56 +0000 (+0000) Subject: [AArch64] Add register constraints to add3_pluslong X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=da54329a074eb7830ec8a5e5966265bfd9912bef;p=thirdparty%2Fgcc.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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@231304 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 81eb73fb893d..06e0d7b6b649 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 dee757b82077..28936d0485ce 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 ce36ec7a23d8..ebeab6b423c4 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 000000000000..036316ced951 --- /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; +}