diff options
Diffstat (limited to 'gcc/testsuite/gcc.target/bfin/wmul-1.c')
-rw-r--r-- | gcc/testsuite/gcc.target/bfin/wmul-1.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.target/bfin/wmul-1.c b/gcc/testsuite/gcc.target/bfin/wmul-1.c new file mode 100644 index 00000000000..f17fc199e8c --- /dev/null +++ b/gcc/testsuite/gcc.target/bfin/wmul-1.c @@ -0,0 +1,18 @@ +/* { dg-do compile } */ +/* { dg-options "-O2" } */ + +int mac(const short *a, const short *b, int sqr, int *sum) +{ + int i; + int dotp = *sum; + + for (i = 0; i < 150; i++) { + dotp += b[i] * a[i]; + sqr += b[i] * b[i]; + } + + *sum = dotp; + return sqr; +} + +/* { dg-final { scan-assembler-times "\\(IS\\)" 2 } } */ |