Commit cc9c0829 by Kyrylo Tkachov Committed by Kyrylo Tkachov

[ARM][4/4] Adjust gcc.target/arm/wmul-[123].c tests

	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.

From-SVN: r233134
parent 625d55af
...@@ -2,6 +2,15 @@ ...@@ -2,6 +2,15 @@
PR target/65932 PR target/65932
PR target/67714 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
PR target/67714
* gcc.c-torture/execute/pr67714.c: New test. * gcc.c-torture/execute/pr67714.c: New test.
2016-02-04 Ilya Enkovich <enkovich.gnu@gmail.com> 2016-02-04 Ilya Enkovich <enkovich.gnu@gmail.com>
......
/* { dg-do compile } */ /* { dg-do compile } */
/* { dg-require-effective-target arm_dsp } */ /* { 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) int mac(const short *a, const short *b, int sqr, int *sum)
{ {
......
/* { dg-do compile } */ /* { dg-do compile } */
/* { dg-require-effective-target arm_dsp } */ /* { 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) void vec_mpy(int y[], const short x[], short scaler)
{ {
......
/* { dg-do compile } */ /* { dg-do compile } */
/* { dg-require-effective-target arm_dsp } */ /* { 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; return (short) a * (short) b;
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 "smulbb" 2 } } */ /* { dg-final { scan-assembler-times "smulbb" 1 } } */
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