re PR middle-end/27302 (Fold does not fold (i < j) == (j > i) to 1)
authorRichard Guenther <rguenther@suse.de>
Wed, 10 May 2006 10:22:39 +0000 (10:22 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Wed, 10 May 2006 10:22:39 +0000 (10:22 +0000)
commita04d8591f266f810cf4681930772982444227b83
tree2e26bba9ef58b3eadcdafeb6f4d3d820b548704f
parent4db60bd06f820684418d7bb179d6edee80cddb08
re PR middle-end/27302 (Fold does not fold (i < j) == (j > i) to 1)

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

PR tree-optimization/27302
* fold-const.c (operand_equal_p): For two comparisons,
try comparison of one comparison code swapped if that yields
the same code.

* gcc.dg/torture/pr27302.c: New testcase.

From-SVN: r113670
gcc/ChangeLog
gcc/fold-const.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/torture/pr27302.c [new file with mode: 0644]