This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/21485] [4.2/4.3/4.4 Regression] missed load PRE, PRE makes i?86 suck
- From: "rguenth at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 4 Oct 2008 15:58:51 -0000
- Subject: [Bug tree-optimization/21485] [4.2/4.3/4.4 Regression] missed load PRE, PRE makes i?86 suck
- References: <bug-21485-10607@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #35 from rguenth at gcc dot gnu dot org 2008-10-04 15:58 -------
Another missed optimization on the tree level is hoisting of the load of
array[k*4] before the k < j condition which is possible after the PRE
insertion:
<bb 3>:
if (k_4 < j_5(D))
goto <bb 4>;
else
goto <bb 12>;
<bb 12>:
pretmp.12_31 = k_4 * 4;
pretmp.13_30 = array_8(D) + pretmp.12_31;
pretmp.14_25 = *pretmp.13_30;
goto <bb 6>;
<bb 4>:
D.1242_7 = k_4 * 4;
D.1243_9 = array_8(D) + D.1242_7;
D.1244_10 = *D.1243_9;
maybe PRE could somehow even insert on BB3 entry instead of BB3 exit edges in
this case. This would re-enable if-conversion of the second branch.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21485