This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[MIPS, committed] Fix mulsize-2.c test


mulsize-2.c expected a subtraction, but when multiplying by 9 we should
have a shift and addition instead.  While there I made mulsize-1.c and
mulsize-2.c check for a shift, like mulsize-3.c does.

Tested on mips64-linux-gnu and applied.

Richard


gcc/testsuite/
	* gcc.target/mips/mulsize-1.c: Check for SLL as well as SUBU.
	* gcc.target/mips/mulsize-2.c: Check for ADDU rather than SUBU.
	Check for SLL too.

Index: gcc/testsuite/gcc.target/mips/mulsize-1.c
===================================================================
--- gcc/testsuite/gcc.target/mips/mulsize-1.c	2013-07-17 08:36:11.089030684 +0100
+++ gcc/testsuite/gcc.target/mips/mulsize-1.c	2013-08-19 18:32:51.558727758 +0100
@@ -1,4 +1,5 @@
 /* { dg-final { scan-assembler "\t.globl\tf7" } } */
+/* { dg-final { scan-assembler "\tsll\t" } } */
 /* { dg-final { scan-assembler "\tsubu\t" } } */
 /* { dg-final { scan-assembler-not "\tli\t" } } */
 /* { dg-final { scan-assembler-not "\tmul\t" } } */
Index: gcc/testsuite/gcc.target/mips/mulsize-2.c
===================================================================
--- gcc/testsuite/gcc.target/mips/mulsize-2.c	2013-07-17 08:36:11.089030684 +0100
+++ gcc/testsuite/gcc.target/mips/mulsize-2.c	2013-08-19 18:33:00.567808120 +0100
@@ -1,5 +1,6 @@
 /* { dg-final { scan-assembler "\t.globl\tf9" } } */
-/* { dg-final { scan-assembler "\tsubu\t" } } */
+/* { dg-final { scan-assembler "\tsll\t" } } */
+/* { dg-final { scan-assembler "\taddu\t" } } */
 /* { dg-final { scan-assembler-not "\tli\t" } } */
 /* { dg-final { scan-assembler-not "\tmul\t" } } */
 int


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]