+2016-02-04 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
+
+ PR target/65932
+ PR target/67714
+ * gcc.target/arm/wmul-3.c: Simplify test to generate just
+ a single smulbb instruction.
+ * gcc.target/amr/wmul-1.c: Add -mtune=cortex-a9 to dg-options.
+ * gcc.target/amr/wmul-2.c: Likewise.
+
2016-02-04 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
PR target/65932
/* { dg-do compile } */
/* { dg-require-effective-target arm_dsp } */
-/* { dg-options "-O1 -fexpensive-optimizations" } */
+/* { dg-options "-O1 -fexpensive-optimizations -mtune=cortex-a9" } */
int mac(const short *a, const short *b, int sqr, int *sum)
{
/* { dg-do compile } */
/* { dg-require-effective-target arm_dsp } */
-/* { dg-options "-O1 -fexpensive-optimizations" } */
+/* { dg-options "-O1 -fexpensive-optimizations -mtune=cortex-a9" } */
void vec_mpy(int y[], const short x[], short scaler)
{
/* { dg-do compile } */
/* { dg-require-effective-target arm_dsp } */
-/* { dg-options "-O1 -fexpensive-optimizations" } */
+/* { dg-options "-O" } */
-int mac(const short *a, const short *b, int sqr, int *sum)
+int
+foo (int a, int b)
{
- 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;
+ return (short) a * (short) b;
}
-/* { dg-final { scan-assembler-times "smulbb" 2 } } */
+/* { dg-final { scan-assembler-times "smulbb" 1 } } */