This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/23622] Dom jump threading at -O1 confuses branch prediction
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 29 Aug 2005 12:57:50 -0000
- Subject: [Bug tree-optimization/23622] Dom jump threading at -O1 confuses branch prediction
- References: <20050829115425.23622.rakdver@gcc.gnu.org>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-08-29 12:57 -------
Hmm, in dom1 we get:
<bb 0>:
goto <bb 4> (<L3>);
# i_4 = PHI <i_1(2), i_2(4)>;
<L0>:;
something ();
i_3 = i_4 + 1;
# i_1 = PHI <i_3(1)>;
<L1>:;
if (i_1 <= 99) goto <L0>; else goto <L2>;
<L2>:;
return;
# i_2 = PHI <0(0)>;
<L3>:;
goto <bb 1> (<L0>);
In PHI-OPT we get:
# i_4 = PHI <i_3(1), 0(0)>;
<L0>:;
something ();
i_3 = i_4 + 1;
if (i_3 <= 99) goto <L0>; else goto <L2>;
Becuase we run a cfg cleanup. I don't see anything wrong here now.
This is the same for -O2 also.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23622