This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/27302] Fold does not fold (i < j) == (j > i) to 1
- From: "rguenth at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 10 May 2006 10:22:50 -0000
- Subject: [Bug middle-end/27302] Fold does not fold (i < j) == (j > i) to 1
- References: <bug-27302-10053@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #3 from rguenth at gcc dot gnu dot org 2006-05-10 10:22 -------
Subject: Bug 27302
Author: rguenth
Date: Wed May 10 10:22:39 2006
New Revision: 113670
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=113670
Log:
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.
Added:
trunk/gcc/testsuite/gcc.dg/torture/pr27302.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/fold-const.c
trunk/gcc/testsuite/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27302