* gcc.dg/mips-movcc-1.c: New test.
* gcc.dg/mips-movcc-2.c: New test.
* gcc.dg/mips-movcc-3.c: New test.
From-SVN: r86146
+2004-08-17 James E Wilson <wilson@specifixinc.com>
+
+ * gcc.dg/mips-movcc-1.c: New test.
+ * gcc.dg/mips-movcc-2.c: New test.
+ * gcc.dg/mips-movcc-3.c: New test.
+
2004-08-17 Mark Mitchell <mark@codesourcery.com>
PR c++/15871
--- /dev/null
+/* { dg-do compile { target "mips*-*-*" } } */
+/* { dg-options "-O2 -mips4" } */
+/* { dg-final { scan-assembler "movz" } } */
+/* { dg-final { scan-assembler "movn" } } */
+/* { dg-final { scan-assembler "movt" } } */
+
+int
+sub1 (int i, int j, int k)
+{
+ return k ? i : j;
+}
+
+int
+sub2 (int i, int j, long l)
+{
+ return !l ? i : j;
+}
+
+int
+sub3 (int i, int j, float f)
+{
+ return f ? i : j;
+}
--- /dev/null
+/* { dg-do compile { target "mips*-*-*" } } */
+/* { dg-options "-O2 -mips4" } */
+/* { dg-final { scan-assembler "movz" } } */
+/* { dg-final { scan-assembler "movn" } } */
+/* { dg-final { scan-assembler "movf" } } */
+
+long
+sub4 (long i, long j, long k)
+{
+ return k ? i : j;
+}
+
+long
+sub5 (long i, long j, int k)
+{
+ return !k ? i : j;
+}
+
+long
+sub6 (long i, long j, float f)
+{
+ return !f ? i : j;
+}
--- /dev/null
+/* { dg-do compile { target "mips*-*-*" } } */
+/* { dg-options "-O2 -mips4" } */
+/* { dg-final { scan-assembler "movz.s" } } */
+/* { dg-final { scan-assembler "movn.s" } } */
+/* { dg-final { scan-assembler "movt.s" } } */
+/* { dg-final { scan-assembler "movz.d" } } */
+/* { dg-final { scan-assembler "movn.d" } } */
+/* { dg-final { scan-assembler "movf.d" } } */
+
+float
+sub7 (float f, float g, int i)
+{
+ return i ? f : g;
+}
+
+float
+sub8 (float f, float g, long l)
+{
+ return !l ? f : g;
+}
+
+float
+sub9 (float f, float g, float h)
+{
+ return h ? f : g;
+}
+
+double
+suba (double f, double g, int i)
+{
+ return i ? f : g;
+}
+
+double
+subb (double f, double g, long l)
+{
+ return !l ? f : g;
+}
+
+double
+subc (double f, double g, double h)
+{
+ return !h ? f : g;
+}