testsuite/gcc.target/cris/biap-mul.c: New test.

gcc/testsuite:
	* gcc.target/cris/biap-mul.c: New test.
This commit is contained in:
Hans-Peter Nilsson 2021-02-17 19:10:11 +01:00
parent 6cb68940dc
commit dd7376371f

View File

@ -0,0 +1,15 @@
/* Make sure ADDI is used for trivial multiplications too. */
/* { dg-do compile } */
/* { dg-options "-O2" } */
/* { dg-final { scan-assembler-times "\taddi" 2 } } */
/* { dg-final { scan-assembler-not "\tlsl|\tmul|\tmove|\tadd\[^i\]" } } */
int xyzzy (int r10)
{
return r10 * 5;
}
int plugh (int r10)
{
return r10 * 3;
}