gcc/testsuite/
authorrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 10 Dec 2012 20:22:48 +0000 (20:22 +0000)
committerrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 10 Dec 2012 20:22:48 +0000 (20:22 +0000)
* gcc.target/mips/octeon-bbit-2.c: Restructure loops so that no
code duplication is required.  Allow BNE to appear.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@194370 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/mips/octeon-bbit-2.c

index efbf048..ab94599 100644 (file)
@@ -1,5 +1,10 @@
 2012-12-10  Richard Sandiford  <rdsandiford@googlemail.com>
 
+       * gcc.target/mips/octeon-bbit-2.c: Restructure loops so that no
+       code duplication is required.  Allow BNE to appear.
+
+2012-12-10  Richard Sandiford  <rdsandiford@googlemail.com>
+
        * gcc.target/mips/ext-2.c: Require -mlong64.
 
 2012-12-10  Richard Biener  <rguenther@suse.de>
index 9bd8dce..7e78d70 100644 (file)
@@ -4,22 +4,21 @@
 /* { dg-final { scan-assembler "\tbbit\[01\]\t" } } */
 /* { dg-final { scan-assembler-not "\tbbit\[01\]l\t" } } */
 /* { dg-final { scan-assembler "\tbnel\t" } } */
-/* { dg-final { scan-assembler-not "\tbne\t" } } */
 
 NOMIPS16 int
-f (int n, int i)
+f (int *a, int *b)
 {
-  int s = 0;
-  for (; i & 1; i++)
-    s += i;
-  return s;
+  do
+    if (__builtin_expect (*a & 1, 1))
+      *a = 0;
+  while (++a < b);
 }
 
 NOMIPS16 int
-g (int n, int i)
+g (int *a, int *b)
 {
-  int s = 0;
-  for (i = 0; i < n; i++)
-    s += i;
-  return s;
+  do
+    if (__builtin_expect (*a == 3, 1))
+      *a = 0;
+  while (++a < b);
 }