aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.target/mips/mips-sched-madd.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.9/gcc/testsuite/gcc.target/mips/mips-sched-madd.c')
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/mips/mips-sched-madd.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/gcc.target/mips/mips-sched-madd.c b/gcc-4.9/gcc/testsuite/gcc.target/mips/mips-sched-madd.c
new file mode 100644
index 000000000..1db1550fd
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/gcc.target/mips/mips-sched-madd.c
@@ -0,0 +1,20 @@
+/* Test for case where another independent multiply insn may interfere
+ with a macc chain. */
+/* { dg-do compile } */
+/* { dg-options "-march=24kf" } */
+/* { dg-skip-if "code quality test" { *-*-* } { "-O0" } { "" } } */
+
+NOMIPS16 int foo (int a, int b, int c, int d, int e, int f, int g)
+{
+ int temp;
+ int acc;
+
+ acc = a * b;
+ temp = a * c;
+ acc = d * e + acc;
+ acc = f * g + acc;
+ return acc > temp ? acc : temp;
+}
+
+/* { dg-final { scan-assembler "\tmult\t" } } */
+/* { dg-final { scan-assembler "\tmadd\t" } } */