aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/mips/msubu-2.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.target/mips/msubu-2.c')
-rw-r--r--gcc/testsuite/gcc.target/mips/msubu-2.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.target/mips/msubu-2.c b/gcc/testsuite/gcc.target/mips/msubu-2.c
new file mode 100644
index 00000000000..75fb404eb97
--- /dev/null
+++ b/gcc/testsuite/gcc.target/mips/msubu-2.c
@@ -0,0 +1,22 @@
+/* { 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;
+}