diff options
author | rsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-12-10 20:22:48 +0000 |
---|---|---|
committer | rsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-12-10 20:22:48 +0000 |
commit | a6cea47db4c5019eed035901f0f61012a1e989cf (patch) | |
tree | 5546e711211d115c54e18d4a2c6f18fb4ec5f7f1 /gcc/testsuite | |
parent | be3860ba8df48cca3253da4f02fd2d42d856ce80 (diff) | |
download | gcc-a6cea47db4c5019eed035901f0f61012a1e989cf.tar.gz |
gcc/testsuite/
* 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
Diffstat (limited to 'gcc/testsuite')
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/gcc.target/mips/octeon-bbit-2.c | 21 |
2 files changed, 15 insertions, 11 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index efbf048b877..ab9459980a8 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -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> diff --git a/gcc/testsuite/gcc.target/mips/octeon-bbit-2.c b/gcc/testsuite/gcc.target/mips/octeon-bbit-2.c index 9bd8dce107a..7e78d70e77f 100644 --- a/gcc/testsuite/gcc.target/mips/octeon-bbit-2.c +++ b/gcc/testsuite/gcc.target/mips/octeon-bbit-2.c @@ -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); } |