From 154b5d7f078b87fb6ae2f1e4b8bbe3fed969d439 Mon Sep 17 00:00:00 2001 From: pinskia Date: Thu, 10 Mar 2005 22:13:01 +0000 Subject: [PATCH] PR rtl-opt/20412 * simplify-rtx.c (simplify_relational_operation_1): Fix typo - check the correct mode. PR rtl-opt/20412 * gcc.c-torture/compile/pr20412.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@96264 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 6 ++++++ gcc/simplify-rtx.c | 2 +- gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/gcc.c-torture/compile/pr20412.c | 20 +++++++++++++++++++ 4 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 gcc/testsuite/gcc.c-torture/compile/pr20412.c diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 18efe597a395..0cd964faa7dd 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2005-03-10 Andrew Pinski + + PR rtl-opt/20412 + * simplify-rtx.c (simplify_relational_operation_1): Fix typo - check the + correct mode. + 2005-03-10 Roger Sayle * builtins.c (expand_builtin_signbit): Extend to handle floating diff --git a/gcc/simplify-rtx.c b/gcc/simplify-rtx.c index 8a1b9bb48056..2f7ae25c57e6 100644 --- a/gcc/simplify-rtx.c +++ b/gcc/simplify-rtx.c @@ -2882,7 +2882,7 @@ simplify_relational_operation_1 (enum rtx_code code, enum machine_mode mode, /* If op0 is a comparison, extract the comparison arguments form it. */ if (code == NE) { - if (GET_MODE (op0) == cmp_mode) + if (GET_MODE (op0) == mode) return simplify_rtx (op0); else return simplify_gen_relational (GET_CODE (op0), mode, VOIDmode, diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index bee3e6499bf8..bb8b8fe58642 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2005-03-10 Andrew Pinski + + PR rtl-opt/20412 + * gcc.c-torture/compile/pr20412.c: New test. + 2005-03-10 Roger Sayle * gcc.dg/builtins-32.c: Add new run-time tests for long double. diff --git a/gcc/testsuite/gcc.c-torture/compile/pr20412.c b/gcc/testsuite/gcc.c-torture/compile/pr20412.c new file mode 100644 index 000000000000..a165a921ac28 --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/compile/pr20412.c @@ -0,0 +1,20 @@ +int +foo(void) +{ + int a,b,g; + int i,len; + int stop; + + len = 10; + stop = 0; + for (i=0; i