This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/14752] [tree-ssa] "~a" should be changed to "a" if used in the condition of an if statement
- From: "sayle at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 28 Feb 2006 21:31:41 -0000
- Subject: [Bug tree-optimization/14752] [tree-ssa] "~a" should be changed to "a" if used in the condition of an if statement
- References: <bug-14752-5009@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #8 from sayle at gcc dot gnu dot org 2006-02-28 21:31 -------
Subject: Bug 14752
Author: sayle
Date: Tue Feb 28 21:31:29 2006
New Revision: 111575
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=111575
Log:
PR middle-end/14752
* c-common.c (c_common_truthvalue_conversion) <MINUS_EXPR,
BIT_XOR_EXPR, BIT_AND_EXPR>: Delete. Let fold optimize these
cases via the construction of "expr != 0".
* gcc.dg/fold-eqandshift-2.c: New test case.
Added:
trunk/gcc/testsuite/gcc.dg/fold-eqandshift-2.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/c-common.c
trunk/gcc/testsuite/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14752