This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: optimization/4046: redundant conditional branch
- From: sayle at gcc dot gnu dot org
- To: gcc-bugs at gcc dot gnu dot org, gcc-prs at gcc dot gnu dot org, niemayer at isg dot de, nobody at gcc dot gnu dot org
- Date: 2 Jul 2002 02:51:35 -0000
- Subject: Re: optimization/4046: redundant conditional branch
- Reply-to: sayle at gcc dot gnu dot org, gcc-bugs at gcc dot gnu dot org, gcc-prs at gcc dot gnu dot org, niemayer at isg dot de, nobody at gcc dot gnu dot org, gcc-gnats at gcc dot gnu dot org
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