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: "kazu at cs dot umass dot edu" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 15 May 2004 11:55:32 -0000
- Subject: [Bug tree-optimization/14752] [tree-ssa] "~a" should be changed to "a" if used in the condition of an if statement
- References: <20040327144535.14752.kazu@cs.umass.edu>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From kazu at cs dot umass dot edu 2004-05-15 11:55 -------
As of today, the last tree-ssa form looks like:
;; Function foo (foo)
foo (a)
{
_Bool T.2;
unsigned int T.1;
unsigned int T.0;
<bb 0>:
T.0_2 = a_1 >> 2;
T.1_3 = T.0_2 & 1;
if (T.1_3 != 0) goto <L0>; else goto <L1>;
<L0>:;
bar () [tail call];
<L1>:;
return;
}
;; Function baz (baz)
baz (a)
{
_Bool T.6;
unsigned int T.5;
unsigned int T.4;
unsigned int T.3;
<bb 0>:
T.3_2 = ~a_1;
T.4_3 = T.3_2 >> 2;
T.5_4 = T.4_3 & 1;
if (T.5_4 != 0) goto <L0>; else goto <L1>;
<L0>:;
bar () [tail call];
<L1>:;
return;
}
Note that the casts to _Bool are gone.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14752