[gcc r11-7326] testsuite/gcc.target/cris/biap-mul.c: New test.

Hans-Peter Nilsson hp@gcc.gnu.org
Mon Feb 22 17:00:39 GMT 2021


https://gcc.gnu.org/g:dd7376371f9673073beb5eec0e5a75109266b4c9

commit r11-7326-gdd7376371f9673073beb5eec0e5a75109266b4c9
Author: Hans-Peter Nilsson <hp@axis.com>
Date:   Wed Feb 17 19:10:11 2021 +0100

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

Diff:
---
 gcc/testsuite/gcc.target/cris/biap-mul.c | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

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 00000000000..e0054632b23
--- /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;
+}


More information about the Gcc-cvs mailing list