This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug tree-optimization/21485] [4.2/4.3/4.4 Regression] missed load PRE, PRE makes i?86 suck



------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]