aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Sandiford <richard.sandiford@arm.com>2019-10-02 13:11:45 +0000
committerRichard Sandiford <rsandifo@gcc.gnu.org>2019-10-02 13:11:45 +0000
commit4bdb8c3dca3b518a6ca8dbaf60068f7e897ccc0e (patch)
treea80c46e65cb113c23411ef8d25a925fbb7fe6cc8 /gcc
parent3187c8a5010f4245ff008a0fc2fb746a8bce4a00 (diff)
downloadgcc-4bdb8c3dca3b518a6ca8dbaf60068f7e897ccc0e.zip
gcc-4bdb8c3dca3b518a6ca8dbaf60068f7e897ccc0e.tar.gz
gcc-4bdb8c3dca3b518a6ca8dbaf60068f7e897ccc0e.tar.bz2
Fix MIPS call-clobbered-*.c tests
Jeff pointed out that gcc.target/mips/call-clobbered-4.c started failing after the function-abi series. This is because IRA used to treat partly call-clobbered registers as hard conflicts and so wouldn't consider them for -fcaller-saves. Now that we treat call clobbers the same way regardless of where they come from, we can use $f21 as a caller-save register. This in turn means that -Os is no longer a special case in call-clobbered-3.c. (The new code is the same size as the old code.) 2019-10-02 Richard Sandiford <richard.sandiford@arm.com> gcc/testsuite/ * gcc.target/mips/call-clobbered-3.c: Remove skip for -Os. * gcc.target/mips/call-clobbered-4.c: Delete. From-SVN: r276456
Diffstat (limited to 'gcc')
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/gcc.target/mips/call-clobbered-3.c2
-rw-r--r--gcc/testsuite/gcc.target/mips/call-clobbered-4.c23
3 files changed, 5 insertions, 25 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 86b8f73..9ca45cb 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2019-10-02 Richard Sandiford <richard.sandiford@arm.com>
+
+ * gcc.target/mips/call-clobbered-3.c: Remove skip for -Os.
+ * gcc.target/mips/call-clobbered-4.c: Delete.
+
2019-10-02 Tobias Burnus <tobias@codesourcery.com>
* gfortran.dg/gomp/is_device_ptr-1.f90: New.
diff --git a/gcc/testsuite/gcc.target/mips/call-clobbered-3.c b/gcc/testsuite/gcc.target/mips/call-clobbered-3.c
index fce4d99..3a9e8d8 100644
--- a/gcc/testsuite/gcc.target/mips/call-clobbered-3.c
+++ b/gcc/testsuite/gcc.target/mips/call-clobbered-3.c
@@ -1,7 +1,5 @@
/* Check that we handle call-clobbered FPRs correctly. */
/* { dg-skip-if "code quality test" { *-*-* } { "-O0" } { "" } } */
-/* Refer to call-clobbered-4.c to see the expected output from -Os builds. */
-/* { dg-skip-if "uses callee-saved GPR" { *-*-* } { "-Os" } { "" } } */
/* { dg-options "-mabi=32 -modd-spreg -mfpxx -ffixed-f0 -ffixed-f1 -ffixed-f2 -ffixed-f3 -ffixed-f4 -ffixed-f5 -ffixed-f6 -ffixed-f7 -ffixed-f8 -ffixed-f9 -ffixed-f10 -ffixed-f11 -ffixed-f12 -ffixed-f13 -ffixed-f14 -ffixed-f15 -ffixed-f16 -ffixed-f17 -ffixed-f18 -ffixed-f19 -ffixed-f20 -ffixed-f22 -ffixed-f24 -ffixed-f26 -ffixed-f28 -ffixed-f30" } */
void bar (void);
diff --git a/gcc/testsuite/gcc.target/mips/call-clobbered-4.c b/gcc/testsuite/gcc.target/mips/call-clobbered-4.c
deleted file mode 100644
index 51498b8..0000000
--- a/gcc/testsuite/gcc.target/mips/call-clobbered-4.c
+++ /dev/null
@@ -1,23 +0,0 @@
-/* Check that we handle call-clobbered FPRs correctly.
- This test differs from call-clobbered-3.c because when optimising for size
- a callee-saved GPR is used for 'b' to cross the call. */
-/* { dg-skip-if "code quality test" { *-*-* } { "*" } { "-Os" } } */
-/* { dg-options "-mabi=32 -modd-spreg -mfpxx -ffixed-f0 -ffixed-f1 -ffixed-f2 -ffixed-f3 -ffixed-f4 -ffixed-f5 -ffixed-f6 -ffixed-f7 -ffixed-f8 -ffixed-f9 -ffixed-f10 -ffixed-f11 -ffixed-f12 -ffixed-f13 -ffixed-f14 -ffixed-f15 -ffixed-f16 -ffixed-f17 -ffixed-f18 -ffixed-f19 -ffixed-f20 -ffixed-f22 -ffixed-f24 -ffixed-f26 -ffixed-f28 -ffixed-f30" } */
-
-void bar (void);
-float a;
-float
-foo ()
-{
- float b = a + 1.0f;
- bar();
- return b;
-}
-/* { dg-final { scan-assembler-times "lwc1" 4 } } */
-/* { dg-final { scan-assembler-times "swc1" 2 } } */
-/* { dg-final { scan-assembler-times "mtc" 1 } } */
-/* { dg-final { scan-assembler-times "mfc" 1 } } */
-/* { dg-final { scan-assembler-not "mthc" } } */
-/* { dg-final { scan-assembler-not "mfhc" } } */
-/* { dg-final { scan-assembler-not "ldc1" } } */
-/* { dg-final { scan-assembler-not "sdc1" } } */