diff options
author | Andrew Pinski <pinskia@physics.uc.edu> | 2005-03-10 22:13:01 +0000 |
---|---|---|
committer | Andrew Pinski <pinskia@gcc.gnu.org> | 2005-03-10 14:13:01 -0800 |
commit | dddcca1d19d2f8db6d47cc6a133a07587ccac752 (patch) | |
tree | 387cfa61b49a72cee22a3f22ff24c6d684520fac | |
parent | e4fbead1e43a019db4cd1e7364ca47737d13fa39 (diff) | |
download | gcc-dddcca1d19d2f8db6d47cc6a133a07587ccac752.zip gcc-dddcca1d19d2f8db6d47cc6a133a07587ccac752.tar.gz gcc-dddcca1d19d2f8db6d47cc6a133a07587ccac752.tar.bz2 |
re PR rtl-optimization/20412 (RTL checking failure in the combiner)
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.
From-SVN: r96264
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/simplify-rtx.c | 2 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/gcc.c-torture/compile/pr20412.c | 20 |
4 files changed, 32 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 18efe59..0cd964f 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2005-03-10 Andrew Pinski <pinskia@physics.uc.edu> + + PR rtl-opt/20412 + * simplify-rtx.c (simplify_relational_operation_1): Fix typo - check the + correct mode. + 2005-03-10 Roger Sayle <roger@eyesopen.com> * builtins.c (expand_builtin_signbit): Extend to handle floating diff --git a/gcc/simplify-rtx.c b/gcc/simplify-rtx.c index 8a1b9bb..2f7ae25 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 bee3e64..bb8b8fe 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2005-03-10 Andrew Pinski <pinskia@physics.uc.edu> + + PR rtl-opt/20412 + * gcc.c-torture/compile/pr20412.c: New test. + 2005-03-10 Roger Sayle <roger@eyesopen.com> * 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 0000000..a165a92 --- /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<len; i++) + { + a = bar1() ? 0 : 1; + b = bar2() ? 0 : 1; + g = bar3() ? 0 : 1; + + if (stop = ((a+b) % 2 != g)) break; + } + + return stop; +} |