Commit 67e90093 by James E Wilson Committed by Jim Wilson

Testcases for mips conditional move patterns.

* 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
parent 4ef47bd8
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
......
/* { 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;
}
/* { 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;
}
/* { 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;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment