Commit 9f8d8755 by Chao-ying Fu Committed by Chao-ying Fu

* gcc.target/mips/msub-1.c, gcc.target/mips/msub-2.c,

* gcc.target/mips/msub-3.c, gcc.target/mips/msub-4.c,
* gcc.target/mips/msubu-1.c, gcc.target/mips/msubu-2.c,
* gcc.target/mips/msubu-3.c, gcc.target/mips/msubu-4.c: New tests.

From-SVN: r124559
parent 14661f36
2007-05-08 Chao-ying Fu <fu@mips.com>
* gcc.target/mips/msub-1.c, gcc.target/mips/msub-2.c,
* gcc.target/mips/msub-3.c, gcc.target/mips/msub-4.c,
* gcc.target/mips/msubu-1.c, gcc.target/mips/msubu-2.c,
* gcc.target/mips/msubu-3.c, gcc.target/mips/msubu-4.c: New tests.
2007-05-08 Simon Martin <simartin@users.sourceforge.net>
PR 31847
/* { dg-do compile } */
/* { dg-mips-options "-O2 -march=vr5400 -mgp32" } */
/* { dg-final { scan-assembler-times "\tmsac\t\\\$0," 2 } } */
long long
f1 (int x, int y, long long z)
{
return z - (long long) y * x;
}
long long
f2 (int x, int y, long long z)
{
long long t = (long long) x * y;
int temp = 5;
if (temp == 5)
z -= t;
return z;
}
/* { dg-do compile } */
/* { dg-mips-options "-O2 -march=vr5500 -mgp32" } */
/* { dg-final { scan-assembler-times "\tmsub\t" 2 } } */
long long
f1 (int x, int y, long long z)
{
return z - (long long) y * x;
}
long long
f2 (int x, int y, long long z)
{
long long t = (long long) x * y;
int temp = 5;
if (temp == 5)
z -= t;
return z;
}
/* { dg-do compile } */
/* { dg-mips-options "-O2 -mips32 -mgp32" } */
/* { dg-final { scan-assembler-times "\tmsub\t" 2 } } */
long long
f1 (int x, int y, long long z)
{
return z - (long long) y * x;
}
long long
f2 (int x, int y, long long z)
{
long long t = (long long) x * y;
int temp = 5;
if (temp == 5)
z -= t;
return z;
}
/* { dg-do compile } */
/* { dg-mips-options "-O2 -mips32r2 -mdspr2 -mgp32" } */
/* { dg-final { scan-assembler-times "\tmsub\t\\\$ac" 2 } } */
long long
f1 (int x, int y, long long z)
{
return z - (long long) y * x;
}
long long
f2 (int x, int y, long long z)
{
long long t = (long long) x * y;
int temp = 5;
if (temp == 5)
z -= t;
return z;
}
/* { dg-do compile } */
/* { dg-mips-options "-O2 -march=vr5400 -mgp32" } */
/* { dg-final { scan-assembler-times "\tmsacu\t\\\$0," 2 } } */
typedef unsigned int ui;
typedef unsigned long long ull;
ull
f1 (ui x, ui y, ull z)
{
return z - (ull) y * x;
}
ull
f2 (ui x, ui y, ull z)
{
ull t = (ull) x * y;
int temp = 5;
if (temp == 5)
z -= t;
return z;
}
/* { dg-do compile } */
/* { dg-mips-options "-O2 -march=vr5500 -mgp32" } */
/* { dg-final { scan-assembler-times "\tmsubu\t" 2 } } */
typedef unsigned int ui;
typedef unsigned long long ull;
ull
f1 (ui x, ui y, ull z)
{
return z - (ull) y * x;
}
ull
f2 (ui x, ui y, ull z)
{
ull t = (ull) x * y;
int temp = 5;
if (temp == 5)
z -= t;
return z;
}
/* { dg-do compile } */
/* { dg-mips-options "-O2 -mips32 -mgp32" } */
/* { dg-final { scan-assembler-times "\tmsubu\t" 2 } } */
typedef unsigned int ui;
typedef unsigned long long ull;
ull
f1 (ui x, ui y, ull z)
{
return z - (ull) y * x;
}
ull
f2 (ui x, ui y, ull z)
{
ull t = (ull) x * y;
int temp = 5;
if (temp == 5)
z -= t;
return z;
}
/* { dg-do compile } */
/* { dg-mips-options "-O2 -mips32r2 -mdspr2 -mgp32" } */
/* { dg-final { scan-assembler-times "\tmsubu\t\\\$ac" 2 } } */
typedef unsigned int ui;
typedef unsigned long long ull;
ull
f1 (ui x, ui y, ull z)
{
return z - (ull) y * x;
}
ull
f2 (ui x, ui y, ull z)
{
ull t = (ull) x * y;
int temp = 5;
if (temp == 5)
z -= t;
return z;
}
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