This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/19516] missed optimization (bool)
- From: "law at redhat dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 14 Feb 2005 21:05:06 -0000
- Subject: [Bug tree-optimization/19516] missed optimization (bool)
- References: <20050118222857.19516.rguenth@tat.physik.uni-tuebingen.de>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From law at redhat dot com 2005-02-14 21:05 -------
Note the new jump thread selection code will catch this case. We get the
following code:
# BLOCK 0
# PRED: ENTRY [100.0%] (fallthru,exec)
# VUSE <TMT.0_7>;
D.1134_2 = *flag_1;
if (D.1134_2 != 0) goto <L0>; else goto <L3>;
# SUCC: 1 [46.5%] (true,exec) 3 [53.5%] (false,exec)
# BLOCK 1
# PRED: 0 [46.5%] (true,exec)
<L0>:;
# TMT.0_9 = V_MAY_DEF <TMT.0_7>;
bar ();
# VUSE <TMT.0_9>;
D.1134_14 = *flag_1;
if (D.1134_14 != 0) goto <L2>; else goto <L3>;
# SUCC: 2 [46.5%] (true,exec) 3 [53.5%] (false,exec)
# BLOCK 2
# PRED: 1 [46.5%] (true,exec)
<L2>:;
# TMT.0_8 = V_MAY_DEF <TMT.0_9>;
bar ();
# SUCC: 3 [100.0%] (fallthru,exec)
# BLOCK 3 # PRED: 1 [53.5%] (false,exec) 2 [100.0%] (fallthru,exec) 0
[53.5%] (false,exec)
<L3>:;
return;
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19516