From ba3ed8d8066c483276de8300569a7b1aa484a42f Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Mon, 18 Oct 2004 15:01:36 +0200 Subject: [PATCH] i386.md (addqi_1_slp): Test for incdec_operand operand 1 instead of 2 * config/i386/i386.md (addqi_1_slp): Test for incdec_operand operand 1 instead of 2 * gcc.c-torture/compile/20041018-1.c: New test. From-SVN: r89212 --- gcc/ChangeLog | 5 +++++ gcc/config/i386/i386.md | 2 +- gcc/testsuite/ChangeLog | 4 ++++ .../gcc.c-torture/compile/20041018-1.c | 18 ++++++++++++++++++ 4 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 gcc/testsuite/gcc.c-torture/compile/20041018-1.c diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 58131c082429..8d7553efbd25 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2004-10-18 Jakub Jelinek + + * config/i386/i386.md (addqi_1_slp): Test for incdec_operand + operand 1 instead of 2 + 2004-10-18 Kazu Hirata * loop-unroll.c: Fix comment typos. diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md index 168f2f37a1be..ce9f8bc501f3 100644 --- a/gcc/config/i386/i386.md +++ b/gcc/config/i386/i386.md @@ -6362,7 +6362,7 @@ } } [(set (attr "type") - (if_then_else (match_operand:QI 2 "incdec_operand" "") + (if_then_else (match_operand:QI 1 "incdec_operand" "") (const_string "incdec") (const_string "alu1"))) (set_attr "mode" "QI")]) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index cebee0f0865f..0b2038a73c67 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2004-10-18 Jakub Jelinek + + * gcc.c-torture/compile/20041018-1.c: New test. + 2004-10-18 Ben Elliston * gcc.dg/ppc-sdata-1.c: Update to consider the possibility of the diff --git a/gcc/testsuite/gcc.c-torture/compile/20041018-1.c b/gcc/testsuite/gcc.c-torture/compile/20041018-1.c new file mode 100644 index 000000000000..3cc0c8f8cec9 --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/compile/20041018-1.c @@ -0,0 +1,18 @@ +void +foo (int y, int z, unsigned char **t, int **c, int *b) +{ + int i, j, k; + unsigned char a[2]; + + a[0] = 0; + a[1] = 0; + for (j = 0; j < z; j++) + for (i = 0; i < y; i++, a[0] += 3) + for (k = 0; k < 3; k++) + c[0][k] += 3 * b[k]; + for (i = 0; i < 3; i++) + if (t[0][i] + c[0][i] / a[0] <= 0) + t[0][i] = 0; + else + t[0][i] = t[0][i] + c[0][i] / a[0]; +}