This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug optimization/14753] [tree-ssa] some missed forward propagation opportunities
- 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: 31 Mar 2004 02:42:37 -0000
- Subject: [Bug optimization/14753] [tree-ssa] some missed forward propagation opportunities
- References: <20040327161347.14753.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-03-31 02:42 -------
One more case.
void bar (void);
void
foo (unsigned int a)
{
if ((a >> 5) & 1)
bar ();
}
I get:
foo (a)
{
_Bool T.2;
unsigned int T.1;
unsigned int T.0;
<bb 0>:
T.0_2 = a_1 >> 5;
T.1_3 = T.0_2 & 1;
T.2_4 = (_Bool)T.1_3;
if (T.2_4) goto <L0>; else goto <L1>;
<L0>:;
bar () [tail call];
<L1>:;
return;
}
We could have "if (T.1_3 != 0)".
If nothing else, we can eliminate one temporary variable.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14753