aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Sandiford <rsandifo@redhat.com>2004-11-27 09:54:10 +0000
committerRichard Sandiford <rsandifo@gcc.gnu.org>2004-11-27 09:54:10 +0000
commit601a71a77f63c5a9783bd0953299b7e18ecdc705 (patch)
treed92839f665c388189289c4f6440b77f2ebc93e1f
parente64ca6c474d58e97631bf92aa9823df39f28d332 (diff)
downloadgcc-601a71a77f63c5a9783bd0953299b7e18ecdc705.zip
gcc-601a71a77f63c5a9783bd0953299b7e18ecdc705.tar.gz
gcc-601a71a77f63c5a9783bd0953299b7e18ecdc705.tar.bz2
mips-movcc-[123].c: Pass the ?: expressions to other functions.
* gcc.dg/mips-movcc-[123].c: Pass the ?: expressions to other functions. From-SVN: r91371
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/gcc.dg/mips-movcc-1.c8
-rw-r--r--gcc/testsuite/gcc.dg/mips-movcc-2.c8
-rw-r--r--gcc/testsuite/gcc.dg/mips-movcc-3.c15
4 files changed, 24 insertions, 12 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index dc3edee..8162c13 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2004-11-27 Richard Sandiford <rsandifo@redhat.com>
+
+ * gcc.dg/mips-movcc-[123].c: Pass the ?: expressions to other
+ functions.
+
2004-11-27 Jakub Jelinek <jakub@redhat.com>
PR rtl-optimization/17825
diff --git a/gcc/testsuite/gcc.dg/mips-movcc-1.c b/gcc/testsuite/gcc.dg/mips-movcc-1.c
index b433a4d..1e05117 100644
--- a/gcc/testsuite/gcc.dg/mips-movcc-1.c
+++ b/gcc/testsuite/gcc.dg/mips-movcc-1.c
@@ -4,20 +4,22 @@
/* { dg-final { scan-assembler "movn" } } */
/* { dg-final { scan-assembler "movt" } } */
+void ext_int (int);
+
int
sub1 (int i, int j, int k)
{
- return k ? i : j;
+ ext_int (k ? i : j);
}
int
sub2 (int i, int j, long l)
{
- return !l ? i : j;
+ ext_int (!l ? i : j);
}
int
sub3 (int i, int j, float f)
{
- return f ? i : j;
+ ext_int (f ? i : j);
}
diff --git a/gcc/testsuite/gcc.dg/mips-movcc-2.c b/gcc/testsuite/gcc.dg/mips-movcc-2.c
index d8ea4cc..954a7f1 100644
--- a/gcc/testsuite/gcc.dg/mips-movcc-2.c
+++ b/gcc/testsuite/gcc.dg/mips-movcc-2.c
@@ -4,20 +4,22 @@
/* { dg-final { scan-assembler "movn" } } */
/* { dg-final { scan-assembler "movf" } } */
+void ext_long (long);
+
long
sub4 (long i, long j, long k)
{
- return k ? i : j;
+ ext_long (k ? i : j);
}
long
sub5 (long i, long j, int k)
{
- return !k ? i : j;
+ ext_long (!k ? i : j);
}
long
sub6 (long i, long j, float f)
{
- return !f ? i : j;
+ ext_long (!f ? i : j);
}
diff --git a/gcc/testsuite/gcc.dg/mips-movcc-3.c b/gcc/testsuite/gcc.dg/mips-movcc-3.c
index 9e515fa..0bffe68 100644
--- a/gcc/testsuite/gcc.dg/mips-movcc-3.c
+++ b/gcc/testsuite/gcc.dg/mips-movcc-3.c
@@ -7,38 +7,41 @@
/* { dg-final { scan-assembler "movn.d" } } */
/* { dg-final { scan-assembler "movf.d" } } */
+void ext_float (float);
+void ext_double (double);
+
float
sub7 (float f, float g, int i)
{
- return i ? f : g;
+ ext_float (i ? f : g);
}
float
sub8 (float f, float g, long l)
{
- return !l ? f : g;
+ ext_float (!l ? f : g);
}
float
sub9 (float f, float g, float h)
{
- return h ? f : g;
+ ext_float (h ? f : g);
}
double
suba (double f, double g, int i)
{
- return i ? f : g;
+ ext_double (i ? f : g);
}
double
subb (double f, double g, long l)
{
- return !l ? f : g;
+ ext_double (!l ? f : g);
}
double
subc (double f, double g, double h)
{
- return !h ? f : g;
+ ext_double (!h ? f : g);
}