From dd7376371f9673073beb5eec0e5a75109266b4c9 Mon Sep 17 00:00:00 2001 From: Hans-Peter Nilsson Date: Wed, 17 Feb 2021 19:10:11 +0100 Subject: [PATCH] testsuite/gcc.target/cris/biap-mul.c: New test. gcc/testsuite: * gcc.target/cris/biap-mul.c: New test. --- gcc/testsuite/gcc.target/cris/biap-mul.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 gcc/testsuite/gcc.target/cris/biap-mul.c diff --git a/gcc/testsuite/gcc.target/cris/biap-mul.c b/gcc/testsuite/gcc.target/cris/biap-mul.c new file mode 100644 index 0000000..e005463 --- /dev/null +++ b/gcc/testsuite/gcc.target/cris/biap-mul.c @@ -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; +} -- 2.7.4