https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79201

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |NEW
           Severity|normal                      |enhancement
         Resolution|FIXED                       |---

--- Comment #6 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
So this is actually still broken in the sense if we turn off dominator
optimizations (-fno-tree-dominator-opts), the problem with PRE and sink
interaction comes into play still.

The improvement came in via r8-2694 which in fact added
-fno-tree-dominator-opts to gcc.dg/tree-ssa/ssa-sink-16.c .
Note DOM actually does the sinking rather than the rotating of the loop.

here is a testcase where DOM does not mess with the loop but we should still be
able to sink the function out and do when adding  -fno-tree-pre:

int f(int n, int t) {
  int i,j=0;
  if (t >=31 || t < 0)  return 100;

  for (i = 0; i < t; i++) {
    j = __builtin_ffs(i);
  }
  return j;
}

Reply via email to