This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[MIPS, committed] Expect MIPS16 to use memcpy for short strings
- From: Richard Sandiford <rdsandiford at googlemail dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Sun, 05 Feb 2012 15:01:11 +0000
- Subject: [MIPS, committed] Expect MIPS16 to use memcpy for short strings
Although I changed non-MIPS16 code to allow larger inline copies:
http://gcc.gnu.org/ml/gcc-patches/2012-01/msg00053.html
MIPS16 code is still for now expected to use memcpy. This patch
adjusts the testsuite accordingly.
Tested on mips64-linux-gnu and various ELF targets. Applied.
Richard
gcc/testsuite/
* gcc.dg/tree-prof/stringop-2.c (main): Add a nomips16 attribute
on MIPS targets.
* gfortran.dg/pr45636.f90: XFAIL for MIPS16 targets.
Index: gcc/testsuite/gcc.dg/tree-prof/stringop-2.c
===================================================================
--- gcc/testsuite/gcc.dg/tree-prof/stringop-2.c 2012-02-04 10:57:10.000000000 +0000
+++ gcc/testsuite/gcc.dg/tree-prof/stringop-2.c 2012-02-05 14:23:07.000000000 +0000
@@ -3,6 +3,10 @@
int b[1000];
int size=1;
int max=10000;
+#ifdef __mips
+/* We allow short memcpy()s for MIPS16. */
+int __attribute__((nomips16))
+#endif
main()
{
int i;
Index: gcc/testsuite/gfortran.dg/pr45636.f90
===================================================================
--- gcc/testsuite/gfortran.dg/pr45636.f90 2012-02-05 14:23:36.000000000 +0000
+++ gcc/testsuite/gfortran.dg/pr45636.f90 2012-02-05 14:26:41.000000000 +0000
@@ -10,5 +10,5 @@ program main
b = y
call sub(a, b)
end program main
-! { dg-final { scan-tree-dump-times "memset" 0 "forwprop2" } }
+! { dg-final { scan-tree-dump-times "memset" 0 "forwprop2" { xfail { mips*-*-* && { ! nomips16 } } } } }
! { dg-final { cleanup-tree-dump "forwprop2" } }