diff options
author | Adam Nemet <anemet@caviumnetworks.com> | 2008-04-03 19:31:28 +0000 |
---|---|---|
committer | Adam Nemet <nemet@gcc.gnu.org> | 2008-04-03 19:31:28 +0000 |
commit | 6ac935c1503763d48c8f461d6fa8349a38513e85 (patch) | |
tree | c57a428bbaccf5ba6c74773cdc722e1afb1d02fa /gcc/testsuite | |
parent | 6b0c2336ba22b3d0e8d36651169a5bab2b25fe35 (diff) | |
download | gcc-6ac935c1503763d48c8f461d6fa8349a38513e85.tar.gz |
mips.md (any_gt, [...]): New code iterators.
* config/mips/mips.md (any_gt, any_ge, any_lt, any_le): New code
iterators.
(u): Add attribute values for gt, gtu, ge, geu, lt, ltu, le and
leu.
(sgt<u>): Merge sgt and sgtu into new expander.
(sgt, sgtu): Remove expanders.
(*sgt<u>_<mode>): Merge *sgt_<mode> and *sgtu_<mode> into new
pattern.
(*sgt_<mode>, *sgtu_<mode>): Remove patterns.
(*sgt<u>_<mode>_mips16): Merge *sgt_<mode>_mips16 and
*sgtu_<mode>_mips16 into new pattern.
(*sgt_<mode>_mips16, *sgtu_<mode>_mips16): Remove patterns.
(sge<u>): Merge sge and sgeu into new expander.
(sge, sgeu): Remove expanders.
(*sge<u>_<mode>): Merge *sge_<mode> and second *sge_<mode> into
new pattern.
(*sge_<mode>, second *sge_<mode>): Remove patterns.
(slt<u>): Merge slt and sltu into new expander.
(slt, sltu): Remove expanders.
(*slt<u>_<mode>): Merge *slt_<mode> and *sltu_<mode> into new
pattern.
(*slt_<mode>, *sltu_<mode>): Remove patterns.
(*slt<u>_<mode>_mips16): Merge *slt_<mode>_mips16 and
*sltu_<mode>_mips16 into new pattern.
(*slt_<mode>_mips16, *sltu_<mode>_mips16): Remove patterns.
(sle<u>): Merge sle and sleu into new expander.
(sle, sleu): Remove expanders.
(*sle<u>_<mode>): Merge *sle_<mode> and *sleu_<mode> into new
pattern.
(*sle_<mode>, *sleu_<mode>): Remove patterns.
(*sle<u>_<mode>_mips16): Merge *sle_<mode>_mips16 and
*sleu_<mode>_mips16 into new pattern.
(*sle_<mode>_mips16, *sleu_<mode>_mips16): Remove patterns.
testsuite/
* gcc.target/mips/scc-1.c: New test.
From-SVN: r133872
Diffstat (limited to 'gcc/testsuite')
-rw-r--r-- | gcc/testsuite/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/testsuite/gcc.target/mips/scc-1.c | 35 |
2 files changed, 39 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 59bc95a8e9e..22d1cecdaa8 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2008-04-03 Adam Nemet <anemet@caviumnetworks.com> + + * gcc.target/mips/scc-1.c: New test. + 2008-04-03 Richard Guenther <rguenther@suse.de> * gcc.dg/tree-ssa/vrp43.c: New testcase. diff --git a/gcc/testsuite/gcc.target/mips/scc-1.c b/gcc/testsuite/gcc.target/mips/scc-1.c new file mode 100644 index 00000000000..443b0bf7d17 --- /dev/null +++ b/gcc/testsuite/gcc.target/mips/scc-1.c @@ -0,0 +1,35 @@ +/* { dg-do compile } */ +/* { dg-mips-options "-O -mips32" } */ + +/* { dg-final { scan-assembler-times {slt \$2,\$5,\$4} 1 } } */ +/* { dg-final { scan-assembler-times {sltu \$2,\$5,\$4} 1 } } */ +/* { dg-final { scan-assembler-times {slt \$5,\$4} 1 } } */ +/* { dg-final { scan-assembler-times {sltu \$5,\$4} 1 } } */ + +/* { dg-final { scan-assembler-times {slt \$2,\$0,\$4} 1 } } */ +/* { dg-final { scan-assembler-times {sltu \$2,\$0,\$4} 1 } } */ + +/* { dg-final { scan-assembler-times {slt \$2,\$4,\$5} 1 } } */ +/* { dg-final { scan-assembler-times {sltu \$2,\$4,\$5} 1 } } */ +/* { dg-final { scan-assembler-times {slt \$4,\$5} 1 } } */ +/* { dg-final { scan-assembler-times {sltu \$4,\$5} 1 } } */ + +/* { dg-final { scan-assembler-times {slt \$2,\$4,23} 1 } } */ +/* { dg-final { scan-assembler-times {sltu \$2,\$4,23} 1 } } */ +/* { dg-final { scan-assembler-times {slt \$4,23} 1 } } */ +/* { dg-final { scan-assembler-times {sltu \$4,23} 1 } } */ + +#define TEST(N, LHS, REL, RHS) \ + NOMIPS16 int s##N (int a, int b) { return LHS REL RHS; } \ + NOMIPS16 int u##N (unsigned a, unsigned b) { return LHS REL RHS; } \ + MIPS16 int s##N##_16 (int a, int b) { return LHS REL RHS; } \ + MIPS16 int u##N##_16 (unsigned a, unsigned b) { return LHS REL RHS; } + +#define TEST_NO16(N, LHS, REL, RHS) \ + NOMIPS16 int s##N (int a, int b) { return LHS REL RHS; } \ + NOMIPS16 int u##N (unsigned a, unsigned b) { return LHS REL RHS; } + +TEST (1, a, >, b); +TEST_NO16 (2, a, >=, 1); +TEST (3, a, <, b); +TEST (4, a, <=, 22); |