optimization/4046: redundant conditional branch
sayle@gcc.gnu.org
sayle@gcc.gnu.org
Mon Jul 1 19:51:00 GMT 2002
Synopsis: redundant conditional branch
State-Changed-From-To: analyzed->closed
State-Changed-By: sayle
State-Changed-When: Mon Jul 1 19:51:35 2002
State-Changed-Why:
This problem has now been fixed on mainline CVS by the
combination of the following two patches. We now generate
only a single branch in the GNATS testcase.
2002-07-01 Roger Sayle <roger@eyesopen.com>
PR opt/4046
* fold-const.c (fold) [COND_EXPR]: Simplify A ? 0 : 1 to !A,
A ? B : 0 to A && B and A ? B : 1 into !A || B if both A and
B are truth values.
2002-06-15 Roger Sayle <roger@eyesopen.com>
* fold-const.c (comparison_to_compcode): New function to convert
an comparison TREE CODE into a bit-based representation.
(compcode_to_comparison): New function to convert from this bit
based representation back to a comparison TREE CODE.
(fold_truthop): Simplify (x<y) && (x==y) and related composite
comparisons.
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=4046
More information about the Gcc-bugs
mailing list