Commit 4d63a95e by Richard Sandiford Committed by Richard Sandiford

octeon-bbit-2.c: Restructure loops so that no code duplication is required.

gcc/testsuite/
	* gcc.target/mips/octeon-bbit-2.c: Restructure loops so that no
	code duplication is required.  Allow BNE to appear.

From-SVN: r194370
parent bc5b54c9
2012-12-10 Richard Sandiford <rdsandiford@googlemail.com> 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. * gcc.target/mips/ext-2.c: Require -mlong64.
2012-12-10 Richard Biener <rguenther@suse.de> 2012-12-10 Richard Biener <rguenther@suse.de>
......
...@@ -4,22 +4,21 @@ ...@@ -4,22 +4,21 @@
/* { dg-final { scan-assembler "\tbbit\[01\]\t" } } */ /* { dg-final { scan-assembler "\tbbit\[01\]\t" } } */
/* { dg-final { scan-assembler-not "\tbbit\[01\]l\t" } } */ /* { dg-final { scan-assembler-not "\tbbit\[01\]l\t" } } */
/* { dg-final { scan-assembler "\tbnel\t" } } */ /* { dg-final { scan-assembler "\tbnel\t" } } */
/* { dg-final { scan-assembler-not "\tbne\t" } } */
NOMIPS16 int NOMIPS16 int
f (int n, int i) f (int *a, int *b)
{ {
int s = 0; do
for (; i & 1; i++) if (__builtin_expect (*a & 1, 1))
s += i; *a = 0;
return s; while (++a < b);
} }
NOMIPS16 int NOMIPS16 int
g (int n, int i) g (int *a, int *b)
{ {
int s = 0; do
for (i = 0; i < n; i++) if (__builtin_expect (*a == 3, 1))
s += i; *a = 0;
return s; while (++a < b);
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment