re PR middle-end/26899 (Fold does not fold (i0 > i1 + 1) || (i1 < i0 - 1))
authorRichard Guenther <rguenther@suse.de>
Sat, 28 Oct 2006 18:03:21 +0000 (18:03 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Sat, 28 Oct 2006 18:03:21 +0000 (18:03 +0000)
commite73dbcaefc086d603fcd8707d06aa9599ccd9476
treecc83b84ce7c4da661546d58027790862ce4092db
parent4d81bf84358f0f905b606a5cb27777e614d213e1
re PR middle-end/26899 (Fold does not fold (i0 > i1 + 1) || (i1 < i0 - 1))

2006-10-28  Richard Guenther  <rguenther@suse.de>

PR middle-end/26899
* fold-const.c (maybe_canonicalize_comparison_1): Helper
for maybe_canonicalize_comparison.
(maybe_canonicalize_comparison): New function for canonicalizing
comparison trees.
(fold_comparison): Call it to canonicalize comparisons with
constants involved.

* gcc.dg/tree-ssa/pr26899.c: New testcase.

From-SVN: r118106
gcc/ChangeLog
gcc/fold-const.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/tree-ssa/pr26899.c [new file with mode: 0644]